alf_wb_create - Creates a new work block for the specified compute task.
int alf_wb_create(alf_task_handle_t task_handle, ALF_WORK_BLOCK_TYPE_T work_block_type, unsigned int repeat_count, alf_wb_handle_t *p_wb_handle);
Parameters | |
p_wb_handle [OUT] | The pointer to a buffer where the created handle is returned. The contents are not modified if this call fails. |
task_handle [IN] | The handle to the compute task. |
work_block_type [IN] | The type of work block to be created. Choose from the
following types:
|
repeat_count [IN] | Specifies the number of iterations for a multi-use work block. This parameter is ignored when a single-use work block is created. |
This function creates a new work block for the specified computing task. The work block is added to the work queue of the task and the runtime releases the allocated resources once the work block is processed. The caller can only update the contents of a work block before it is added to the work queue. After the work block is added to the work queue, the lifespan of the data structure is left to the ALF runtime. The ALF runtime is responsible for cleaning up any resource allocated for the work block. This API can only be called before alf_task_finalize is invoked. After the alf_task_finalize is called, further calls to this API return an error.
0 | Success. |
less than 0 | Errors occurred:
|