alf_accel_output_dtl_prepare

NAME

alf_accel_output_dtl_prepare - Defines the partition of output data.

SYNOPSIS

int alf_accel_output_dtl_prepare (void* p_task_context, void *p_parm_ctx_buffer, void *p_io_container, unsigned int current_iter, unsigned int num_iter);

Parameters  
p_task_context[IN] Pointer to the task context buffer in accelerator memory.
p_parm_ctx_buffer[IN] Pointer to the work block parameter context in accelerator memory.
p_dt_list_buffer[IN] Pointer to the buffer where the generated data transfer list should be saved.
current_iter[IN] The current iteration count of multi-use work blocks. This value starts at 0. For single-use work blocks, this value is always 0.
num_iter[IN] The total number of iterations of multi-use work blocks. For single-use work blocks, this value is always 1.

DESCRIPTION

This function is called by the ALF runtime when it needs the accelerator to define the partition of output data. Because the ALF may be doing double buffering, the function should only refer to the information provided by the p_parm_ctx_buffer. This function generates the data transfer lists for the output buffer (ALF_BUF_OUT) and the overlapped output buffer (ALF_BUF_OVL_OUT) when these buffers are enabled.

This function is only called if the task descriptor sets the ALF_TASK_DESC_PARTITION_ON_ACCEL to true. When this attribute is not set or set false, you can choose not to implement this API when the programming environment supports weak link or to implement an empty function that return zero when weak link is not supported.

RETURN VALUE

0 The computation finished correctly.
less than 0 An error occurred during the call. The error code is passed back to you to be handled.