Skip to content

Commit

Permalink
add typed-array-anchor (webgpu#158)
Browse files Browse the repository at this point in the history
  • Loading branch information
greggman authored Aug 21, 2024
1 parent 637fea1 commit 5ef0afb
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions webgpu/lessons/ja/webgpu-memory-layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ ourStructValuesAsF32[kAccelerationOffset] = 3.4;
ourStructValuesAsU32[kFrameCountOffset] = 56; // これは整数値
```

## <a id="a-typed-arrays"></a> `TypedArrays`

以上で、「12バイトのバッファ」に「3つの数値」を適切に配置することができました。

さて、プログラミングでは、同じことをやるために色々な書き方ができます。
Expand Down
2 changes: 1 addition & 1 deletion webgpu/lessons/ko/webgpu-memory-layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ ourStructValuesAsF32[kAccelerationOffset] = 3.4;
ourStructValuesAsU32[kFrameCountOffset] = 56; // 정수값
```

## `TypedArrays`
## <a id="a-typed-arrays"></a> `TypedArrays`

유의할 것은, 이를 수행하기 위한 방법에는 수많은 방법이 존재한다는 겁니다.
`TypedArray`의 생성자는 다양한 형태를 가질 수 있습니다.
Expand Down
2 changes: 1 addition & 1 deletion webgpu/lessons/uk/webgpu-memory-layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ ourStructValuesAsF32[kAccelerationOffset] = 3.4;
ourStructValuesAsU32[kFrameCountOffset] = 56; // an integer value
```

## `TypedArrays`
## <a id="a-typed-arrays"></a> `TypedArrays`

Зверніть увагу, що, як і багато речей в програмуванні, ми можемо зробити це
різними способами. `TypedArray` має конструктор, який набуває різних форм.
Expand Down
2 changes: 1 addition & 1 deletion webgpu/lessons/webgpu-memory-layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ ourStructValuesAsF32[kAccelerationOffset] = 3.4;
ourStructValuesAsU32[kFrameCountOffset] = 56; // an integer value
```

## `TypedArrays`
## <a id="a-typed-arrays"></a> `TypedArrays`

Note, like many things in programming there are multiple ways we could
do this. `TypedArray`s have a constructor that takes various forms. For example
Expand Down
2 changes: 2 additions & 0 deletions webgpu/lessons/zh_cn/webgpu-memory-layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ ourStructValuesAsF32[kAccelerationOffset] = 3.4;
ourStructValuesAsU32[kFrameCountOffset] = 56; // an integer value
```

## <a id="a-typed-arrays"></a> `TypedArrays`

请注意,就像编程中的许多事情一样,我们有多种方法可以做到这一点。TypedArray 的构造函数有多种形式。例如

- `new Float32Array(12)`
Expand Down

0 comments on commit 5ef0afb

Please sign in to comment.