CoreFlow 1.0.0
A modern orchestration and execution runtime
Loading...
Searching...
No Matches
User Facing Parameter API

The Public API. More...

Typedefs

typedef struct Parameter * vx_parameter
 An opaque reference to a single parameter.
 

Enumerations

enum  vx_direction_e {
  VX_INPUT = VX_ENUM_BASE(VX_ID_KHRONOS, VX_ENUM_DIRECTION) + 0x0 ,
  VX_OUTPUT = VX_ENUM_BASE(VX_ID_KHRONOS, VX_ENUM_DIRECTION) + 0x1
}
 An indication of how a kernel will treat the given parameter. More...
 
enum  vx_parameter_attribute_e {
  VX_PARAMETER_INDEX = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_PARAMETER) + 0x0 ,
  VX_PARAMETER_DIRECTION = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_PARAMETER) + 0x1 ,
  VX_PARAMETER_TYPE = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_PARAMETER) + 0x2 ,
  VX_PARAMETER_STATE = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_PARAMETER) + 0x3 ,
  VX_PARAMETER_REF = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_PARAMETER) + 0x4 ,
  VX_PARAMETER_META_FORMAT = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_PARAMETER) + 0x5
}
 The parameter attributes list. More...
 
enum  vx_parameter_state_e {
  VX_PARAMETER_STATE_REQUIRED = VX_ENUM_BASE(VX_ID_KHRONOS, VX_ENUM_PARAMETER_STATE) + 0x0 ,
  VX_PARAMETER_STATE_OPTIONAL = VX_ENUM_BASE(VX_ID_KHRONOS, VX_ENUM_PARAMETER_STATE) + 0x1
}
 The parameter state type. More...
 

Functions

VX_API_ENTRY vx_parameter VX_API_CALL vxGetKernelParameterByIndex (vx_kernel kernel, vx_uint32 index)
 Retrieves a vx_parameter from a vx_kernel.
 
VX_API_ENTRY vx_parameter VX_API_CALL vxGetParameterByIndex (vx_node node, vx_uint32 index)
 Retrieves a vx_parameter from a vx_node.
 
VX_API_ENTRY vx_status VX_API_CALL vxReleaseParameter (vx_parameter *param)
 Releases a reference to a parameter object. The object may not be garbage collected until its total reference count is zero.
 
VX_API_ENTRY vx_status VX_API_CALL vxSetParameterByIndex (vx_node node, vx_uint32 index, vx_reference value)
 Sets the specified parameter data for a kernel on the node.
 
VX_API_ENTRY vx_status VX_API_CALL vxSetParameterByReference (vx_parameter parameter, vx_reference value)
 Associates a parameter reference and a data reference with a kernel on a node.
 
VX_API_ENTRY vx_status VX_API_CALL vxQueryParameter (vx_parameter parameter, vx_enum attribute, void *ptr, vx_size size)
 Allows the client to query a parameter to determine its meta-information.
 

Detailed Description

The Public API.

Typedef Documentation

◆ vx_parameter

typedef struct Parameter* vx_parameter

#include <vx_types.h>

An opaque reference to a single parameter.

See also
vxGetParameterByIndex

Enumeration Type Documentation

◆ vx_direction_e

#include <vx_types.h>

An indication of how a kernel will treat the given parameter.

Enumerator
VX_INPUT 

The parameter is an input only.

VX_OUTPUT 

The parameter is an output only.

◆ vx_parameter_attribute_e

#include <vx_types.h>

The parameter attributes list.

Enumerator
VX_PARAMETER_INDEX 

Queries a parameter for its index value on the kernel with which it is associated. Read-only. Use a vx_uint32 parameter.

VX_PARAMETER_DIRECTION 

Queries a parameter for its direction value on the kernel with which it is associated. Read-only. Use a vx_enum parameter.

VX_PARAMETER_TYPE 

Queries a parameter for its type, vx_type_e is returned. Read-only. The size of the parameter is implied for plain data objects. For opaque data objects like images and arrays a query to their attributes has to be called to determine the size.

VX_PARAMETER_STATE 

Queries a parameter for its state. A value in vx_parameter_state_e is returned. Read-only. Use a vx_enum parameter.

VX_PARAMETER_REF 

Use to extract the reference contained in the parameter. Read-only. Use a vx_reference parameter.

