nlcpy.jit.CustomVEKernel

class nlcpy.jit.CustomVEKernel(func, ve_lib)[source]

Custom VE kernel class.

This class provides simple wrapper functionality related to execution of a VE function.

Parameters
funcnlcpy.veo.VeoFunction

VE function.

Note

The instance of this class can be retrieved from nlcpy.jit.CustomVELibrary.get_function().

Methods

__call__(*args, callback=None, sync=False)[source]

Invokes the VE function.

Parameters
*argsvariable length arguments

Arguments of the VE function.

callbackfunction

Callback function that will be executed after the completion of the VE function call. For details, please refer to the Callback Setting. Defaults to None that means do nothing.

syncbool

Whether synchronize function call or not. If set to True, this function will return the return value of the VE function. The data type of it depends on ret_type of the nlcpy.jit.CustomVELibrary.get_function(). If set to False, it will return None. Defaults to False.

__eq__(value, /)

Return self==value.

__ne__(value, /)

Return self!=value.

__lt__(value, /)

Return self<value.

__le__(value, /)

Return self<=value.

__gt__(value, /)

Return self>value.

__ge__(value, /)

Return self>=value.