OmniGraph Node omni.graph.tutorials.CudaData

omni.graph.tutorials.CudaData Properties

Name

Value

Version

1

Extension

omni.graph.tutorials

Icon

ogn/icons/omni.graph.tutorials.CudaData.svg

Has State?

False

Implementation Language

C++

Default Memory Type

cuda

Generated Code Exclusions

None

uiName

Tutorial Node: Attributes With CUDA Data

__memoryType

cuda

__categories

tutorials

Generated Class Name

OgnTutorialCudaDataDatabase

Python Module

omni.graph.tutorials

omni.graph.tutorials.CudaData Description

This is a tutorial node. It performs different functions on the GPU to illustrate different types of data access. The first adds inputs ‘a’ and ‘b’ to yield output ‘sum’, all of which are on the GPU. The second is a sample expansion deformation that multiplies every point on a set of input points, stored on the GPU, by a constant value, stored on the CPU, to yield a set of output points, also on the GPU. The third is an assortment of different data types illustrating how different data is passed to the GPU. This particular node uses CUDA for its GPU computations, as indicated in the memory type value. Normal use case for GPU compute is large amounts of data. For testing purposes this node only handles a very small amount but the principle is the same.

omni.graph.tutorials.CudaData Inputs

Name

Type

Default

Required?

Descripton

inputs:a

float

0.0

Y

First value to be added in algorithm 1

__default

0.0

inputs:b

float

0.0

Y

Second value to be added in algorithm 1

__default

0.0

inputs:color

colord[3]

[1.0, 0.5, 1.0]

Y

Input with three doubles as a color for algorithm 3

__default

[1.0, 0.5, 1.0]

inputs:half

half

1.0

Y

Input of type half for algorithm 3

__default

1.0

inputs:matrix

matrixd[4]

[[1.0, 0.0, 0.0, 0.0], [0.0, 1.0, 0.0, 0.0], [0.0, 0.0, 1.0, 0.0], [0.0, 0.0, 0.0, 1.0]]

Y

Input with 16 doubles interpreted as a double-precision 4d matrix

__default

[[1.0, 0.0, 0.0, 0.0], [0.0, 1.0, 0.0, 0.0], [0.0, 0.0, 1.0, 0.0], [0.0, 0.0, 0.0, 1.0]]

inputs:multiplier

float[3]

[1.0, 1.0, 1.0]

Y

Amplitude of the expansion for the input points in algorithm 2

__memoryType

cpu

__default

[1.0, 1.0, 1.0]

inputs:points

float[3][]

[]

Y

Points to be moved by algorithm 2

__default

[]

omni.graph.tutorials.CudaData Outputs

Name

Type

Default

Required?

Descripton

outputs:color

colord[3]

None

Y

Output with three doubles as a color for algorithm 3

outputs:half

half

None

Y

Output of type half for algorithm 3

outputs:matrix

matrixd[4]

None

Y

Output with 16 doubles interpreted as a double-precision 4d matrix

outputs:points

float[3][]

None

Y

Final positions of points from algorithm 2

outputs:sum

float

None

Y

Sum of the two inputs from algorithm 1