#usda 1.0
(
    doc ="""Generated from node description file OgnTutorialCpuGpuData.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_CpuGpuData" (
        docs="""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."""
    )
    {
        token node:type = "omni.graph.tutorials.CpuGpuData"
        int node:typeVersion = 1

        # 5 attributes
        custom float inputs:a = 0.0 (
            docs="""First value to be added in algorithm 1"""
        )
        custom float inputs:b = 0.0 (
            docs="""Second value to be added in algorithm 1"""
        )
        custom bool inputs:is_gpu = false (
            docs="""Runtime switch determining where the data for the other attributes lives."""
        )
        custom float3 inputs:multiplier = (1.0, 1.0, 1.0) (
            docs="""Amplitude of the expansion for the input points in algorithm 2"""
        )
        custom float3[] inputs:points = [] (
            docs="""Points to be moved by algorithm 2"""
        )

        # 2 attributes
        custom float3[] outputs:points (
            docs="""Final positions of points from algorithm 2"""
        )
        custom float outputs:sum (
            docs="""Sum of the two inputs from algorithm 1"""
        )
    }
}
