SoCuda Class Reference
[CUDA device]

VSG extension Cuda module class More...

#include <Inventor/cuda/SoCuda.h>

List of all members.

Classes

struct  SoCudaModule
 Defines a CUDA module.

Public Types

enum  SoCudaError {
  SO_CUDA_SUCCESS,
  SO_CUDA_MODULE_LOAD_ERROR,
  SO_CUDA_MODULE_FUNCTION_ERROR,
  SO_CUDA_INVALID_PARAMETER,
  SO_CUDA_INVALID_CONTEXT
}

Static Public Member Functions

static void init ()
static void finish ()
static bool isInitialized ()
static SbBool isAvailable ()
static SoCudaError loadBinaryModule (const SbString &filename, const SbString &moduleName)
static SoCudaError loadBinaryModule (const void *moduleData, size_t dataSize, const SbString &moduleName)
static SoCudaHandle * findFunction (const SbString &moduleName, const SbString &functionName)
static SoCudaError findFunction (SoCudaHandle *handle, const SbString &moduleName, const SbString &functionName)

Detailed Description

VSG extension Cuda module class

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

NOTE: 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:

USAGE

NOTES

EXAMPLE

SEE ALSO

SoCudaApi, SoCudaContext, SoCudaDevice, SoCudaBufferObject, SoCudaArithmetic, SoCudaConversion, SoCudaConvolution, SoCudaSeismic

See related examples:

HelloCUDA, SimpleCUDAKernel, ComputeSlice, CudaMarchingCubes, LDMMandelBulb


Member Enumeration Documentation

This enum defines the possible errors returned by the Cuda API.

Enumerator:
SO_CUDA_SUCCESS 

No error, the operation is a success.

SO_CUDA_MODULE_LOAD_ERROR 

Error: The specified module cannot be loaded.

SO_CUDA_MODULE_FUNCTION_ERROR 

Error: The specified function cannot be loaded.

SO_CUDA_INVALID_PARAMETER 

Error: One of the specified paramaters is invalid.

SO_CUDA_INVALID_CONTEXT 

This error indicates that there is no valid CUDA context to perform the requested operation.


See the SoCudaContext class to create a CUDA context.


Member Function Documentation

static SoCudaError SoCuda::findFunction ( SoCudaHandle *  handle,
const SbString moduleName,
const SbString functionName 
) [static]

This function resolves a specific function in a specified module.

Parameters:
handle The handle which is updated with the function pointer.
moduleName The name of the module which is supposed to contain the function.
functionName The name of the function to resolve.
Returns:
An error code.
static SoCudaHandle* SoCuda::findFunction ( const SbString moduleName,
const SbString functionName 
) [static]

This function resolves a specific function in a specified module.

Parameters:
moduleName The name of the module which is supposed to contain the function.
functionName The name of the function to resolve.
Returns:
A CUDA handle on the function, or NULL if the function was not found!
static void SoCuda::finish (  )  [static]

Unload the CUDA module and free the data.

static void SoCuda::init (  )  [static]

Initialize the CUDA module.

static SbBool SoCuda::isAvailable (  )  [static]

This function indicates if CUDA is available on this platform.

Returns:
True if at least one CUDA enabled device is available in the system.
static bool SoCuda::isInitialized (  )  [static]

Returns TRUE if module is currently initialized.

static SoCudaError SoCuda::loadBinaryModule ( const void *  moduleData,
size_t  dataSize,
const SbString moduleName 
) [static]

This function loads a cubin from the specified buffer and register it in the list of modules.

Parameters:
moduleData The cubin buffer.
dataSize The size in bytes of the cubin buffer.
moduleName The name of the module linked to the file.
Returns:
An error code is returned on error, 0 means no error.
static SoCudaError SoCuda::loadBinaryModule ( const SbString filename,
const SbString moduleName 
) [static]

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

Parameters:
filename The cubin filename.
moduleName The name of the module linked to the file.
Returns:
An error code is returned on error, 0 means no error.

The documentation for this class was generated from the following file:

Open Inventor by FEI reference manual, generated on 19 Aug 2019
Copyright © FEI S.A.S. All rights reserved.
http://www.openinventor.com/