legate::AutoTask#
-
class AutoTask#
A class for auto-parallelized task descriptors.
Public Functions
-
Variable add_input(LogicalArray array)#
Adds an array to the task as input.
Partitioning of the array is controlled by constraints on the partition symbol associated with the array
- Parameters:
array – An array to add to the task as input
- Returns:
The partition symbol assigned to the array
-
Variable add_output(LogicalArray array)#
Adds an array to the task as output.
Partitioning of the array is controlled by constraints on the partition symbol associated with the array
- Parameters:
array – An array to add to the task as output
- Returns:
The partition symbol assigned to the array
- Variable add_reduction(
- LogicalArray array,
- ReductionOpKind redop_kind
Adds an array to the task for reductions.
Partitioning of the array is controlled by constraints on the partition symbol associated with the array
- Parameters:
array – An array to add to the task for reductions
redop_kind – ID of the reduction operator to use. The array’s type must support the operator.
- Returns:
The partition symbol assigned to the array
-
Variable add_reduction(LogicalArray array, std::int32_t redop_kind)#
Adds an array to the task for reductions.
Partitioning of the array is controlled by constraints on the partition symbol associated with the array
- Parameters:
array – An array to add to the task for reductions
redop_kind – ID of the reduction operator to use. The array’s type must support the operator.
- Returns:
The partition symbol assigned to the array
-
Variable add_input(LogicalArray array, Variable partition_symbol)#
Adds an array to the task as input.
Partitioning of the array is controlled by constraints on the partition symbol associated with the array
- Parameters:
array – An array to add to the task as input
partition_symbol – A partition symbol for the array
- Returns:
The partition symbol assigned to the array
-
Variable add_output(LogicalArray array, Variable partition_symbol)#
Adds an array to the task as output.
Partitioning of the array is controlled by constraints on the partition symbol associated with the array
- Parameters:
array – An array to add to the task as output
partition_symbol – A partition symbol for the array
- Returns:
The partition symbol assigned to the array
- Variable add_reduction(
- LogicalArray array,
- ReductionOpKind redop_kind,
- Variable partition_symbol
Adds an array to the task for reductions.
Partitioning of the array is controlled by constraints on the partition symbol associated with the array
- Parameters:
array – An array to add to the task for reductions
redop_kind – ID of the reduction operator to use. The array’s type must support the operator.
partition_symbol – A partition symbol for the array
- Returns:
The partition symbol assigned to the array
- Variable add_reduction(
- LogicalArray array,
- std::int32_t redop_kind,
- Variable partition_symbol
Adds an array to the task for reductions.
Partitioning of the array is controlled by constraints on the partition symbol associated with the array
- Parameters:
array – An array to add to the task for reductions
redop_kind – ID of the reduction operator to use. The array’s type must support the operator.
partition_symbol – A partition symbol for the array
- Returns:
The partition symbol assigned to the array
-
void add_scalar_arg(const Scalar &scalar)#
Adds a by-value scalar argument to the task.
- Parameters:
scalar – The Scalar to add to the task
-
template<typename T, typename = std::enable_if_t<!std::is_same_v<std::decay_t<T>, Scalar> && std::is_constructible_v<Scalar, T>>>
void add_scalar_arg( - T &&value
Adds a by-value scalar argument to the task.
-
void add_constraint(const Constraint &constraint)#
Adds a partitioning constraint to the task.
- Parameters:
constraint – A partitioning constraint
-
Variable find_or_declare_partition(const LogicalArray &array)#
Finds or creates a partition symbol for the given array.
- Parameters:
array – Array for which the partition symbol is queried
- Returns:
The existing symbol if there is one for the array, a fresh symbol otherwise
-
Variable declare_partition()#
Declares partition symbol.
- Returns:
A new symbol that can be used when passing an array to an operation
-
std::string_view provenance() const#
Returns the provenance information of this operation.
- Returns:
Provenance
-
void set_concurrent(bool concurrent)#
Sets whether the task needs a concurrent task launch.
Any task with at least one communicator will implicitly use concurrent task launch, so this method is to be used when the task needs a concurrent task launch for a reason unknown to Legate.
- Parameters:
concurrent – A boolean value indicating whether the task needs a concurrent task launch
-
void set_side_effect(bool has_side_effect)#
Sets whether the task has side effects or not.
A task is assumed to be free of side effects by default if the task only has scalar arguments.
- Parameters:
has_side_effect – A boolean value indicating whether the task has side effects
-
void throws_exception(bool can_throw_exception)#
Sets whether the task can throw an exception or not.
- Parameters:
can_throw_exception – A boolean value indicating whether the task can throw an exception
-
void add_communicator(std::string_view name)#
Requests a communicator for this task.
- Parameters:
name – The name of the communicator to use for this task
-
class Impl#
-
Variable add_input(LogicalArray array)#