Shape#

A Shape is used in expressing the shape of a certain entity in Legate. The reason Legate introduces this indirection to the shape metadata is that stores in Legate can have unknown shapes at creation time; the shape of an unbound store is determined only when the producer task finishes. The shape object can help the runtime query the store’s metadata or construct another store isomorphic to the store without getting blocked.

Shape objects should behave just like an array of integers, but operations that introspect the values implicitly block on completion of the producer task.

Shape.__init__(*args, **kwargs)

Properties#

Shape.extents

tuple[uint64_t, ...]

Shape.ndim

uint32_t

Shape.volume

uint64_t

Shape.__getitem__

Returns the extent of a given dimension

Shape.__len__

Returns the number of dimensions of this shape