• 04/03/2020
  • Public Content
Contents

Optional Callbacks for Kernels Supporting Advanced Tiling

An advanced tiling kernel can optionally provide the following callback functions, which if set, are called by the OpenVX* runtime within
vxVerifyGraph
or
vxProcessGraph
:
  • Initialize
    typedef vx_status (*vx_kernel_initialize_f)(vx_node node, const vx_reference *parameters, vx_uint32 num);
    If set, called once during
    vxVerifyGraph
    after all input and output parameters have been verified.
  • De-Initialize
    typedef vx_status (*vx_kernel_deinitialize_f)(vx_node node, const vx_reference *parameters, vx_uint32 num);
    If set, this function is called during node destruction.
    The two functions above are regular callbacks required for any user kernel as defined by the OpenVX* 1.0.1/1.1 specifications. Refer to the standard specification from Khronos* for more details on usage and the Putting it all Together: Example Code section for a code example.
  • Pre-Process
    typedef vx_status (*vx_kernel_preprocess_intel_f)(vx_node node, const vx_reference *parameters, vx_uint32 num, void * tile_memory[], vx_uint32 num_tile_memory_elements,vx_size tile_memory_size);
    If set, this function is called once at the beginning of each user call to
    vxProcessGraph
    , before any nodes in the graph have started processing. It is intended to be used to perform any required per-vxProcessGraph initialization, which may be required for certain kernels.
  • Post-Process
    typedef vx_status (*vx_kernel_postprocess_intel_f)(vx_node node, const vx_reference *parameters, vx_uint32 num, void * tile_memory[], vx_uint32 num_tile_memory_elements,vx_size tile_memory_size);
    If set, this function is called once at the end of each user call to
    vxProcessGraph
    , after all nodes in the graph have completed processing. It is intended to be used to perform any required per-vxProcessGraph de-initialization or data aggregation that may be required for certain kernels.
    NOTE: As this function is called after all nodes in the graph have completed processing, it is not a good idea to set values of output parameters in this function, if the parameter is further used as an input parameter to another node in the same graph.
  • Set Tile Dimensions
    typedef vx_status (*vx_kernel_set_tile_dimensions_intel_f)(vx_node node, const vx_reference *parameters, vx_uint32 param_num, const vx_tile_block_size_intel_t *current_tile_dimensions, vx_tile_block_size_intel_t *updated_tile_dimensions);
    If set, this function is called within
    vxVerifyGraph
    to give a kernel the ability to override the current output tile size chosen by the runtime with a custom tile size. For example, a kernel may be designed to work only with tile widths that equal the output image size. The function is required to set the updated tile dimensions using a combination of the kernel parameters and current tile dimensions, which is passed in as an input parameter.
  • Initialize (as a function of tile dimensions)
    typedef vx_status (*vx_kernel_tile_dimensions_initialize_intel_f)(vx_node node, const vx_reference *parameters, vx_uint32 param_num, const vx_tile_block_size_intel_t *current_tile_dimensions);
    If set, this function is called within
    vxVerifyGraph
    to give a kernel the ability to perform some initialization as a function of the currently set tile dimensions. For example, a kernel may want to set some node attribute, such as
    VX_KERNEL_TILE_MEMORY_SIZE_INTEL
    , as a function of the currently set tile dimensions.

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804