u32
타입
32-bit unsigned integer value.
시그니처와 이름 아래 문장, 컴파일러 메시지는 커밋 af54ddad5의 컴파일러가 쓴 영어 원문입니다.
구문
type u32 = number & { readonly [u32Tag]?: true }매개변수나 반환 위치에 쓰인 number는 스칼라가 들어갈 자리입니다. 앰비언트 파일은 GPU 스칼라를 브랜드가 붙은 number로 선언하고 그 브랜드는 선택이라서, 리터럴도 브랜드가 붙은 스칼라도 이 자리에 들어갑니다.
type f32 = number & { readonly [f32Tag]?: true }
타입으로 쓴 number는 쓰이는 곳을 보고 추론하며, f32, i32, u32는 너비를 고정합니다. 그 행과 컴파일러가 낸 결과는 TypeScript에서 페이지에 있습니다.
예제
path/image-blur/image-blur.shade.tspath/parallel-sum/parallel-sum.shade.tspath/histogram/histogram.shade.tsgallery/domain-warp-twin/domain-warp-twin.shade.tsgallery/julia-twin/julia-twin.shade.tsgallery/kaleidoscope-twin/kaleidoscope-twin.shade.tsgallery/mandelbrot-twin/mandelbrot-twin.shade.tsgallery/ocean-twin/ocean-twin.shade.tsgallery/starfield-twin/starfield-twin.shade.tsgallery/fp64-burning-ship-twin/fp64-burning-ship-twin.shade.tsgallery/fp64-julia-twin/fp64-julia-twin.shade.tsgallery/fp64-mandelbrot-de-twin/fp64-mandelbrot-de-twin.shade.tsgallery/fp64-newton-twin/fp64-newton-twin.shade.tsgallery/atomic-histogram/atomic-histogram.shade.tsgallery/bit-bump/bit-bump.shade.tsgallery/block-scope/block-scope.shade.tsgallery/compute-reduction-twin/compute-reduction-twin.shade.tsgallery/compute-sync/compute-sync.shade.tsgallery/generic-helpers/generic-helpers.shade.tsgallery/id-pick/id-pick.shade.tsgallery/inferred-returns/inferred-returns.shade.tsgallery/integer-math/integer-math.shade.tsgallery/kernel-image-invert/kernel-image-invert.shade.tsgallery/kernel-push/kernel-push.shade.tsgallery/kernel-set-unique/kernel-set-unique.shade.tsgallery/loop-kernel/loop-kernel.shade.tsgallery/loop-on-cpu/loop-on-cpu.shade.tsgallery/loop-reduction/loop-reduction.shade.tsgallery/loop-struct-array/loop-struct-array.shade.tsgallery/module-const/module-const.shade.tsgallery/packed-bytes/packed-bytes.shade.tsgallery/packing-bitcast/packing-bitcast.shade.tsgallery/particle-step/particle-step.shade.tsgallery/private-state/private-state.shade.tsgallery/rng-method/rng-method.shade.tsgallery/subgroup-reduce/subgroup-reduce.shade.tsgallery/workgroup-override/workgroup-override.shade.tsgallery/workgroup-reduce/workgroup-reduce.shade.tsgallery/workgroup-scratch/workgroup-scratch.shade.tsgallery/workgroup-tile-2d/workgroup-tile-2d.shade.ts