legate::ListLogicalArray#

class ListLogicalArray : public legate::LogicalArray#

Represents a logical array of variable-length lists.

Each element of the array is itself a list, potentially of different length. For example, a ListLogicalArray may represent:

[[a, b], [c], [d, e, f]]

This is stored using two arrays:

  1. A descriptor array that defines the start and end indices of each sublist within the value data array. The descriptor array is stored as a series of Rect<1>s, where lo and hi members indicate the start and end of each range.

  2. A value data array (vardata) containing all list elements in a flattened form.

For example:

descriptor: [ (0, 1), (2, 2), (3, 5) ]
vardata:    [ a, b, c, d, e, f ]

Where the mapping of descriptor to vardata follows:

descriptor     vardata
----------     --------------------
(0, 1)    ---> [ a, b ]
(2, 2)    --->        [ c ]
(3, 5)    --->            [ d, e, f ]

Note

The user can achieve the same effects of a ListLogicalArray themselves by applying an image constraint (image(Variable, Variable, ImageComputationHint)) to two LogicalArrays when passing them to a task. In that case descriptor would be var_function while vardata would be var_range.

Public Functions

LogicalArray descriptor() const#

Returns the sub-array for descriptors. Each element is a Rect<1> of start and end indices for each subregion in vardata.

Returns:

Sub-array’s for descriptors.

LogicalArray vardata() const#

Returns the sub-array for variable size data.

Returns:

LogicalArray of variable sized data.