Embedded Multicore Building Blocks V1.0.0
Classes | Functions

Jobs implementing one or more actions. More...

Classes

struct  mtapi_job_hndl_struct
 Job handle. More...
 
struct  mtapi_ext_job_attributes_struct
 Job attributes. More...
 

Functions

mtapi_job_hndl_t mtapi_job_get (const mtapi_job_id_t job_id, const mtapi_domain_t domain_id, mtapi_status_t *status)
 Given a job_id, this function returns the MTAPI handle for referencing the actions implementing the job. More...
 
void mtapi_ext_job_set_attribute (MTAPI_IN mtapi_job_hndl_t job, MTAPI_IN mtapi_uint_t attribute_num, MTAPI_IN void *attribute, MTAPI_IN mtapi_size_t attribute_size, MTAPI_OUT mtapi_status_t *status)
 This function changes the value of the attribute that corresponds to the given attribute_num for this job. More...
 

Detailed Description

Jobs implementing one or more actions.

An action is a hardware or software implementation of a job. In some cases, an action is referenced by an action handle, while in other cases, an action is referenced indirectly through a job handle. Each job is represented by a domain-wide job ID, or by a job handle which is local to one node.

Several actions can implement the same job based on different hardware resources (for instance a job can be implemented by one action on a DSP and by another action on a general purpose core, or a job can be implemented by both hardware and software actions).

Function Documentation

mtapi_job_hndl_t mtapi_job_get ( const mtapi_job_id_t  job_id,
const mtapi_domain_t  domain_id,
mtapi_status_t *  status 
)

Given a job_id, this function returns the MTAPI handle for referencing the actions implementing the job.

This function converts a domain-wide job ID into a node-local job handle.

On success, the action handle is returned and *status is set to MTAPI_SUCCESS. On error, *status is set to the appropriate error defined below.

Error code Description
MTAPI_ERR_JOB_INVALID The job ID does not refer to a valid action.
MTAPI_ERR_DOMAIN_NOTSHARED The resource can't be shared by this domain.
MTAPI_ERR_NODE_NOTINIT The calling node is not initialized.
Returns
Handle to job with given job_id, invalid handle on error
Concurrency
Thread-safe
Parameters
[in]job_idJob id
[in]domain_idDomain id
[out]statusPointer to error code, may be MTAPI_NULL
void mtapi_ext_job_set_attribute ( MTAPI_IN mtapi_job_hndl_t  job,
MTAPI_IN mtapi_uint_t  attribute_num,
MTAPI_IN void *  attribute,
MTAPI_IN mtapi_size_t  attribute_size,
MTAPI_OUT mtapi_status_t *  status 
)

This function changes the value of the attribute that corresponds to the given attribute_num for this job.

attribute must point to the attribute value, and attribute_size must be set to the exact size of the attribute value.

MTAPI-defined action attributes:

Attribute num Description Data Type Default
MTAPI_JOB_PROBLEM_SIZE_FUNCTION Function to calculate the relative problem size of tasks started on this job. mtapi_ext_problem_size_function_t MTAPI_NULL
MTAPI_JOB_DEFAULT_PROBLEM_SIZE Indicates the default relative problem size of tasks started on this job mtapi_uint_t 1

On success, *status is set to MTAPI_SUCCESS. On error, *status is set to one of the errors defined below.

Error code Description
MTAPI_ERR_PARAMETER Invalid attribute parameter.
MTAPI_ERR_JOB_INVALID Argument is not a valid job handle.
MTAPI_ERR_ATTR_NUM Unknown attribute number.
MTAPI_ERR_ATTR_SIZE Incorrect attribute size.
MTAPI_ERR_NODE_NOTINIT The calling node is not initialized.
Concurrency
Not thread-safe
Parameters
[in]jobAction handle
[in]attribute_numAttribute id
[in]attributePointer to attribute value
[in]attribute_sizeSize of attribute value. may be 0, attribute is interpreted as value in that case
[out]statusPointer to error code, may be MTAPI_NULL