diff options
| author | Jay Kwak <82421531+jkwak-work@users.noreply.github.com> | 2024-11-26 10:29:31 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-26 10:29:31 -0800 |
| commit | 36ac8ff4ea8de86ccd517f87291d56b3c2cb7957 (patch) | |
| tree | b39e610741bde654f7586410510ad41576412873 /docs | |
| parent | 915e05dcc4c03492087c2d3126ba01dff9ebe1be (diff) | |
Document the restrictions for vector size (#5673)
Added a note to clarify that vector types cannot have size bigger than 4.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/user-guide/02-conventional-features.md | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/docs/user-guide/02-conventional-features.md b/docs/user-guide/02-conventional-features.md index d1ecb5bad..9e2743aa3 100644 --- a/docs/user-guide/02-conventional-features.md +++ b/docs/user-guide/02-conventional-features.md @@ -80,6 +80,8 @@ The type `vector<T,N>` is a vector of `N` _elements_ (also called _components_) As a convenience, pre-defined vector types exist for each scalar type and valid element count, with a name using the formula `<<scalar-type>><<element-count>>`. For example, `float3` is a convenient name for `vector<float,3>`. +> Note: Slang doesn't support vectors longer than 4 elements. They map to native vector types on many platforms, including CUDA, and none of these platforms support vectors longer than 4 elements. If needed, you can use an array like `float myArray[8]`. + ### Matrix Types Matrix types can be written as `matrix<T,R,C>` where `T` is a scalar type and both `R` and `C` are integers from 2 to 4 (inclusive). |
