25.2. Open Inventor Algorithm modules

The InvAlgorithms module provides useful algorithms for arithmetic operations, data conversions, data extraction, etc.

Inventor algorithm modules hierarchy

Figure 25.2. Inventor algorithm modules hierarchy



All the algorithms are located in the directory Inventor/algorithms. They can be used on any type of SoBufferObject SoBufferObject SoBufferObject :

The class SoAlgorithms SoAlgorithms SoAlgorithms is a class designed to provide generic access to algorithms developed for specific hardware using a “plugin” mechanism described in the following section.

Algorithm modules for specific hardware

The InvAlgorithms module provides a mechanism to develop different versions of the algorithms for specific hardware. This mechanism is provided by the class SoAlgorithms SoAlgorithms SoAlgorithms .

The CUDA example

See: $OIVHOME/src/Inventor/examples/Features/CUDA/TextureConvolution.

Main concept

The CUDA algorithms module InvCuda is a separate module which can be loaded dynamically or using the headers from the module. When this module is loaded (using the class SoAlgorithms SoAlgorithms SoAlgorithms ) it returns an overloaded version of the class SoAlgorithms SoAlgorithms SoAlgorithms which can be used to return an instance of the algorithms class implemented for CUDA.

The CUDA algorithms interface

The CUDA version of the algorithms provides access to the SoCudaBufferObject SoCudaBufferObject and SoCpuBufferObject SoCpuBufferObject SoCpuBufferObject version of the APIs.

SSE support for CPU algorithms

The standard algorithms, provided by the InvAlgorithms module, use the SSE2 instruction set for fast conversions (used internally for example by the SoDataRange SoDataRange SoDataRange node in VolumeViz). SSE2 instructions are used by default but it’s possible to disable this by setting the preference OIV_NO_SSE to 1.