fastscapelib.flow.numba.flow_kernel.NumbaFlowKernel¶
- class fastscapelib.flow.numba.flow_kernel.NumbaFlowKernel(kernel, func, apply_dir, outputs, n_threads, generated_code, generated_spec, node_data_create, node_data_init, node_data_getter, node_data_setter, node_data_free)¶
Immutable Proxy object representing a numba jit-compiled flow kernel function.
It is returned by
create_flow_kernel()and required byapply_kernel()alongside theNumbaFlowKernelDatamapping object.- kernel¶
An internal object used to pass and execute the flow kernel either from C++ or from numba jit-compiled code.
- Type:
- func¶
The numba-compiled kernel function, which accepts one argument (the kernel’s node data as an instance of a numba jit-compiled class).
- Type:
callable
- apply_dir¶
The direction and order in which the flow kernel will be applied along the graph.
- Type:
- n_threads¶
Number of threads to use for applying the kernel function in parallel along the flow graph (if equal to 1, the kernel is applied sequentially).
- Type:
- generated_code¶
A dictionary with the source code generated for each of the functions below.
- Type:
- generated_spec¶
The numba types of the attributes of the jit-compiled classes used by the kernel.
- Type:
- node_data_create¶
Internal numba compiled function used to create the kernel’s node data object (one instance per each thread).
- Type:
callable
- node_data_init¶
Internal numba jit-compiled function used to initialize node data scalar values.
- Type:
callableorNone
- node_data_getter¶
Internal numba jit-compiled function used to get grid data values at the current node, its receivers and its donors.
- Type:
callable
- node_data_setter¶
Internal numba jit-compiled function used to set grid data values from the kernel’s data at the current node, its receivers and its donors.
- Type:
callable
- __init__(kernel, func, apply_dir, outputs, n_threads, generated_code, generated_spec, node_data_create, node_data_init, node_data_getter, node_data_setter, node_data_free)¶
Methods
__init__(kernel, func, apply_dir, outputs, ...)Attributes