Skip to content

Commit

Permalink
Document the GPU Vector constructor built-in functions (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
dfellis authored Jan 20, 2025
1 parent a1165a5 commit e1b491c
Showing 1 changed file with 69 additions and 1 deletion.
70 changes: 69 additions & 1 deletion docs/built_ins.md
Original file line number Diff line number Diff line change
Expand Up @@ -1125,7 +1125,75 @@ For clarity, the table of functions will be broken up into broad categories, and

### GPGPU Vector functions

TODO
| Name | Type | Description | Explicit |
| :--------------------- | :------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------- | :------: |
| `gvec2u` | `(string, Dict{string, string}, Set{GBuffer}) -> gvec2u` | Manually construct a GPU 2-element `u32` vector. You probably won't use this directly ||
| `gvec2i` | `(string, Dict{string, string}, Set{GBuffer}) -> gvec2u` | Manually construct a GPU 2-element `i32` vector. You probably won't use this directly ||
| `gvec2f` | `(string, Dict{string, string}, Set{GBuffer}) -> gvec2u` | Manually construct a GPU 2-element `f32` vector. You probably won't use this directly ||
| `gvec2b` | `(string, Dict{string, string}, Set{GBuffer}) -> gvec2u` | Manually construct a GPU 2-element `bool` vector. You probably won't use this directly ||
| `gvec3u` | `(string, Dict{string, string}, Set{GBuffer}) -> gvec3u` | Manually construct a GPU 3-element `u32` vector. You probably won't use this directly ||
| `gvec3i` | `(string, Dict{string, string}, Set{GBuffer}) -> gvec3u` | Manually construct a GPU 3-element `i32` vector. You probably won't use this directly ||
| `gvec3f` | `(string, Dict{string, string}, Set{GBuffer}) -> gvec3u` | Manually construct a GPU 3-element `f32` vector. You probably won't use this directly ||
| `gvec3b` | `(string, Dict{string, string}, Set{GBuffer}) -> gvec3u` | Manually construct a GPU 3-element `bool` vector. You probably won't use this directly ||
| `gvec4u` | `(string, Dict{string, string}, Set{GBuffer}) -> gvec4u` | Manually construct a GPU 4-element `u32` vector. You probably won't use this directly ||
| `gvec4i` | `(string, Dict{string, string}, Set{GBuffer}) -> gvec4u` | Manually construct a GPU 4-element `i32` vector. You probably won't use this directly ||
| `gvec4f` | `(string, Dict{string, string}, Set{GBuffer}) -> gvec4u` | Manually construct a GPU 4-element `f32` vector. You probably won't use this directly ||
| `gvec4b` | `(string, Dict{string, string}, Set{GBuffer}) -> gvec4u` | Manually construct a GPU 4-element `bool` vector. You probably won't use this directly ||
| `gvec2Primitive{I, O}` | `(I, I) -> O` | Manually construct a GPU type cast from the input types into the output type. You probably won't use this directly ||
| `gvec2u` | `() -> gvec2u` | Returns a default GPU 2-element `u32` vector ||
| `gvec2u` | `(gu32, gu32) -> gvec2u` | Constructs a GPU 2-element `u32` vector with GPU `u32` values ||
| `gvec2u{T}` | `(T, T) -> gvec2u` | Converts the provided values into GPU `u32` values and then constructs a GPU 2-element `u32` vector ||
| `gvec2u{T}` | `T -> gvec2u` | Converts the provided value into a GPU `u32` value and the constructs a GPU 2-element `u32` vector with both values set to this value ||
| `gvec2i` | `() -> gvec2i` | Returns a default GPU 2-element `i32` vector ||
| `gvec2i` | `(gi32, gi32) -> gvec2i` | Constructs a GPU 2-element `i32` vector with GPU `i32` values ||
| `gvec2i{T}` | `(T, T) -> gvec2i` | Converts the provided values into GPU `i32` values and then constructs a GPU 2-element `i32` vector ||
| `gvec2i{T}` | `T -> gvec2i` | Converts the provided value into a GPU `i32` value and the constructs a GPU 2-element `i32` vector with both values set to this value ||
| `gvec2f` | `() -> gvec2f` | Returns a default GPU 2-element `f32` vector ||
| `gvec2f` | `(gf32, gf32) -> gvec2f` | Constructs a GPU 2-element `f32` vector with GPU `f32` values ||
| `gvec2f{T}` | `(T, T) -> gvec2f` | Converts the provided values into GPU `f32` values and then constructs a GPU 2-element `f32` vector ||
| `gvec2f{T}` | `T -> gvec2f` | Converts the provided value into a GPU `f32` value and the constructs a GPU 2-element `f32` vector with both values set to this value ||
| `gvec2b` | `() -> gvec2b` | Returns a default GPU 2-element `bool` vector ||
| `gvec2b` | `(gbool, gbool) -> gvec2b` | Constructs a GPU 2-element `bool` vector with GPU `bool` values ||
| `gvec2b{T}` | `(T, T) -> gvec2b` | Converts the provided values into GPU `bool` values and then constructs a GPU 2-element `bool` vector ||
| `gvec2b{T}` | `T -> gvec2b` | Converts the provided value into a GPU `bool` value and the constructs a GPU 2-element `bool` vector with both values set to this value ||
| `gvec3Primitive{I, O}` | `(I, I, I) -> O` | Manually construct a GPU type cast from the input types into the output type. You probably won't use this directly ||
| `gvec3u` | `() -> gvec3u` | Returns a default GPU 3-element `u32` vector ||
| `gvec3u` | `(gu32, gu32, gu32) -> gvec3u` | Constructs a GPU 3-element `u32` vector with GPU `u32` values ||
| `gvec3u{T}` | `(T, T, T) -> gvec3u` | Converts the provided values into GPU `u32` values and then constructs a GPU 3-element `u32` vector ||
| `gvec3u{T}` | `T -> gvec3u` | Converts the provided value into a GPU `u32` value and the constructs a GPU 3-element `u32` vector with all values set to this value ||
| `gvec3i` | `() -> gvec3i` | Returns a default GPU 3-element `i32` vector ||
| `gvec3i` | `(gi32, gi32, gi32) -> gvec3i` | Constructs a GPU 3-element `i32` vector with GPU `i32` values ||
| `gvec3i{T}` | `(T, T, T) -> gvec3i` | Converts the provided values into GPU `i32` values and then constructs a GPU 3-element `i32` vector ||
| `gvec3i{T}` | `T -> gvec3i` | Converts the provided value into a GPU `i32` value and the constructs a GPU 3-element `i32` vector with all values set to this value ||
| `gvec3f` | `() -> gvec3f` | Returns a default GPU 3-element `f32` vector ||
| `gvec3f` | `(gf32, gf32, gf32) -> gvec3f` | Constructs a GPU 3-element `f32` vector with GPU `f32` values ||
| `gvec3f{T}` | `(T, T, T) -> gvec3f` | Converts the provided values into GPU `f32` values and then constructs a GPU 3-element `f32` vector ||
| `gvec3f{T}` | `T -> gvec3f` | Converts the provided value into a GPU `f32` value and the constructs a GPU 3-element `f32` vector with all values set to this value ||
| `gvec3b` | `() -> gvec3b` | Returns a default GPU 3-element `bool` vector ||
| `gvec3b` | `(gbool, gbool, gbool) -> gvec3b` | Constructs a GPU 3-element `bool` vector with GPU `bool` values ||
| `gvec3b{T}` | `(T, T, T) -> gvec3b` | Converts the provided values into GPU `bool` values and then constructs a GPU 3-element `bool` vector ||
| `gvec3b{T}` | `T -> gvec3b` | Converts the provided value into a GPU `bool` value and the constructs a GPU 3-element `bool` vector with all values set to this value ||
| `gvec4Primitive{I, O}` | `(I, I, I, I) -> O` | Manually construct a GPU type cast from the input types into the output type. You probably won't use this directly ||
| `gvec4u` | `() -> gvec4u` | Returns a default GPU 4-element `u32` vector ||
| `gvec4u` | `(gu32, gu32, gu32, gu32) -> gvec4u` | Constructs a GPU 4-element `u32` vector with GPU `u32` values ||
| `gvec4u{T}` | `(T, T, T, T) -> gvec4u` | Converts the provided values into GPU `u32` values and then constructs a GPU 4-element `u32` vector ||
| `gvec4u{T}` | `T -> gvec4u` | Converts the provided value into a GPU `u32` value and the constructs a GPU 4-element `u32` vector with all values set to this value ||
| `gvec4i` | `() -> gvec4i` | Returns a default GPU 4-element `i32` vector ||
| `gvec4i` | `(gi32, gi32, gi32, gi32) -> gvec4i` | Constructs a GPU 4-element `i32` vector with GPU `i32` values ||
| `gvec4i{T}` | `(T, T, T, T) -> gvec4i` | Converts the provided values into GPU `i32` values and then constructs a GPU 4-element `i32` vector ||
| `gvec4i{T}` | `T -> gvec4i` | Converts the provided value into a GPU `i32` value and the constructs a GPU 4-element `i32` vector with all values set to this value ||
| `gvec4f` | `() -> gvec4f` | Returns a default GPU 4-element `f32` vector ||
| `gvec4f` | `(gf32, gf32, gf32, gf32) -> gvec4f` | Constructs a GPU 4-element `f32` vector with GPU `f32` values ||
| `gvec4f{T}` | `(T, T, T, T) -> gvec4f` | Converts the provided values into GPU `f32` values and then constructs a GPU 4-element `f32` vector ||
| `gvec4f{T}` | `T -> gvec4f` | Converts the provided value into a GPU `f32` value and the constructs a GPU 4-element `f32` vector with all values set to this value ||
| `gvec4b` | `() -> gvec4b` | Returns a default GPU 4-element `bool` vector ||
| `gvec4b` | `(gbool, gbool, gbool, gbool) -> gvec4b` | Constructs a GPU 4-element `bool` vector with GPU `bool` values ||
| `gvec4b{T}` | `(T, T, T, T) -> gvec4b` | Converts the provided values into GPU `bool` values and then constructs a GPU 4-element `bool` vector ||
| `gvec4b{T}` | `T -> gvec4b` | Converts the provided value into a GPU `bool` value and the constructs a GPU 4-element `bool` vector with all values set to this value ||
| `gFor` | `(u32, u32, u32) -> gvec3u` | Constructs the special global invocation id. This special type can only be constructed CPU side and read GPU side. Used for compute shader parallelism ||
| `gFor{T}` | `(T, T, T) -> gvec3u` | Converts the `T` values to `u32` and constructs a global invocation id ||
| `gFor{T}` | `(T, T) -> gvec3u` | Converts the `T` values to `u32` and constructs a global invocation id. The `Z` value is set to `1` ||
| `gFor{T}` | `T -> gvec3u` | Converts the `T` value to `u32` and constructs a global invocation id. The `Y` and `Z` values are set to `1` ||

### GPGPU Matrix functions

Expand Down

0 comments on commit e1b491c

Please sign in to comment.