CoreFlow 1.0.0
A modern orchestration and execution runtime
|
#include <vx_context.h>
Public Member Functions | |
Context () | |
Construct a new Context object. | |
Context (const Context &)=delete | |
Delete copy constructor and assignment operator to prevent copying. | |
Context & | operator= (const Context &)=delete |
~Context () | |
Destroy the Context object. | |
vx_uint16 | vendorId () const |
Get vendor id. | |
vx_uint16 | version () const |
Get version number. | |
vx_uint32 | numModules () const |
Get number of loaded modules. | |
vx_uint32 | numReferences () const |
Get number of references. | |
const vx_char * | implName () const |
Get the implementation name. | |
const vx_char * | extensions () const |
Get the names of the extensions supported. | |
vx_size | convolutionMaxDim () const |
Get the max dimensions of a convolution supported. | |
vx_size | nonLinearMaxDim () const |
Get the max dimensions of a non linear supported. | |
vx_size | opticalFlowMaxWindowDim () const |
Get the optical flow max window dimension supported. | |
vx_border_t | immediateBorder () const |
Get the immediate border. | |
vx_enum | immediateBorderPolicy () const |
Get the immediate border policy. | |
vx_uint32 | numUniqueKernels () const |
Get the number of unique kernels. | |
vx_size | maxTensorDims () const |
Get the max tensor dimensions supported. | |
std::vector< vx_kernel_info_t > | uniqueKernelTable () |
Get the unique kernel information. | |
void | setLoggingEnabled (vx_bool flag) |
Set the logging enabled state. | |
void | setPerfEnabled (vx_bool flag) |
Set the perf enabled state. | |
vx_target * | findTargetByString (const char *target_string) |
Find target by string. | |
vx_status | loadTarget (const vx_char *targetName) |
This allows the implementation to load a target interface into OpenVX. | |
vx_status | unloadTarget (const vx_char *targetName) |
This unloads a specific target in the targets list. | |
vx_status | unloadTarget (vx_uint32 index, vx_bool unload_module) |
This unloads a specific target in the targets list. | |
vx_bool | addAccessor (vx_size size, vx_enum usage, void *&ptr, vx_reference ref, vx_uint32 *pIndex, void *extra_data) |
Searches the accessors list to find an open spot and then will allocate memory if needed. | |
void | removeAccessor (vx_uint32 index) |
Finds and removes an accessor from the list. | |
vx_bool | findAccessor (const void *ptr, vx_uint32 *pIndex) |
Finds the accessor in the list and returns the index. | |
vx_bool | addReference (const vx_reference &ref) |
Used to add a reference to the context. | |
vx_bool | removeReference (vx_reference &ref) |
Used to remove a reference from the context. | |
vx_bool | memoryMap (vx_reference ref, vx_size size, vx_enum usage, vx_enum mem_type, vx_uint32 flags, void *extra_data, void **ptr, vx_map_id *map_id) |
Searches the memory maps list to find an open slot and allocate memory for mapped buffer. | |
vx_bool | findMemoryMap (vx_reference ref, vx_map_id map_id) |
Checks the consistency of given ref & map_id by looking into memory maps list. | |
void | memoryUnmap (vx_uint32 map_id) |
Finds and removes a map_id from the list. | |
vx_enum | registerUserStruct (vx_size size) |
Register a user struct with a certain number of bytes. | |
vx_enum | getUserStructByName (const vx_char *name) |
Get the User Struct By Name object. | |
vx_status | getUserStructNameByEnum (vx_enum user_struct_type, vx_char *type_name, vx_size name_size) |
Get the User Struct Name By Enum object. | |
vx_status | getUserStructEnumByName (const vx_char *type_name, vx_enum *user_struct_type) |
Get the User Struct Enum By Name object. | |
vx_enum | registerUserStructWithName (vx_size size, const vx_char *type_name) |
Register user struct with name. | |
vx_status | allocateKernelId (vx_enum *pKernelEnumId) |
Allocate a unique kernel id. | |
vx_status | allocateLibraryId (vx_enum *pLibraryId) |
Allocate a unique library id. | |
vx_status | setImmediateModeTarget (vx_enum target_enum, const char *target_string) |
Set the Immediate Mode Target. | |
vx_uint32 | refCount () const |
Returns the reference count of the object. | |
vx_enum | dataType () const |
Returns the type of the reference. | |
const vx_char * | refName () const |
Returns the name of the reference. | |
void | setName (const vx_char *name) |
Sets the name of the reference. | |
vx_uint32 | incrementReference (vx_reftype_e refType) |
Increments the ref count. | |
vx_uint32 | decrementReference (vx_reftype_e refType) |
Decrements the ref count. | |
vx_uint32 | totalReferenceCount () |
Returns the total reference count of the object. | |
void | initReferenceForDelay (vx_delay delay, vx_int32 index) |
Used to initialize any vx_reference as a delay element. | |
virtual void | destruct () |
Destruct reference. | |
Static Public Member Functions | |
static vx_context | createContext () |
Create a new context. | |
static vx_bool | isValidContext (vx_context context) |
This determines if a context is valid. | |
static vx_bool | isValidType (vx_enum type) |
This returns true if the type is within the definition of types in OpenVX. | |
static vx_bool | isValidImport (vx_enum type) |
This determines if the import type is supported. | |
static vx_bool | isValidBorderMode (vx_enum mode) |
Validate border mode supported. | |
static vx_reference | createReference (vx_context context, vx_enum type, vx_reftype_e refType, vx_reference scope) |
Used to create a reference. | |
static void | printReference (vx_reference ref) |
Prints the values of a reference. | |
static vx_bool | isValidReference (vx_reference ref) |
Used to validate everything but vx_context, vx_image and vx_buffer. | |
static vx_bool | isValidReference (vx_reference ref, vx_enum type) |
Used to validate everything but vx_context, vx_image and vx_buffer. | |
static vx_size | sizeOfType (vx_enum type) |
Returns the number of bytes in the internal structure for a given type. | |
static vx_status | releaseReference (vx_reference *ref, vx_enum type, vx_reftype_e reftype, vx_destructor_f special_destructor) |
Used to destroy a reference. | |
Public Attributes | ||
vx_sem_t * | p_global_lock | |
The pointer to process global lock. | ||
vx_reference | reftable [VX_INT_MAX_REF] | |
The reference table which contains the handle for later garage collection if needed. | ||
vx_uint32 | num_references | |
The number of references in the table. | ||
vx_module_t | modules [VX_INT_MAX_MODULES] | |
The array of kernel modules. | ||
vx_uint32 | num_modules | |
The number of kernel libraries loaded. | ||
vx_processor_t | proc | |
The graph queue processor. | ||
vx_uint32 | num_kernels | |
The combined number of unique kernels in the system. | ||
vx_uint32 | num_unique_kernels | |
The number of unique kernels. | ||
vx_uint32 | num_targets | |
The number of available targets in the implementation. | ||
vx_target | targets [VX_INT_MAX_NUM_TARGETS] | |
The list of implemented targets. | ||
vx_uint32 | priority_targets [VX_INT_MAX_NUM_TARGETS] | |
The list of priority sorted target indexes. | ||
vx_log_callback_f | log_callback | |
The log callback for errors. | ||
vx_sem_t | log_lock | |
The log semaphore. | ||
vx_bool | log_enabled | |
The log enable toggle. | ||
vx_bool | log_reentrant | |
If true the log callback is reentrant and doesn't need to be locked. | ||
vx_bool | perf_enabled | |
The performance counter enable toggle. | ||
vx_external_t | accessors [VX_INT_MAX_REF] | |
The list of externally accessed references. | ||
vx_sem_t | memory_maps_lock | |
The memory mapping table lock. | ||
vx_memory_map_t | memory_maps [VX_INT_MAX_REF] | |
The list of memory maps. | ||
struct { | ||
vx_enum type | ||
Type constant. More... | ||
vx_size size | ||
Size in bytes. More... | ||
vx_char name [VX_MAX_STRUCT_NAME] | ||
Name. More... | ||
} | user_structs [VX_INT_MAX_USER_STRUCTS] | |
The list of user defined structs. | ||
vx_threadpool_t * | workers | |
The worker pool used to parallelize the graph. | ||
vx_border_t | imm_border | |
The immediate mode border. | ||
vx_enum | imm_border_policy | |
The unsupported border mode policy for immediate mode functions. | ||
vx_uint32 | next_dynamic_user_kernel_id | |
The next available dynamic user kernel ID. | ||
vx_uint32 | next_dynamic_user_library_id | |
The next available dynamic user library ID. | ||
vx_enum | imm_target_enum | |
The immediate mode enumeration. | ||
vx_char | imm_target_string [VX_MAX_TARGET_NAME] | |
The immediate mode target string. | ||
vx_value_set_t | graph_queue [VX_INT_MAX_QUEUE_DEPTH] | |
The graph queue for the context. | ||
vx_size | numGraphsQueued | |
The number of graphs in the queue. | ||
const vx_uint16 | vendor_id | |
The vendor id. | ||
const vx_uint16 | version_number | |
The version number this implements. | ||
const vx_char | implementation [VX_MAX_IMPLEMENTATION_NAME] | |
The implementation string which is of the format "<vendor>.<substring>". | ||
const vx_char * | extension | |
The name of additional extensions in this impleemntation. | ||
struct _vx_platform * | platform | |
Platform for ICD compatibility. | ||
vx_uint32 | magic | |
Used to validate references, must be set to VX_MAGIC. | ||
vx_context | context | |
Pointer to the top level context. If this reference is the context, this will be NULL. | ||
vx_reference | scope | |
The pointer to the object's scope parent. When virtual objects are scoped within a graph, this will point to that parent graph. This is left generic to allow future scoping variations. By default scope should be the same as context. | ||
vx_uint32 | external_count | |
The count of the number of users with this reference. When greater than 0, this can not be freed. When zero, the value can be considered inaccessible. | ||
vx_uint32 | internal_count | |
The count of the number of framework references. When greater than 0, this can not be freed. | ||
vx_uint32 | read_count | |
The number of times the object has been read (in some portion) | ||
vx_uint32 | write_count | |
The number of times the object has been written to (in some portion) | ||
vx_sem_t | lock | |
The reference lock which is used to protect access to "in-fly" data. | ||
void * | reserved | |
A reserved field which can be used to store anonymous data. | ||
vx_uint32 | index | |
A field which can be used to store a temporary, per-graph index. | ||
vx_bool | extracted | |
This indicates if the object was extracted from another object. | ||
vx_bool | is_virtual | |
This indicates if the object is virtual or not. | ||
vx_delay | delay | |
vx_int32 | delay_slot_index | |
vx_bool | is_accessible | |
This indicates that if the object is virtual whether it is accessible at the moment or not. | ||
vx_external_t coreflow::Context::accessors[VX_INT_MAX_REF] |
The list of externally accessed references.
|
inherited |
Pointer to the top level context. If this reference is the context, this will be NULL.
|
inherited |
|
inherited |
const vx_char* coreflow::Context::extension |
The name of additional extensions in this impleemntation.
|
inherited |
The count of the number of users with this reference. When greater than 0, this can not be freed. When zero, the value can be considered inaccessible.
|
inherited |
This indicates if the object was extracted from another object.
vx_value_set_t coreflow::Context::graph_queue[VX_INT_MAX_QUEUE_DEPTH] |
The graph queue for the context.
vx_border_t coreflow::Context::imm_border |
The immediate mode border.
vx_enum coreflow::Context::imm_border_policy |
The unsupported border mode policy for immediate mode functions.
vx_enum coreflow::Context::imm_target_enum |
The immediate mode enumeration.
vx_char coreflow::Context::imm_target_string[VX_MAX_TARGET_NAME] |
The immediate mode target string.
const vx_char coreflow::Context::implementation[VX_MAX_IMPLEMENTATION_NAME] |
The implementation string which is of the format "<vendor>.<substring>".
|
inherited |
A field which can be used to store a temporary, per-graph index.
|
inherited |
The count of the number of framework references. When greater than 0, this can not be freed.
|
inherited |
This indicates that if the object is virtual whether it is accessible at the moment or not.
|
inherited |
This indicates if the object is virtual or not.
|
inherited |
The reference lock which is used to protect access to "in-fly" data.
vx_log_callback_f coreflow::Context::log_callback |
The log callback for errors.
vx_bool coreflow::Context::log_enabled |
The log enable toggle.
vx_sem_t coreflow::Context::log_lock |
The log semaphore.
vx_bool coreflow::Context::log_reentrant |
If true the log callback is reentrant and doesn't need to be locked.
|
inherited |
Used to validate references, must be set to VX_MAGIC.
vx_memory_map_t coreflow::Context::memory_maps[VX_INT_MAX_REF] |
The list of memory maps.
vx_sem_t coreflow::Context::memory_maps_lock |
The memory mapping table lock.
vx_module_t coreflow::Context::modules[VX_INT_MAX_MODULES] |
The array of kernel modules.
vx_char coreflow::Context::name[VX_MAX_STRUCT_NAME] |
Name.
vx_uint32 coreflow::Context::next_dynamic_user_kernel_id |
The next available dynamic user kernel ID.
vx_uint32 coreflow::Context::next_dynamic_user_library_id |
The next available dynamic user library ID.
vx_uint32 coreflow::Context::num_kernels |
The combined number of unique kernels in the system.
vx_uint32 coreflow::Context::num_modules |
The number of kernel libraries loaded.
vx_uint32 coreflow::Context::num_references |
The number of references in the table.
vx_uint32 coreflow::Context::num_targets |
The number of available targets in the implementation.
vx_uint32 coreflow::Context::num_unique_kernels |
The number of unique kernels.
vx_size coreflow::Context::numGraphsQueued |
The number of graphs in the queue.
vx_sem_t* coreflow::Context::p_global_lock |
The pointer to process global lock.
vx_bool coreflow::Context::perf_enabled |
The performance counter enable toggle.
|
inherited |
Platform for ICD compatibility.
vx_uint32 coreflow::Context::priority_targets[VX_INT_MAX_NUM_TARGETS] |
The list of priority sorted target indexes.
vx_processor_t coreflow::Context::proc |
The graph queue processor.
|
inherited |
The number of times the object has been read (in some portion)
vx_reference coreflow::Context::reftable[VX_INT_MAX_REF] |
The reference table which contains the handle for later garage collection if needed.
|
inherited |
A reserved field which can be used to store anonymous data.
|
inherited |
The pointer to the object's scope parent. When virtual objects are scoped within a graph, this will point to that parent graph. This is left generic to allow future scoping variations. By default scope should be the same as context.
vx_size coreflow::Context::size |
Size in bytes.
vx_target coreflow::Context::targets[VX_INT_MAX_NUM_TARGETS] |
The list of implemented targets.
vx_enum coreflow::Context::type |
Type constant.
struct { ... } coreflow::Context::user_structs[VX_INT_MAX_USER_STRUCTS] |
The list of user defined structs.
const vx_uint16 coreflow::Context::vendor_id |
The vendor id.
const vx_uint16 coreflow::Context::version_number |
The version number this implements.
vx_threadpool_t* coreflow::Context::workers |
The worker pool used to parallelize the graph.
|
inherited |
The number of times the object has been written to (in some portion)