The OpenVX Specification  r31169
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Object: Array (Advanced)

Detailed Description

Defines the advanced features of the Array Interface.

Functions

vx_enum VX_API_CALL vxRegisterUserStruct (vx_context context, vx_size size)
 Registers user-defined structures to the context. More...
 

Function Documentation

vx_enum VX_API_CALL vxRegisterUserStruct ( vx_context  context,
vx_size  size 
)

Registers user-defined structures to the context.

Parameters
[in]contextThe reference to the implementation context.
[in]sizeThe size of user struct in bytes.
Returns
A vx_enum value that is a type given to the User to refer to their custom structure when declaring a vx_array of that structure.
Return values
VX_TYPE_INVALIDIf the namespace of types has been exhausted.
Note
This call should only be used once within the lifetime of a context for a specific structure.
typedef struct _mystruct {
vx_uint32 some_uint;
vx_float64 some_double;
} mystruct;
#define MY_NUM_ITEMS (10)
vx_enum mytype = vxRegisterUserStruct(context, sizeof(mystruct));
vx_array array = vxCreateArray(context, mytype, MY_NUM_ITEMS);