gpuLength (Function)
Signature: gpuLength(buffer: GpuBuffer<int> | GpuBuffer<float> | GpuBuffer<bool>) -> int
Description: Returns a GpuBuffer's element count. O(1).
Parameters
- buffer (GpuBuffer
| GpuBuffer | GpuBuffer ): The buffer to measure
Returns: int
Example
gpuLength(toGpu([1, 2, 3])) // 3
gpuLength (toGpu [1, 2, 3]) // 3