Embedded Multicore Building Blocks V1.0.0
|
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... | |
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).
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. |
job_id
, invalid handle on error [in] | job_id | Job id |
[in] | domain_id | Domain id |
[out] | status | Pointer 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. |
[in] | job | Action handle |
[in] | attribute_num | Attribute id |
[in] | attribute | Pointer to attribute value |
[in] | attribute_size | Size of attribute value. may be 0, attribute is interpreted as value in that case |
[out] | status | Pointer to error code, may be MTAPI_NULL |