CoreFlow 1.0.0
A modern orchestration and execution runtime
Loading...
Searching...
No Matches
Extension: User Tiling API

The Khronos Extension for User Tiling Functions. More...

Classes

struct  _vx_tile_block_size_t
 The User Tiling Function tile block size declaration. More...
 
struct  _vx_neighborhood_size_t
 The User Tiling Function Neighborhood declaration. More...
 
struct  _vx_image_description_t
 A structure which describes the tile's parent image. More...
 
struct  _vx_tile_t
 The tile structure declaration. More...
 

Macros

#define VX_RESTRICT   restrict
 A platform wrapper for the restrict keyword.
 
#define VX_MAX_TILING_PLANES   (4)
 The maximum number of planes in a tiled image.
 
#define vxImageHeight(ptile)
 The full height of the tile's parent image in pixels.
 
#define vxImageWidth(ptile)
 The full width of the tile's parent image in pixels.
 
#define vxTileX(ptile)
 The offset between the left edge of the image and the left edge of the tile, in pixels.
 
#define vxTileY(ptile)
 The offset between the top edge of the image and the top edge of the tile, in pixels.
 
#define vxTileWidth(ptile, index)
 The width of the tile in pixels.
 
#define vxTileHeight(ptile, index)
 The height of the tile in pixels.
 
#define vxTileBlockHeight(ptile)
 The tile block height.
 
#define vxTileBlockWidth(ptile)
 The tile block width.
 
#define vxNeighborhoodLeft(ptile)
 The simple wrapper to access each image's neighborhood -X value.
 
#define vxNeighborhoodRight(ptile)
 The simple wrapper to access each image's neighborhood +X value.
 
#define vxNeighborhoodTop(ptile)
 The simple wrapper to access each image's neighborhood -Y value.
 
#define vxNeighborhoodBottom(ptile)
 The simple wrapper to access each image's neighborhood +Y value.
 
#define vxImageOffset(ptile, i, x, y, ox, oy)
 Computes the offset within an image.
 
#define vxImagePixel(type, ptile, i, x, y, ox, oy)
 Accesses an image pixel as a type-cast indexed pointer dereference.
 

Typedefs

typedef struct _vx_tile_block_size_t vx_tile_block_size_t
 The User Tiling Function tile block size declaration.
 
typedef struct _vx_neighborhood_size_t vx_neighborhood_size_t
 The User Tiling Function Neighborhood declaration.
 
typedef struct _vx_image_description_t vx_image_description_t
 A structure which describes the tile's parent image.
 
typedef struct _vx_tile_t vx_tile_t
 The tile structure declaration.
 
typedef void(* vx_tiling_kernel_f) (void *VX_RESTRICT parameters[VX_RESTRICT], void *VX_RESTRICT tile_memory, vx_size tile_memory_size)
 Tiling Kernel function typedef for User Tiling Kernels.
 

Enumerations

enum  vx_kernel_attribute_tiling_e {
  VX_KERNEL_INPUT_NEIGHBORHOOD = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_KERNEL) + 0x7 ,
  VX_KERNEL_OUTPUT_TILE_BLOCK_SIZE = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_KERNEL) + 0x8 ,
  VX_KERNEL_BORDER = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_KERNEL) + 0x9 ,
  VX_KERNEL_TILE_MEMORY_SIZE = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_KERNEL) + 0xA
}
 The User Kernel Tiling Attributes. More...
 
enum  vx_node_attribute_tiling_e {
  VX_NODE_INPUT_NEIGHBORHOOD = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_NODE) + 0xB ,
  VX_NODE_OUTPUT_TILE_BLOCK_SIZE = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_NODE) + 0xC ,
  VX_NODE_TILE_MEMORY_SIZE = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_NODE) + 0xD
}
 The User Node Tiling Attributes. More...
 
enum  vx_border_tiling_e { VX_BORDER_MODE_SELF = VX_ENUM_BASE(VX_ID_KHRONOS, VX_ENUM_BORDER) + 0x3 }
 The tiling border mode extensions. More...
 

Functions

VX_API_ENTRY vx_kernel VX_API_CALL vxAddTilingKernel (vx_context context, vx_char name[VX_MAX_KERNEL_NAME], vx_enum enumeration, vx_tiling_kernel_f flexible_func_ptr, vx_tiling_kernel_f fast_func_ptr, vx_uint32 num_params, vx_kernel_input_validate_f input, vx_kernel_output_validate_f output)
 Allows a user to add a tile-able kernel to the OpenVX system.
 

Detailed Description

The Khronos Extension for User Tiling Functions.

Macro Definition Documentation

◆ VX_MAX_TILING_PLANES

#define VX_MAX_TILING_PLANES   (4)

#include <vx_khr_tiling.h>

The maximum number of planes in a tiled image.

◆ VX_RESTRICT

#define VX_RESTRICT   restrict

#include <vx_khr_tiling.h>

