From 36ac8ff4ea8de86ccd517f87291d56b3c2cb7957 Mon Sep 17 00:00:00 2001 From: Jay Kwak <82421531+jkwak-work@users.noreply.github.com> Date: Tue, 26 Nov 2024 10:29:31 -0800 Subject: Document the restrictions for vector size (#5673) Added a note to clarify that vector types cannot have size bigger than 4. --- docs/user-guide/02-conventional-features.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'docs') 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` 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 `<><>`. For example, `float3` is a convenient name for `vector`. +> 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` where `T` is a scalar type and both `R` and `C` are integers from 2 to 4 (inclusive). -- cgit v1.2.3