Tutorial Node: Attributes With CUDA Data#
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.
Installation#
To use this Node, you must enable omni.graph.tutorials
in the Extension Manager.
Inputs#
Name |
Type |
Description |
Default |
---|---|---|---|
a |
|
First value to be added in algorithm 1 |
0.0 |
b |
|
Second value to be added in algorithm 1 |
0.0 |
points |
|
Points to be moved by algorithm 2 |
[] |
multiplier |
|
Amplitude of the expansion for the input points in algorithm 2 |
[1.0, 1.0, 1.0] |
half |
|
Input of type half for algorithm 3 |
1.0 |
color |
|
Input with three doubles as a color for algorithm 3 |
[1.0, 0.5, 1.0] |
matrix |
|
Input with 16 doubles interpreted as a double-precision 4d matrix |
[[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]] |
Outputs#
Name |
Type |
Description |
Default |
---|---|---|---|
sum |
|
Sum of the two inputs from algorithm 1 |
|
points |
|
Final positions of points from algorithm 2 |
|
half |
|
Output of type half for algorithm 3 |
|
color |
|
Output with three doubles as a color for algorithm 3 |
|
matrix |
|
Output with 16 doubles interpreted as a double-precision 4d matrix |