CoreFlow 1.0.0
A modern orchestration and execution runtime
Loading...
Searching...
No Matches
Internal Context API

The Internal Context API. More...

Namespaces

namespace  coreflow
 The internal representation of a vx_array.
 

Classes

struct  vx_processor_t
 The processor structure which contains the graph queue. More...
 
struct  vx_module_t
 The tracking structure for a module. More...
 
struct  vx_external_t
 The framework's internal-external memory tracking structure. More...
 
struct  vx_memory_map_t
 The framework's mapping memory tracking structure. More...
 

Functions

 coreflow::Context::Context ()
 Construct a new Context object.
 
 coreflow::Context::Context (const Context &)=delete
 Delete copy constructor and assignment operator to prevent copying.
 
 coreflow::Context::~Context ()
 Destroy the Context object.
 
static vx_context coreflow::Context::createContext ()
 Create a new context.
 
vx_uint16 coreflow::Context::vendorId () const
 Get vendor id.
 
vx_uint16 coreflow::Context::version () const
 Get version number.
 
vx_uint32 coreflow::Context::numModules () const
 Get number of loaded modules.
 
vx_uint32 coreflow::Context::numReferences () const
 Get number of references.
 
const vx_charcoreflow::Context::implName () const
 Get the implementation name.
 
const vx_charcoreflow::Context::extensions () const
 Get the names of the extensions supported.
 
vx_size coreflow::Context::convolutionMaxDim () const
 Get the max dimensions of a convolution supported.
 
vx_size coreflow::Context::nonLinearMaxDim () const
 Get the max dimensions of a non linear supported.
 
vx_size coreflow::Context::opticalFlowMaxWindowDim () const
 Get the optical flow max window dimension supported.
 
vx_border_t coreflow::Context::immediateBorder () const
 Get the immediate border.
 
vx_enum coreflow::Context::immediateBorderPolicy () const
 Get the immediate border policy.
 
vx_uint32 coreflow::Context::numUniqueKernels () const
 Get the number of unique kernels.
 
vx_size coreflow::Context::maxTensorDims () const
 Get the max tensor dimensions supported.
 
std::vector< vx_kernel_info_tcoreflow::Context::uniqueKernelTable ()
 Get the unique kernel information.
 
void coreflow::Context::setLoggingEnabled (vx_bool flag)
 Set the logging enabled state.
 
void coreflow::Context::setPerfEnabled (vx_bool flag)
 Set the perf enabled state.
 
static vx_bool coreflow::Context::isValidContext (vx_context context)
 This determines if a context is valid.
 
static vx_bool coreflow::Context::isValidType (vx_enum type)
 This returns true if the type is within the definition of types in OpenVX.
 
static vx_bool coreflow::Context::isValidImport (vx_enum type)
 This determines if the import type is supported.
 
vx_targetcoreflow::Context::findTargetByString (const char *target_string)
 Find target by string.
 
vx_bool coreflow::Context::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 coreflow::Context::removeAccessor (vx_uint32 index)
 Finds and removes an accessor from the list.
 
vx_bool coreflow::Context::findAccessor (const void *ptr, vx_uint32 *pIndex)
 Finds the accessor in the list and returns the index.
 
vx_bool coreflow::Context::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 coreflow::Context::findMemoryMap (vx_reference ref, vx_map_id map_id)
 Checks the consistency of given ref & map_id by looking into memory maps list.
 
void coreflow::Context::memoryUnmap (vx_uint32 map_id)
 Finds and removes a map_id from the list.
 
static vx_bool coreflow::Context::isValidBorderMode (vx_enum mode)
 Validate border mode supported.
 
vx_enum coreflow::Context::registerUserStruct (vx_size size)
 Register a user struct with a certain number of bytes.
 
vx_enum coreflow::Context::getUserStructByName (const vx_char *name)
 Get the User Struct By Name object.
 
vx_status coreflow::Context::getUserStructNameByEnum (vx_enum user_struct_type, vx_char *type_name, vx_size name_size)
 Get the User Struct Name By Enum object.
 
vx_status coreflow::Context::getUserStructEnumByName (const vx_char *type_name, vx_enum *user_struct_type)
 Get the User Struct Enum By Name object.
 
vx_enum coreflow::Context::registerUserStructWithName (vx_size size, const vx_char *type_name)
 Register user struct with name.
 
vx_status coreflow::Context::allocateKernelId (vx_enum *pKernelEnumId)
 Allocate a unique kernel id.
 
vx_status coreflow::Context::allocateLibraryId (vx_enum *pLibraryId)
 Allocate a unique library id.
 
vx_status coreflow::Context::setImmediateModeTarget (vx_enum target_enum, const char *target_string)
 Set the Immediate Mode Target.
 