A platform wrapper for the restrict keyword.

◆ vxImageHeight

#define vxImageHeight ( ptile)

#include <vx_khr_tiling.h>

Value:
((ptile))->image.height)

The full height of the tile's parent image in pixels.

Parameters
[in]ptileThe pointer to the vx_tile_t structure.

◆ vxImageOffset

#define vxImageOffset ( ptile,
i,
x,
y,
ox,
oy )

#include <vx_khr_tiling.h>

Value:
((ptile)->addr[i].stride_y * (vx_int32)(((vx_int32)((oy)+(y)) * (vx_int32)(ptile)->addr[i].scale_y)/(vx_int32)VX_SCALE_UNITY)) + \
((ptile)->addr[i].stride_x * (vx_int32)(((vx_int32)((ox)+(x)) * (vx_int32)(ptile)->addr[i].scale_x)/(vx_int32)VX_SCALE_UNITY))
int32_t vx_int32
A 32-bit signed value.
Definition vx_types.h:105
#define VX_SCALE_UNITY
Definition vx_khr_opencl.h:79

Computes the offset within an image.

Parameters
[in]ptileThe pointer to the vx_tile_t structure.
[in]iThe plane index.
[in]xThe Width Coordinates.
[in]yThe Height Coordinates.
[in]oxThe X offset.
[in]oyThe Y offset.

◆ vxImagePixel

#define vxImagePixel ( type,
ptile,
i,
x,
y,
ox,
oy )

#include <vx_khr_tiling.h>

Value:
*((type *)(&((vx_uint8 *)(ptile)->base[i])[vxImageOffset(ptile, i, x, y, ox, oy)]))
uint8_t vx_uint8
An 8-bit unsigned value.
Definition vx_types.h:75
#define vxImageOffset(ptile, i, x, y, ox, oy)
Computes the offset within an image.
Definition vx_khr_tiling.h:315

Accesses an image pixel as a type-cast indexed pointer dereference.

Parameters
[in]typeThe type of the image pixel. Example values are vx_uint8, vx_uint16, vx_uint32, etc.
[in]ptileThe pointer to the vx_tile_t structure.
[in]iThe plane index.
[in]xThe Center Pixel in Width Coordinates.
[in]yThe Center Pixel in Height Coordinates.
[in]oxThe X offset.
[in]oyThe Y offset.

◆ vxImageWidth

#define vxImageWidth ( ptile)

#include <vx_khr_tiling.h>

Value:
((ptile))->image.width)

The full width of the tile's parent image in pixels.

Parameters
[in]ptileThe pointer to the vx_tile_t structure.

◆ vxNeighborhoodBottom

#define vxNeighborhoodBottom ( ptile)

#include <vx_khr_tiling.h>

Value:
((ptile)->neighborhood.bottom)

The simple wrapper to access each image's neighborhood +Y value.

Parameters
[in]ptileThe pointer to the vx_tile_t structure.

◆ vxNeighborhoodLeft

#define vxNeighborhoodLeft ( ptile)

#include <vx_khr_tiling.h>

Value:
((ptile)->neighborhood.left)

The simple wrapper to access each image's neighborhood -X value.

Parameters
[in]ptileThe pointer to the vx_tile_t structure.

◆ vxNeighborhoodRight

#define vxNeighborhoodRight ( ptile)

#include <vx_khr_tiling.h>

Value:
((ptile)->neighborhood.right)

The simple wrapper to access each image's neighborhood +X value.

Parameters
[in]ptileThe pointer to the vx_tile_t structure.

◆ vxNeighborhoodTop

#define vxNeighborhoodTop ( ptile)

#include <vx_khr_tiling.h>

Value:
((ptile)->neighborhood.top)

The simple wrapper to access each image's neighborhood -Y value.

Parameters
[in]ptileThe pointer to the vx_tile_t structure.

◆ vxTileBlockHeight

#define vxTileBlockHeight ( ptile)

#include <vx_khr_tiling.h>

Value:
((ptile)->tile_block.height)

The tile block height.

Parameters
[in]ptileThe pointer to the vx_tile_t structure.

◆ vxTileBlockWidth

#define vxTileBlockWidth ( ptile)

#include <vx_khr_tiling.h>

Value:
((ptile)->tile_block.width)

The tile block width.

Parameters
[in]ptileThe pointer to the vx_tile_t structure.

◆ vxTileHeight

#define vxTileHeight ( ptile,
index )

#include <vx_khr_tiling.h>

Value:
((ptile)->addr[index].dim_y)

The height of the tile in pixels.

Parameters
[in]ptileThe pointer to the vx_tile_t structure.
[in]indexThe plane index.

◆ vxTileWidth

#define vxTileWidth ( ptile,
index )

#include <vx_khr_tiling.h>

Value:
((ptile)->addr[index].dim_x)

The width of the tile in pixels.

Parameters
[in]ptileThe pointer to the vx_tile_t structure.
[in]indexThe plane index.

