#usda 1.0
(
    doc ="""Generated from node description file OgnTutorialCpuGpuExtendedPy.ogn
Contains templates for node types found in that file."""
)

def OmniGraph "TestGraph"
{
    token evaluator:type = "push"
    int2 fileFormatVersion = (1, 3)
    token flatCacheBacking = "Shared"
    token pipelineStage = "pipelineStageSimulation"

    def OmniGraphNode "Template_omni_graph_tutorials_CpuGpuExtendedPy" (
        docs="""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 OgnTutorialCpuGpuExtended.ogn, except is is implemented in Python."""
    )
    {
        token node:type = "omni.graph.tutorials.CpuGpuExtendedPy"
        int node:typeVersion = 1

        # 3 attributes
        custom token inputs:cpuData = "any" (
            docs="""Input attribute whose data always lives on the CPU"""
        )
        custom bool inputs:gpu = false (
            docs="""If true then put the sum on the GPU, otherwise put it on the CPU"""
        )
        custom token inputs:gpuData = "any" (
            docs="""Input attribute whose data always lives on the GPU"""
        )

        # 1 attribute
        custom token outputs:cpuGpuSum = "any" (
            docs="""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."""
        )
    }
}
