Framework Components Application Programming Interface (API)  fc-v07
Data Fields
IRES_Fxns Struct Reference

These fxns are used to query/grant the resources requested by the algorithm at initialization time, and to change these resources at runtime. All these fxns are implemented by the algorithm, and called by the client of the algorithm. More...

#include <ires.h>

Collaboration diagram for IRES_Fxns:
Collaboration graph

Data Fields

Void * implementationId
 Unique pointer that identifies the module implementing this interface. More...
 
IRES_Status(* getResourceDescriptors )(IALG_Handle handle, IRES_ResourceDescriptor *resourceDescriptors)
 Query function to obtain the list of IRES resources requested by the algorithm instance. More...
 
Int32(* numResourceDescriptors )(IALG_Handle handle)
 Query function to obtain the number of IRES resources requested by the algorithm instance, which is also the number of resource descriptors that must be passed to the getResourceDescriptors() function. More...
 
IRES_Status(* initResources )(IALG_Handle handle, IRES_ResourceDescriptor *resourceDescriptor, IRES_YieldFxn yieldFxn, IRES_YieldArgs yieldArgs)
 Assignment function to grant the algorithm instance the list of IRES resources it requested. The algorithm can initialize internal instance memory with resource information, but may not use or access the resource state until the resource is activated via the activateResource call. More...
 
IRES_Status(* reinitResources )(IALG_Handle handle, IRES_ResourceDescriptor *resourceDescriptor, IRES_YieldFxn yieldFxn, IRES_YieldArgs yieldArgs)
 Re-assignment function to grant the algorithm instance a list of "modified" IRES resources. The algorithm may choose to not support the re-assignment and indicate this by returning failure. In case of success the algorithm updates its internal state to reflect the new resource information, but may not use or access the resource state until the resource is activated via the activateResource call. More...
 
IRES_Status(* deinitResources )(IALG_Handle handle, IRES_ResourceDescriptor *resourceDescriptor)
 Deinitialization function to revoke back the resources that have been granted to the algorithm instance. More...
 
IRES_Status(* activateResource )(IALG_Handle handle, IRES_Handle resourceHandle)
 Resource Activation call to grant the algorithm instance exclusive access to the potentially shared resource. Algorithm can now access, initialize and or restore from a previous context saved during deactivation to use the resource. Each resource must be activated individually to give the framework optimization opportunities by tracking and deciding which resources truely require activation. More...
 
IRES_Status(* activateAllResources )(IALG_Handle handle)
 Resource Activation call to grant the algorithm instance exclusive access to all resources it acquired via IRES. Algorithm can now access, initialize and or restore from a previous context saved during deactivation to use the resources. More...
 
IRES_Status(* deactivateResource )(IALG_Handle handle, IRES_Handle resourceHandle)
 Resource Deactivation call to revoke the algorithm instance's exclusive access to the potentially shared resource. Algorithm must save any context that is needed to restore the state during the next resource activation call. More...
 
IRES_Status(* deactivateAllResources )(IALG_Handle handle)
 Resource Deactivation call to revoke the algorithm instance's exclusive access to ALL shared resources. Algorithm must save any context that is needed to restore the state during the next resource activation call. More...
 

Detailed Description

These fxns are used to query/grant the resources requested by the algorithm at initialization time, and to change these resources at runtime. All these fxns are implemented by the algorithm, and called by the client of the algorithm.

Field Documentation

Void* IRES_Fxns::implementationId

Unique pointer that identifies the module implementing this interface.

IRES_Status(* IRES_Fxns::getResourceDescriptors) (IALG_Handle handle, IRES_ResourceDescriptor *resourceDescriptors)

Query function to obtain the list of IRES resources requested by the algorithm instance.

Int32(* IRES_Fxns::numResourceDescriptors) (IALG_Handle handle)

Query function to obtain the number of IRES resources requested by the algorithm instance, which is also the number of resource descriptors that must be passed to the getResourceDescriptors() function.

IRES_Status(* IRES_Fxns::initResources) (IALG_Handle handle, IRES_ResourceDescriptor *resourceDescriptor, IRES_YieldFxn yieldFxn, IRES_YieldArgs yieldArgs)

Assignment function to grant the algorithm instance the list of IRES resources it requested. The algorithm can initialize internal instance memory with resource information, but may not use or access the resource state until the resource is activated via the activateResource call.

Remarks
Version of the resource handle being granted is updated in the resourceDescriptor, and may be different from the one requested.
IRES_Status(* IRES_Fxns::reinitResources) (IALG_Handle handle, IRES_ResourceDescriptor *resourceDescriptor, IRES_YieldFxn yieldFxn, IRES_YieldArgs yieldArgs)

Re-assignment function to grant the algorithm instance a list of "modified" IRES resources. The algorithm may choose to not support the re-assignment and indicate this by returning failure. In case of success the algorithm updates its internal state to reflect the new resource information, but may not use or access the resource state until the resource is activated via the activateResource call.

IRES_Status(* IRES_Fxns::deinitResources) (IALG_Handle handle, IRES_ResourceDescriptor *resourceDescriptor)

Deinitialization function to revoke back the resources that have been granted to the algorithm instance.

IRES_Status(* IRES_Fxns::activateResource) (IALG_Handle handle, IRES_Handle resourceHandle)

Resource Activation call to grant the algorithm instance exclusive access to the potentially shared resource. Algorithm can now access, initialize and or restore from a previous context saved during deactivation to use the resource. Each resource must be activated individually to give the framework optimization opportunities by tracking and deciding which resources truely require activation.

IRES_Status(* IRES_Fxns::activateAllResources) (IALG_Handle handle)

Resource Activation call to grant the algorithm instance exclusive access to all resources it acquired via IRES. Algorithm can now access, initialize and or restore from a previous context saved during deactivation to use the resources.

IRES_Status(* IRES_Fxns::deactivateResource) (IALG_Handle handle, IRES_Handle resourceHandle)

Resource Deactivation call to revoke the algorithm instance's exclusive access to the potentially shared resource. Algorithm must save any context that is needed to restore the state during the next resource activation call.

IRES_Status(* IRES_Fxns::deactivateAllResources) (IALG_Handle handle)

Resource Deactivation call to revoke the algorithm instance's exclusive access to ALL shared resources. Algorithm must save any context that is needed to restore the state during the next resource activation call.


The documentation for this struct was generated from the following file:
Copyright 2016, Texas Instruments Incorporated