legate::PhysicalArray#

class PhysicalArray#

A multi-dimensional array abstraction for fixed- or variable-size elements.

PhysicalArrays can be backed by one or more PhysicalStores, depending on their types.

Subclassed by legate::ListPhysicalArray, legate::StringPhysicalArray

Public Functions

bool nullable() const noexcept#

Indicates if the array is nullable.

Returns:

true if the array is nullable, false otherwise

std::int32_t dim() const noexcept#

Returns the dimension of the array.

Returns:

Array’s dimension

Type type() const noexcept#

Returns the array’s Type

Returns:

Type

bool nested() const noexcept#

Indicates if the array has child arrays.

Returns:

true if the array has child arrays, false otherwise

PhysicalStore data() const#

Returns the store containing the array’s data.

Throws:

std::invalid_argument – If the array is not a base array

Returns:

PhysicalStore

PhysicalStore null_mask() const#

Returns the store containing the array’s null mask.

Throws:

std::invalid_argument – If the array is not nullable

Returns:

PhysicalStore

PhysicalArray child(std::uint32_t index) const#

Returns the sub-array of a given index.

Parameters:

index – Sub-array index

Throws:
  • std::invalid_argument – If the array has no child arrays

  • std::out_of_range – If the index is out of range

Returns:

Sub-PhysicalArray at the given index

template<std::int32_t DIM>
Rect<DIM> shape() const#

Returns the array’s shape.

Returns:

Array’s shape

Domain domain() const#

Returns the array’s Domain

Returns:

Array’s Domain

ListPhysicalArray as_list_array() const#

Casts this array as a ListPhysicalArray

Throws:

std::invalid_argument – If the array is not a list array

Returns:

This array as a ListPhysicalArray

StringPhysicalArray as_string_array() const#

Casts this array as a StringPhysicalArray

Throws:

std::invalid_argument – If the array is not a string array

Returns:

This array as a StringPhysicalArray