Computational kernel

A computational kernel is a user-defined accelerator routine that takes a given set of input data and returns the output data based on the given input.

You should implement the computational kernel according to the function prototype definitions with the data in the provided buffers (see Accelerator buffer management). Then the computational kernel must be registered to the ALF runtime when the corresponding task descriptor is created.

The computational kernel is usually accompanied by four other auxiliary functions. The five of them forms a 5-tuple for a task as:
{
alf_accel_comp_kernel, 
alf_accel_input_dtl_prepare, 
alf_accel_output_dtl_prepare, 
alf_accel_task_context_setup, 
alf_accel_task_context_merge
}
Note: The above accelerator function names are used as conventions for this document only. You can provide your own function name for each of these functions and register the function name through the task descriptor service.

Based on the different application requirements, some of the elements in this 5-tuple can be NULL.

For more information about the APIs that define computational kernels, see User-provided computational kernel APIs.