Tutorial Node: CPU/GPU Extended Attributes

This is a tutorial node. It exercises functionality for accessing data in extended attributes that are on the GPU as well as those whose CPU/GPU location is decided at runtime. The compute adds the two inputs ‘gpuData’ and ‘cpuData’ together, placing the result in cpuGpuSum, whose memory location is determined by the ‘gpu’ flag. This node is identical to OgnTutorialCpuGpuExtendedPy.ogn, except is is implemented in C++.

Installation

To use this Node, you must enable omni.graph.tutorials in the Extension Manager.

Inputs

Name

Type

Description

Default

CPU Input Attribute (cpuData)

any

Input attribute whose data always lives on the CPU

GPU Input Attribute (gpuData)

any

Input attribute whose data always lives on the GPU

Results To GPU (gpu)

bool

If true then put the sum on the GPU, otherwise put it on the CPU

Outputs

Name

Type

Description

Default

Sum (cpuGpuSum)

any

This is the attribute with the selected data. If the ‘gpu’ attribute is set to true then this attribute’s contents will be entirely on the GPU, otherwise it will be on the CPU.