Tutorial Node: Attributes With CPU/GPU Data
This is a tutorial node. It illustrates how to access data whose memory location, CPU or GPU, is determined at runtime in the compute method. The data types are the same as for the purely CPU and purely GPU tutorials, it is only the access method that changes. The input ‘is_gpu’ determines where the data of the other attributes can be accessed.
Installation
To use this node enable omni.graph.tutorials in the Extension Manager.
Inputs
Name |
Type |
Descripton |
Default |
---|---|---|---|
A (inputs:a) |
|
First value to be added in algorithm 1 |
0.0 |
B (inputs:b) |
|
Second value to be added in algorithm 1 |
0.0 |
Is Gpu (inputs:is_gpu) |
|
Runtime switch determining where the data for the other attributes lives. |
False |
Multiplier (inputs:multiplier) |
|
Amplitude of the expansion for the input points in algorithm 2 |
[1.0, 1.0, 1.0] |
Points (inputs:points) |
|
Points to be moved by algorithm 2 |
[] |
Outputs
Name |
Type |
Descripton |
Default |
---|---|---|---|
Points (outputs:points) |
|
Final positions of points from algorithm 2 |
None |
Sum (outputs:sum) |
|
Sum of the two inputs from algorithm 1 |
None |
Metadata
Name |
Value |
---|---|
Unique ID |
omni.graph.tutorials.CpuGpuData |
Version |
1 |
Extension |
omni.graph.tutorials |
Icon |
ogn/icons/omni.graph.tutorials.CpuGpuData.svg |
Has State? |
False |
Implementation Language |
C++ |
Default Memory Type |
any |
Generated Code Exclusions |
None |
uiName |
Tutorial Node: Attributes With CPU/GPU Data |
__memoryType |
any |
Categories |
tutorials |
Generated Class Name |
OgnTutorialCpuGpuDataDatabase |
Python Module |
omni.graph.tutorials |
See the accompanying tutorial and annotated code at Tutorial 9 - Runtime CPU/GPU Decision