legate.core.task.PyTask.omp_variant#

PyTask.omp_variant(self, func: UserFunction) void#

Register an OpenMP variant for this task

Parameters:

func (UserFunction) – The new OpenMP variant function to call for all OpenMP executions.

Raises:

RuntimeError – If the task has already completed registration.

Notes

Calling this method on a task with an existing OpenMP variant replaces the old variant with func. Therefore, this method may be used to update variants as well as add new ones.