alf_task_dataset_associate

NAME

alf_task_dataset_associate - Associates a given task with a dataset.

SYNOPSIS

int alf_task_dataset_associate(alf_task_handle_t task, alf_dataset_handle_t dataset);

Parameters  
dataset_handle Handle to dataset
task_handle Handle to the task

DESCRIPTION

This function associates a given task with a dataset. This function can only be called before any work block is enqueued for the task. After a task is associated with a dataset, all subsequent work blocks created and enqueued for this task cannot reference data outside the dataset.

After a task is associated with a dataset, further calls to alf_data_buffer_add results in error.

After a task is associated with a dataset, the host application program can only use the data after alf_task_wait is called and returned.

RETURN VALUE

0 Success
less than 0 Errors occurred:
  • ALF_ERR_INVAL: Invalid input argument
  • ALF_ERR_BADF: Invalid ALF handle
  • ALF_ERR_PERM: The API call is not permitted with the current calling context. The dataset has been associated with a task and thus closed from further buffer additions.
  • ALF_ERR_SRCH: Already destroyed task handle
  • ALF_ERR_GENERIC: Generic internal errors
Related reference
alf_dataset_handle_t
alf_dataset_create
alf_dataset_buffer_add
alf_dataset_destroy