legate.core.task.PyTask.omp_variant#

PyTask.omp_variant(self, func: UserFunction)#

Register an OpenMP variant for this task

Parameters:

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

Returns:

func unmodified.

Return type:

UserFunction

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.