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

The Internal Array API. More...

Namespaces

namespace  coreflow
 The internal representation of a vx_array.
 

Functions

 coreflow::Array::Array (vx_context context, vx_reference scope)
 Construct a new Array object.
 
 coreflow::Array::Array (vx_context context, vx_enum type, vx_reference scope)
 Construct a new Array object.
 
 coreflow::Array::~Array ()
 Destroy the Array object.
 
static vx_array coreflow::Array::createArray (vx_context context, vx_enum item_type, vx_size capacity, vx_bool is_virtual=vx_false_e, vx_enum type=VX_TYPE_ARRAY)
 Create a Array object.
 
static vx_lut_t coreflow::Array::createLUT (vx_context context, vx_enum data_type, vx_size count)
 Create a LUT object.
 
vx_bool coreflow::Array::validateArray (vx_enum item_type, vx_size capacity)
 Validate array object.
 
vx_bool coreflow::Array::allocateArray ()
 Allocate memory for array object.
 
static vx_size coreflow::Array::itemSize (vx_context context, vx_enum item_type)
 Get item size of type.
 
static vx_bool coreflow::Array::isValidArrayItemType (vx_context context, vx_enum item_type)
 Validate array item type.
 
static vx_bool coreflow::Array::isValidArray (vx_array arr)
 Validate array object.
 
void coreflow::Array::initArrayMemory ()
 Initialize internal array memory.
 
vx_bool coreflow::Array::initVirtualArray (vx_enum item_type, vx_size capacity)
 Initialize virutal array object.
 
vx_status coreflow::Array::addItems (vx_size count, const void *ptr, vx_size stride)
 Add items to array.
 
vx_status coreflow::Array::truncate (vx_size new_num_items)
 Truncate array to new number of items.
 
vx_enum coreflow::Array::itemType () const
 Get item type of the array.
 
vx_size coreflow::Array::numItems () const
 Get number of items in array.
 
vx_size coreflow::Array::totalCapacity () const
 Get capacity of array.
 
vx_size coreflow::Array::itemSize () const
 Get item size in array.
 
vx_size coreflow::Array::totalSize () const
 Get total size of array.
 
vx_uint32 coreflow::Array::offsetVal () const
 Get offset value.
 
vx_status coreflow::Array::accessArrayRange (vx_size start, vx_size end, vx_size *pStride, void **ptr, vx_enum usage)
 Access array range in object.
 
vx_status coreflow::Array::commitArrayRange (vx_size start, vx_size end, const void *ptr)
 Commit array range.
 
vx_status coreflow::Array::copyArrayRange (vx_size start, vx_size end, vx_size stride, void *ptr, vx_enum usage, vx_enum mem_type)
 Copy array range.
 
vx_status coreflow::Array::mapArrayRange (vx_size start, vx_size end, vx_map_id *map_id, vx_size *stride, void **ptr, vx_enum usage, vx_enum mem_type, vx_uint32 flags)
 Map array range.
 
vx_status coreflow::Array::unmapArrayRange (vx_map_id map_id)
 Unmap array range.
 
void coreflow::Array::destruct () override final
 Destruct function for array object.
 
static void coreflow::Array::printArray (vx_array array)
 Print array object.
 

Detailed Description

The Internal Array API.

Function Documentation

◆ accessArrayRange()

vx_status coreflow::Array::accessArrayRange ( vx_size start,
vx_size end,
vx_size * pStride,
void ** ptr,
vx_enum usage )

#include <vx_array.h>

Access array range in object.

Parameters
startstart index
endend index
pStridepointer of stride
ptrpointer to data
usagero | rw | wo
Returns
vx_status VX_SUCCESS if successful, any other value indicates failure.

◆ addItems()

vx_status coreflow::Array::addItems ( vx_size count,
const void * ptr,
vx_size stride )

#include <vx_array.h>

Add items to array.

Parameters
countnumber of items to add
ptrpointer to data
stridesize of stride
Returns
vx_status VX_SUCCESS if successful, any other value indicates failure.

◆ allocateArray()

vx_bool coreflow::Array::allocateArray ( )

#include <vx_array.h>

Allocate memory for array object.

Returns
vx_bool true if successful, false otherwise

◆ Array() [1/2]

coreflow::Array::Array ( vx_context context,
vx_enum type,
vx_reference scope )

#include <vx_array.h>

Construct a new Array object.

Parameters
contextThe context associated with this object
typeThe type of this array (arr or lut)
scopeThe parent reference of this object

◆ Array() [2/2]

coreflow::Array::Array ( vx_context context,
vx_reference scope )

#include <vx_array.h>

Construct a new Array object.

Parameters
contextThe context associated with this object
scopeThe parent reference of this object

◆ commitArrayRange()

vx_status coreflow::Array::commitArrayRange ( vx_size start,
vx_size end,
const void * ptr )

#include <vx_array.h>

Commit array range.

Parameters
startstart index
endend index
ptrpointer to data
Returns
vx_status VX_SUCCESS if successful, any other value indicates failure.

◆ copyArrayRange()

