compute.GPUndarray#baseOffsetBytes¶
Summary¶
compute.GPUndarray#baseOffsetBytes is the start of an array's backing range relative to its StorageBuffer. Use it with the layout offset and byte strides to calculate element addresses in shared GPU storage.
Syntax¶
Returns¶
number - A nonnegative multiple of four, measured from the logical start of array.buffer. Owning allocations start at zero. A wrapped array or a derived view can start later in the same storage.
Notes¶
The first logical element is at array.buffer.offsetBytes + array.baseOffsetBytes + array.offsetBytes in the raw GPUBuffer. Add the indexed stride for each axis for other elements. A storage binding instead starts at the backing range, and its raw offset must meet the device's storage-offset alignment.