VX_PARAMETER_META_FORMAT 

Use to extract the meta format contained in the parameter. Read-only. Use a vx_meta_format parameter.

◆ vx_parameter_state_e

#include <vx_types.h>

The parameter state type.

Enumerator
VX_PARAMETER_STATE_REQUIRED 

Default. The parameter must be supplied. If not set, during Verify, an error is returned.

VX_PARAMETER_STATE_OPTIONAL 

The parameter may be unspecified. The kernel takes care not to deference optional parameters until it is certain they are valid.

Function Documentation

◆ vxGetKernelParameterByIndex()

VX_API_ENTRY vx_parameter VX_API_CALL vxGetKernelParameterByIndex ( vx_kernel kernel,
vx_uint32 index )

#include <vx_api.h>

Retrieves a vx_parameter from a vx_kernel.

Parameters
[in]kernelThe reference to the kernel.
[in]indexThe index of the parameter.
Returns
A vx_parameter reference. Any possible errors preventing a successful completion of the function should be checked using vxGetStatus.

◆ vxGetParameterByIndex()

VX_API_ENTRY vx_parameter VX_API_CALL vxGetParameterByIndex ( vx_node node,
vx_uint32 index )

#include <vx_api.h>

Retrieves a vx_parameter from a vx_node.

Parameters
[in]nodeThe node from which to extract the parameter.
[in]indexThe index of the parameter to which to get a reference.
Returns
A parameter reference vx_parameter. Any possible errors preventing a successful completion of the function should be checked using vxGetStatus.

◆ vxQueryParameter()

VX_API_ENTRY vx_status VX_API_CALL vxQueryParameter ( vx_parameter parameter,
vx_enum attribute,
void * ptr,
vx_size size )

#include <vx_api.h>

Allows the client to query a parameter to determine its meta-information.

Parameters
[in]parameterThe reference to the parameter.
[in]attributeThe attribute to query. Use a vx_parameter_attribute_e.
[out]ptrThe location at which to store the resulting value.
[in]sizeThe size in bytes of the container to which ptr points.
Returns
A vx_status_e enumeration.
Return values
VX_SUCCESSNo errors; any other value indicates failure.
VX_ERROR_INVALID_REFERENCEparameter is not a valid vx_parameter reference.

◆ vxReleaseParameter()

VX_API_ENTRY vx_status VX_API_CALL vxReleaseParameter ( vx_parameter * param)

#include <vx_api.h>

Releases a reference to a parameter object. The object may not be garbage collected until its total reference count is zero.

Parameters
[in]paramThe pointer to the parameter to release.
Postcondition
After returning from this function the reference is zeroed.
Returns
A vx_status_e enumeration.
Return values
VX_SUCCESSNo errors; any other value indicates failure.
VX_ERROR_INVALID_REFERENCEparam is not a valid vx_parameter reference.

◆ vxSetParameterByIndex()

VX_API_ENTRY vx_status VX_API_CALL vxSetParameterByIndex ( vx_node node,
vx_uint32 index,
vx_reference value )

#include <vx_api.h>

Sets the specified parameter data for a kernel on the node.

Parameters
[in]nodeThe node that contains the kernel.
[in]indexThe index of the parameter desired.
[in]valueThe desired value of the parameter.
Note
A user may not provide a NULL value for a mandatory parameter of this API.
Returns
A vx_status_e enumeration.
Return values
VX_SUCCESSNo errors; any other value indicates failure.
VX_ERROR_INVALID_REFERENCEnode is not a valid vx_node reference, or value is not a valid vx_reference reference.
See also
vxSetParameterByReference

◆ vxSetParameterByReference()

VX_API_ENTRY vx_status VX_API_CALL vxSetParameterByReference ( vx_parameter parameter,
vx_reference value )

#include <vx_api.h>

Associates a parameter reference and a data reference with a kernel on a node.

Parameters
[in]parameterThe reference to the kernel parameter.
[in]valueThe value to associate with the kernel parameter.
Note
A user may not provide a NULL value for a mandatory parameter of this API.
Returns
A vx_status_e enumeration.
Return values
VX_SUCCESSNo errors; any other value indicates failure.
VX_ERROR_INVALID_REFERENCEparameter is not a valid vx_parameter reference, or value is not a valid vx_reference reference..
See also
vxGetParameterByIndex