legate::ManualTask#
-
class ManualTask#
A class for manually parallelized task descriptors.
Public Functions
-
void add_input(LogicalStore store)#
Adds a store to the task as input.
The store will be unpartitioned but broadcasted to all the tasks
- Parameters:
store – A store to add to the task as input
- void add_input(
- LogicalStorePartition store_partition,
- std::optional<SymbolicPoint> projection = std::nullopt
Adds a store partition to the task as input.
- Parameters:
store_partition – A store partition to add to the task as input
projection – An optional symbolic point describing a mapping between points in the launch domain and substores in the partition
-
void add_output(LogicalStore store)#
Adds a store to the task as output.
The store will be unpartitioned but broadcasted to all the tasks
- Parameters:
store – A store to add to the task as output
- void add_output(
- LogicalStorePartition store_partition,
- std::optional<SymbolicPoint> projection = std::nullopt
Adds a store partition to the task as output.
- Parameters:
store_partition – A store partition to add to the task as output
projection – An optional symbolic point describing a mapping between points in the launch domain and substores in the partition
-
void add_reduction(LogicalStore store, ReductionOpKind redop_kind)#
Adds a store to the task for reductions.
The store will be unpartitioned but broadcasted to all the tasks
- Parameters:
store – A store to add to the task for reductions
redop_kind – ID of the reduction operator to use. The store’s type must support the operator.
-
void add_reduction(LogicalStore store, std::int32_t redop_kind)#
Adds a store to the task for reductions.
The store will be unpartitioned but broadcasted to all the tasks
- Parameters:
store – A store to add to the task for reductions
redop_kind – ID of the reduction operator to use. The store’s type must support the operator.
- void add_reduction(
- LogicalStorePartition store_partition,
- ReductionOpKind redop_kind,
- std::optional<SymbolicPoint> projection = std::nullopt
Adds a store partition to the task for reductions.
- Parameters:
store_partition – A store partition to add to the task for reductions
redop_kind – ID of the reduction operator to use. The store’s type must support the operator.
projection – An optional symbolic point describing a mapping between points in the launch domain and substores in the partition
- void add_reduction(
- LogicalStorePartition store_partition,
- std::int32_t redop_kind,
- std::optional<SymbolicPoint> projection = std::nullopt
Adds a store partition to the task for reductions.
- Parameters:
store_partition – A store partition to add to the task for reductions
redop_kind – ID of the reduction operator to use. The store’s type must support the operator.
projection – An optional symbolic point describing a mapping between points in the launch domain and substores in the partition
-
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.
-
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#
-
void add_input(LogicalStore store)#