Detailed Description

The Internal Context API.

Function Documentation

◆ addAccessor()

vx_bool coreflow::Context::addAccessor ( vx_size size,
vx_enum usage,
void *& ptr,
vx_reference ref,
vx_uint32 * pIndex,
void * extra_data )

#include <vx_context.h>

Searches the accessors list to find an open spot and then will allocate memory if needed.

◆ allocateKernelId()

vx_status coreflow::Context::allocateKernelId ( vx_enum * pKernelEnumId)

#include <vx_context.h>

Allocate a unique kernel id.

Parameters
pKernelEnumIdPointer to allocated kernel id by the framework.
Returns
vx_status VX_SUCCESS if successful, otherwise a return status with an error code.

◆ allocateLibraryId()

vx_status coreflow::Context::allocateLibraryId ( vx_enum * pLibraryId)

#include <vx_context.h>

Allocate a unique library id.

Parameters
pLibraryIdPointer to allocated library id by the framework.
Returns
vx_status VX_SUCCESS if successful, otherwise a return status with an error code.

◆ Context() [1/2]

coreflow::Context::Context ( )

#include <vx_context.h>

Construct a new Context object.

◆ Context() [2/2]

coreflow::Context::Context ( const Context & )
delete

#include <vx_context.h>

Delete copy constructor and assignment operator to prevent copying.

◆ convolutionMaxDim()

vx_size coreflow::Context::convolutionMaxDim ( ) const

#include <vx_context.h>

Get the max dimensions of a convolution supported.

Returns
vx_size The max dimensions of a convolution supported.

◆ createContext()

static vx_context coreflow::Context::createContext ( )
static

#include <vx_context.h>

Create a new context.

◆ extensions()

const vx_char * coreflow::Context::extensions ( ) const

#include <vx_context.h>

Get the names of the extensions supported.

Returns
const vx_char* The names of the extensions supported

◆ findAccessor()

vx_bool coreflow::Context::findAccessor ( const void * ptr,
vx_uint32 * pIndex )

#include <vx_context.h>

Finds the accessor in the list and returns the index.

◆ findMemoryMap()

vx_bool coreflow::Context::findMemoryMap ( vx_reference ref,
vx_map_id map_id )

#include <vx_context.h>

Checks the consistency of given ref & map_id by looking into memory maps list.

◆ findTargetByString()

vx_target * coreflow::Context::findTargetByString ( const char * target_string)

#include <vx_context.h>

Find target by string.

Parameters
target_stringtarget string
Returns
vx_target*

◆ getUserStructByName()

vx_enum coreflow::Context::getUserStructByName ( const vx_char * name)

#include <vx_context.h>

Get the User Struct By Name object.

Parameters
nameThe user struct name.
Returns
vx_enum The user struct enumeration.

◆ getUserStructEnumByName()

vx_status coreflow::Context::getUserStructEnumByName ( const vx_char * type_name,
vx_enum * user_struct_type )

#include <vx_context.h>

Get the User Struct Enum By Name object.

Parameters
type_nameThe user struct name.
user_struct_typeThe user struct type enumeration.
Returns
vx_status VX_SUCCESS if successful, otherwise a return status with an error code.

◆ getUserStructNameByEnum()

vx_status coreflow::Context::getUserStructNameByEnum ( vx_enum user_struct_type,
vx_char * type_name,
vx_size name_size )

#include <vx_context.h>

Get the User Struct Name By Enum object.

Parameters
user_struct_typeEnumeration for user struct type.
type_nameName of user struct type.
name_sizeSize of user struct name.
Returns
vx_status VX_SUCCESS if successful, otherwise a return status with an error code.

◆ immediateBorder()

vx_border_t coreflow::Context::immediateBorder ( ) const

#include <vx_context.h>

Get the immediate border.

Returns
vx_border_t The immediate border.

◆ immediateBorderPolicy()

vx_enum coreflow::Context::immediateBorderPolicy ( ) const

#include <vx_context.h>

Get the immediate border policy.

Returns
vx_enum The immediate border policy.

◆ implName()

const vx_char * coreflow::Context::implName ( ) const

#include <vx_context.h>

Get the implementation name.

Returns
const vx_char* The implementation name.

◆ isValidBorderMode()

static vx_bool coreflow::Context::isValidBorderMode ( vx_enum mode)
static

#include <vx_context.h>

Validate border mode supported.

Parameters
modeborder mode
Returns
vx_bool vx_true_e if valid, vx_false_e otherwise

◆ isValidContext()

static vx_bool coreflow::Context::isValidContext ( vx_context context)
static

#include <vx_context.h>