◆ vxTileX

#define vxTileX ( ptile)

#include <vx_khr_tiling.h>

Value:
((ptile)->tile_x)

The offset between the left edge of the image and the left edge of the tile, in pixels.

Parameters
[in]ptileThe pointer to the vx_tile_t structure.

◆ vxTileY

#define vxTileY ( ptile)

#include <vx_khr_tiling.h>

Value:
((ptile)->tile_y)

The offset between the top edge of the image and the top edge of the tile, in pixels.

Parameters
[in]ptileThe pointer to the vx_tile_t structure.

Typedef Documentation

◆ vx_image_description_t

#include <vx_khr_tiling.h>

A structure which describes the tile's parent image.

◆ vx_neighborhood_size_t

#include <vx_khr_tiling.h>

The User Tiling Function Neighborhood declaration.

The author of a User Tiling Kernel will use this structure to define the neighborhood surrounding the tile block.

◆ vx_tile_block_size_t

#include <vx_khr_tiling.h>

The User Tiling Function tile block size declaration.

The author of a User Tiling Kernel will use this structure to define the dimensionality of the tile block.

◆ vx_tile_t

typedef struct _vx_tile_t vx_tile_t

#include <vx_khr_tiling.h>

The tile structure declaration.

◆ vx_tiling_kernel_f

typedef void(* vx_tiling_kernel_f) (void *VX_RESTRICT parameters[VX_RESTRICT], void *VX_RESTRICT tile_memory, vx_size tile_memory_size)

#include <vx_khr_tiling.h>

Tiling Kernel function typedef for User Tiling Kernels.

Note
Tiles may come in any dimension and are not guaranteed to be delivered in any particular order.
Parameters
[in]parametersThe array abstract pointers to parameters.
[in]tile_memoryThe local tile memory pointer if requested, otherwise NULL.
[in]tile_memory_sizeThe size of the local tile memory, if not requested, 0.

Enumeration Type Documentation

◆ vx_border_tiling_e

#include <vx_khr_tiling.h>

The tiling border mode extensions.

Enumerator
VX_BORDER_MODE_SELF 

This value indicates that the author of the tiling kernel wrote code to handle border conditions into the kernel itself. If this mode is set, it can not be overriden by a call to the vxSetNodeAttribute with VX_NODE_BORDER.

◆ vx_kernel_attribute_tiling_e

#include <vx_khr_tiling.h>

The User Kernel Tiling Attributes.

Enumerator
VX_KERNEL_INPUT_NEIGHBORHOOD 

This allows a tiling mode kernel to set its input neighborhood.

VX_KERNEL_OUTPUT_TILE_BLOCK_SIZE 

This allows a tiling mode kernel to set its output tile block size.

VX_KERNEL_BORDER 

This allows the author to set the border mode on the tiling kernel.

VX_KERNEL_TILE_MEMORY_SIZE 

This determines the per tile memory allocation.

◆ vx_node_attribute_tiling_e

#include <vx_khr_tiling.h>

The User Node Tiling Attributes.

Note
These are largely unusable by the tiling function, as it doesn't give you the node reference!
Enumerator
VX_NODE_INPUT_NEIGHBORHOOD 

This allows a tiling mode node to get its input neighborhood.

VX_NODE_OUTPUT_TILE_BLOCK_SIZE 

This allows a tiling mode node to get its output tile block size.

VX_NODE_TILE_MEMORY_SIZE 

This is the size of the tile local memory area.

Function Documentation

◆ vxAddTilingKernel()

VX_API_ENTRY vx_kernel VX_API_CALL vxAddTilingKernel ( vx_context context,
vx_char name[VX_MAX_KERNEL_NAME],
vx_enum enumeration,
vx_tiling_kernel_f flexible_func_ptr,
vx_tiling_kernel_f fast_func_ptr,
vx_uint32 num_params,
vx_kernel_input_validate_f input,
vx_kernel_output_validate_f output )

#include <vx_khr_tiling.h>

Allows a user to add a tile-able kernel to the OpenVX system.

Parameters
[in]contextThe handle to the implementation context.
[in]nameThe string to be used to match the kernel.
[in]enumerationThe enumerated value of the kernel to be used by clients.
[in]flexible_func_ptrThe process-local flexible function pointer to be invoked.
[in]fast_func_ptrThe process-local fast function pointer to be invoked.
[in]num_paramsThe number of parameters for this kernel.
[in]inputThe pointer to a function which will validate the input parameters to this kernel.
[in]outputThe pointer to a function which will validate the output parameters to this kernel.
Note
Tiling Kernels do not have access to any of the normal node attributes listed in vx_node_attribute_e.
Postcondition
Call vxAddParameterToKernel for as many parameters as the function has, then call vxFinalizeKernel.
Return values
0Indicates that an error occurred when adding the kernel. Note that the fast or flexible formula, but not both, can be NULL.