shape_t#
Fully qualified name: wp::shape_t
-
struct shape_t#
Dimension descriptor for a Warp array.
Stores up to :data:
ARRAY_MAX_DIMSelement counts. Trailing unused slots are left zero. Layout matcheswp::shape_tin the native Warp runtime so awp.arraystruct can bereinterpret_cast’d directly.Public Functions
-
inline shape_t()#
-
inline int operator[](int i) const#
Returns the element count for the given dimension.
- Parameters:
i – [in] Zero-based dimension index, must be less than ARRAY_MAX_DIMS.
- Returns:
The element count of dimension i.
-
inline int &operator[](int i)#
Returns a mutable reference to the element count for the given dimension.
- Parameters:
i – [in] Zero-based dimension index, must be less than ARRAY_MAX_DIMS.
- Returns:
Reference to the element count of dimension i.
Public Members
-
int dims[ARRAY_MAX_DIMS]#
Per-dimension element counts; trailing unused slots are zero.
-
inline shape_t()#