This determines if a context is valid.

Parameters
[in]contextThe pointer to the context to test.
Return values
vx_true_eThe context is valid.
vx_false_eThe context is not valid.

◆ isValidImport()

static vx_bool coreflow::Context::isValidImport ( vx_enum type)
static

#include <vx_context.h>

This determines if the import type is supported.

Parameters
[in]typeThe vx_import_type_e value.

◆ isValidType()

static vx_bool coreflow::Context::isValidType ( vx_enum type)
static

#include <vx_context.h>

This returns true if the type is within the definition of types in OpenVX.

Note
VX_TYPE_INVALID is not valid for determining a type.
Parameters
[in]typeThe vx_type_e value.

◆ maxTensorDims()

vx_size coreflow::Context::maxTensorDims ( ) const

#include <vx_context.h>

Get the max tensor dimensions supported.

Returns
vx_size The max tensor dimensions supported.

◆ memoryMap()

vx_bool coreflow::Context::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 )

#include <vx_context.h>

Searches the memory maps list to find an open slot and allocate memory for mapped buffer.

◆ memoryUnmap()

void coreflow::Context::memoryUnmap ( vx_uint32 map_id)

#include <vx_context.h>

Finds and removes a map_id from the list.

◆ nonLinearMaxDim()

vx_size coreflow::Context::nonLinearMaxDim ( ) const

#include <vx_context.h>

Get the max dimensions of a non linear supported.

Returns
vx_size The max dimensions of a non linear supported.

◆ numModules()

vx_uint32 coreflow::Context::numModules ( ) const

#include <vx_context.h>

Get number of loaded modules.

Returns
vx_uint32 The number of loaded modules.

◆ numReferences()

vx_uint32 coreflow::Context::numReferences ( ) const

#include <vx_context.h>

Get number of references.

Returns
vx_uint32 The number of tracked references.

◆ numUniqueKernels()

vx_uint32 coreflow::Context::numUniqueKernels ( ) const

#include <vx_context.h>

Get the number of unique kernels.

Returns
vx_uint32 The number of unique kernels.

◆ opticalFlowMaxWindowDim()

vx_size coreflow::Context::opticalFlowMaxWindowDim ( ) const

#include <vx_context.h>

Get the optical flow max window dimension supported.

Returns
vx_size The optical flow max window dimension supported.

◆ registerUserStruct()

vx_enum coreflow::Context::registerUserStruct ( vx_size size)

#include <vx_context.h>

Register a user struct with a certain number of bytes.

Parameters
sizeThe size in bytes of the user struct.
Returns
vx_enum The user struct enumeration.

◆ registerUserStructWithName()

vx_enum coreflow::Context::registerUserStructWithName ( vx_size size,
const vx_char * type_name )

#include <vx_context.h>

Register user struct with name.

Parameters
sizeSize of user struct name.
type_nameThe user struct name.
Returns
vx_enum Enumeration of registered user struct

◆ removeAccessor()

void coreflow::Context::removeAccessor ( vx_uint32 index)

#include <vx_context.h>

Finds and removes an accessor from the list.

◆ setImmediateModeTarget()

vx_status coreflow::Context::setImmediateModeTarget ( vx_enum target_enum,
const char * target_string )

#include <vx_context.h>

Set the Immediate Mode Target.

Parameters
target_enumThe target enumeration.
target_stringThe target string.
Returns
vx_status VX_SUCCESS if successful, otherwise a return status with an error code.

◆ setLoggingEnabled()

void coreflow::Context::setLoggingEnabled ( vx_bool flag)

#include <vx_context.h>

Set the logging enabled state.

OPENVX_USE_OPENCL_INTEROP

Parameters
flagvx_bool indicating whether to enable or disable logging

◆ setPerfEnabled()

void coreflow::Context::setPerfEnabled ( vx_bool flag)

#include <vx_context.h>

Set the perf enabled state.

Parameters
flagvx_bool indicating whether to enable or disable performance tracking

◆ uniqueKernelTable()

std::vector< vx_kernel_info_t > coreflow::Context::uniqueKernelTable ( )

#include <vx_context.h>

Get the unique kernel information.

Returns
std::vector<vx_kernel_info_t> The unique kernel information table.

◆ vendorId()

vx_uint16 coreflow::Context::vendorId ( ) const

#include <vx_context.h>

Get vendor id.

Returns
vx_uint16 The vendor id.

◆ version()

vx_uint16 coreflow::Context::version ( ) const

#include <vx_context.h>

Get version number.

Returns
vx_uint16 The version number.

◆ ~Context()

coreflow::Context::~Context ( )

#include <vx_context.h>

Destroy the Context object.