Click or drag to resize
SoCuda Class

Cuda module class.

Inheritance Hierarchy
SystemObject
  OIV.InventorSoNetBase
    OIV.Inventor.CudaSoCuda

Namespace: OIV.Inventor.Cuda
Assembly: OIV.Inventor.Cuda (in OIV.Inventor.Cuda.dll) Version: 9.9.36.0 (9.9.36.0)
Syntax
public sealed class SoCuda : SoNetBase

The SoCuda type exposes the following members.

Methods
  NameDescription
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodStatic memberFindFunction(String, String)

This function resolves a specific function in a specified module.

Public methodStatic memberFindFunction(SoCudaHandle, String, String)

This function resolves a specific function in a specified module.

Public methodGetHashCode
Overrides GetHashCode().
(Inherited from SoNetBase.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodStatic memberIsAvailable

This function indicates if CUDA is available on this platform.

Public methodStatic memberLoadBinaryModule

This function loads a cubin file and register it in the list of modules.

Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Remarks

The Open Inventor CUDA module provides a set of useful functions for CUDA development including memory management, module handling and device management functions.

<font color="#0000FF">NOTE:</font> The classes in this module do not exist in Open Inventor 10.0 and later.

This module also provides built-in CUDA functions to quickly integrate in your application the CUDA functions useful to improve your computing performences.

The integrated modules are organized in different topics:

  • Conversion

  • Volumes

  • ....

    USAGE

    After the initialization of OpenInventor the CUDA module must be initialized using the init function. Before exiting the application the finish function must be called, in order to free all the memory allocated by the module.

    NOTES

    After the initialization of the CUDA module there is no default CudaContext, so don't forget to create a CUDA context before performing any CUDA operation. See the class SoCudaContext for more information.

    EXAMPLE

    This example shows how to call a specific CUDA function.

...

SoCuda.init();
SoCudaDevice* pMainDevice = SoCudaDevice.findFirstAvailableDevice();
if ( pMainDevice ) {
 SoCudaContext* pContext = new SoCudaContext( pMainDevice );
 if ( pContext ) {
   pContext->bind();
   SoCudaHandle* pHandle = SoCuda.findFunction( "ModuleName", "FunctionName" );
   if ( pHandle ) {
     SoCudaApi.launch( pHandle, 10, 1 );
     SoCudaApi.freeHandle( pHandle );
   }
   pContext->unbind();
 }
}
SoCuda.finish();

See Also