vx_status coreflow::Array::copyArrayRange ( vx_size start,
vx_size end,
vx_size stride,
void * ptr,
vx_enum usage,
vx_enum mem_type )

#include <vx_array.h>

Copy array range.

Parameters
startstart index
endend index
stridesize of stride
ptrpointer to data
usagero | rw | wo
mem_typehost | device
Returns
vx_status VX_SUCCESS if successful, any other value indicates failure.

◆ createArray()

static vx_array coreflow::Array::createArray ( vx_context context,
vx_enum item_type,
vx_size capacity,
vx_bool is_virtual = vx_false_e,
vx_enum type = VX_TYPE_ARRAY )
static

#include <vx_array.h>

Create a Array object.

Parameters
contextcontext object
item_typearray object type
capacitycapacity of array
is_virtualis array virtual
typearray or lut
Returns
vx_array array object

◆ createLUT()

static vx_lut_t coreflow::Array::createLUT ( vx_context context,
vx_enum data_type,
vx_size count )
static

#include <vx_array.h>

Create a LUT object.

Parameters
contextcontext object
data_typearray object type
countcount of array
Returns
vx_lut_t LUT object

◆ destruct()

void coreflow::Array::destruct ( )
finaloverridevirtual

#include <vx_array.h>

Destruct function for array object.

Reimplemented from coreflow::Reference.

◆ initArrayMemory()

void coreflow::Array::initArrayMemory ( )

#include <vx_array.h>

Initialize internal array memory.

◆ initVirtualArray()

vx_bool coreflow::Array::initVirtualArray ( vx_enum item_type,
vx_size capacity )

#include <vx_array.h>

Initialize virutal array object.

Parameters
item_typearray object type
capacitycapacity of array
Returns
vx_bool true if successful, false otherwise

◆ isValidArray()

static vx_bool coreflow::Array::isValidArray ( vx_array arr)
static

#include <vx_array.h>

Validate array object.

Parameters
arrarray object to check
Returns
vx_bool true if valid, false otherwise

◆ isValidArrayItemType()

static vx_bool coreflow::Array::isValidArrayItemType ( vx_context context,
vx_enum item_type )
static

#include <vx_array.h>

Validate array item type.

Parameters
contextglobal context
item_typeitem type
Returns
vx_bool true if valid, false otherwise

◆ itemSize() [1/2]

vx_size coreflow::Array::itemSize ( ) const

#include <vx_array.h>

Get item size in array.

Returns
vx_size Item size in bytes

◆ itemSize() [2/2]

static vx_size coreflow::Array::itemSize ( vx_context context,
vx_enum item_type )
static

#include <vx_array.h>

Get item size of type.

Parameters
contextglobal context
item_typeitem type
Returns
vx_size size of item

◆ itemType()

vx_enum coreflow::Array::itemType ( ) const

#include <vx_array.h>

Get item type of the array.

Returns
vx_enum The item type of the array.

◆ mapArrayRange()

vx_status coreflow::Array::mapArrayRange ( vx_size start,
vx_size end,
vx_map_id * map_id,
vx_size * stride,
void ** ptr,
vx_enum usage,
vx_enum mem_type,
vx_uint32 flags )

#include <vx_array.h>

Map array range.

Parameters
startstart index
endend index
map_idmemory map id
stridesize of stride
ptrpointer to data
usagero | rw | wo
mem_typehost | device
flagsadditional flags
Returns
vx_status VX_SUCCESS if successful, any other value indicates failure.

◆ numItems()

vx_size coreflow::Array::numItems ( ) const

#include <vx_array.h>

Get number of items in array.

Returns
vx_size The number of items in the array.

◆ offsetVal()

vx_uint32 coreflow::Array::offsetVal ( ) const

#include <vx_array.h>

Get offset value.

Returns
vx_uint32 Offset value

◆ printArray()

static void coreflow::Array::printArray ( vx_array array)
static

#include <vx_array.h>

Print array object.

Parameters
array

◆ totalCapacity()

vx_size coreflow::Array::totalCapacity ( ) const

#include <vx_array.h>

Get capacity of array.

Returns
vx_size The capacity of the array.

◆ totalSize()

vx_size coreflow::Array::totalSize ( ) const

#include <vx_array.h>

Get total size of array.

Returns
vx_size Total size in bytes

◆ truncate()

vx_status coreflow::Array::truncate ( vx_size new_num_items)

#include <vx_array.h>

Truncate array to new number of items.

Parameters
new_num_itemsnew number of items
Returns
vx_status VX_SUCCESS if successful, any other value indicates failure.

◆ unmapArrayRange()

vx_status coreflow::Array::unmapArrayRange ( vx_map_id map_id)

#include <vx_array.h>

Unmap array range.

Parameters
map_idmemory map id
Returns
vx_status VX_SUCCESS if successful, any other value indicates failure.

◆ validateArray()

vx_bool coreflow::Array::validateArray ( vx_enum item_type,
vx_size capacity )

#include <vx_array.h>

Validate array object.

Parameters
item_typearray object type
capacitycapacity of array
Returns
vx_bool true if valid, false otherwise

◆ ~Array()

coreflow::Array::~Array ( )

#include <vx_array.h>

Destroy the Array object.