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

The Internal Distribution API. More...

Namespaces

namespace  coreflow
 The internal representation of a vx_array.
 

Functions

 coreflow::Distribution::Distribution (vx_context context, vx_reference scope)
 Construct a new Distribution object.
 
static vx_distribution coreflow::Distribution::createDistribution (vx_context context, vx_size numBins, vx_int32 offset, vx_uint32 range)
 Create a new distribution.
 
vx_size coreflow::Distribution::dims () const
 Get the number of dimensions in the distribution.
 
vx_uint32 coreflow::Distribution::range () const
 Get the range of the distribution.
 
vx_size coreflow::Distribution::bins () const
 Get the number of bins in the distribution.
 
vx_uint32 coreflow::Distribution::window () const
 Get the window size of the distribution.
 
vx_int32 coreflow::Distribution::offset () const
 Get the offset of the distribution.
 
vx_uint32 coreflow::Distribution::size () const
 Get the size of the distribution in bytes.
 
vx_status coreflow::Distribution::access (void **ptr, vx_enum usage)
 Access the distribution data.
 
vx_status coreflow::Distribution::commit (const void *ptr)
 Commit the distribution with the given data.
 
vx_status coreflow::Distribution::copy (void *user_ptr, vx_enum usage, vx_enum mem_type)
 Copy the distribution data to/from user memory.
 
vx_status coreflow::Distribution::map (vx_map_id *map_id, void **ptr, vx_enum usage, vx_enum mem_type, vx_bitfield flags)
 Map the distribution to a memory map.
 
vx_status coreflow::Distribution::unmap (vx_map_id map_id)
 Unmap the distribution from the memory map.
 
 coreflow::Distribution::~Distribution ()
 Destroy the Distribution object.
 
void coreflow::Distribution::destruct () override final
 Destroys a distribution.
 

Detailed Description

The Internal Distribution API.

Function Documentation

◆ access()

vx_status coreflow::Distribution::access ( void ** ptr,
vx_enum usage )

#include <vx_distribution.h>

Access the distribution data.

Parameters
ptrThe pointer to the data to access
usageThe usage of the memory (read/write)
Returns
vx_status VX_SUCCESS on success, error code otherwise

◆ bins()

vx_size coreflow::Distribution::bins ( ) const

#include <vx_distribution.h>

Get the number of bins in the distribution.

Returns
vx_size The number of bins

◆ commit()

vx_status coreflow::Distribution::commit ( const void * ptr)

#include <vx_distribution.h>

Commit the distribution with the given data.

Parameters
ptrThe pointer to the data to commit
Returns
vx_status VX_SUCCESS on success, error code otherwise

◆ copy()

vx_status coreflow::Distribution::copy ( void * user_ptr,
vx_enum usage,
vx_enum mem_type )

#include <vx_distribution.h>

Copy the distribution data to/from user memory.

Parameters
user_ptrThe pointer to the user memory
usageThe usage of the memory (read/write)
mem_typeThe type of memory (host, opencl, etc.)
Returns
vx_status VX_SUCCESS on success, error code otherwise

◆ createDistribution()

static vx_distribution coreflow::Distribution::createDistribution ( vx_context context,
vx_size numBins,
vx_int32 offset,
vx_uint32 range )
static

#include <vx_distribution.h>

Create a new distribution.

Parameters
contextThe context associated with this distribution
numBinsThe number of bins in the distribution
offsetThe offset of the distribution
rangeThe range of the distribution
Returns
vx_distribution The distribution object

◆ destruct()

void coreflow::Distribution::destruct ( )
finaloverridevirtual

#include <vx_distribution.h>

Destroys a distribution.

Reimplemented from coreflow::Reference.

◆ dims()

vx_size coreflow::Distribution::dims ( ) const

#include <vx_distribution.h>

Get the number of dimensions in the distribution.

Returns
vx_size The number of dimensions

◆ Distribution()

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

#include <vx_distribution.h>

Construct a new Distribution object.

Parameters
contextThe context associated with this obj
scopeThe parent ref of this obj

◆ map()

vx_status coreflow::Distribution::map ( vx_map_id * map_id,
void ** ptr,
vx_enum usage,
vx_enum mem_type,
vx_bitfield flags )

#include <vx_distribution.h>

Map the distribution to a memory map.

Parameters
map_idThe map id to use
ptrThe pointer to the mapped memory
usageThe usage of the memory (read/write)
mem_typeThe type of memory (host, opencl, etc.)
flagsAdditional flags for mapping
Returns
vx_status VX_SUCCESS on success, error code otherwise

◆ offset()

vx_int32 coreflow::Distribution::offset ( ) const

#include <vx_distribution.h>

Get the offset of the distribution.

Returns
vx_int32 The offset value

◆ range()

vx_uint32 coreflow::Distribution::range ( ) const

#include <vx_distribution.h>

Get the range of the distribution.

Returns
vx_uint32 The range value

◆ size()

vx_uint32 coreflow::Distribution::size ( ) const

#include <vx_distribution.h>

Get the size of the distribution in bytes.

Returns
vx_size The size in bytes

◆ unmap()

vx_status coreflow::Distribution::unmap ( vx_map_id map_id)

#include <vx_distribution.h>

Unmap the distribution from the memory map.

Parameters
map_idThe map id to unmap
Returns
vx_status VX_SUCCESS on success, error code otherwise

◆ window()

vx_uint32 coreflow::Distribution::window ( ) const

#include <vx_distribution.h>

Get the window size of the distribution.

Returns
vx_uint32 The window size

◆ ~Distribution()

coreflow::Distribution::~Distribution ( )

#include <vx_distribution.h>

Destroy the Distribution object.