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

        # 7 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 color3d inputs:color = (1.0, 0.5, 1.0) (
            docs="""Input with three doubles as a color for algorithm 3"""
        )
        custom half inputs:half = 1.0 (
            docs="""Input of type half for algorithm 3"""
        )
        custom matrix4d inputs: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)) (
            docs="""Input with 16 doubles interpreted as a double-precision 4d matrix"""
        )
        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"""
        )

        # 5 attributes
        custom color3d outputs:color (
            docs="""Output with three doubles as a color for algorithm 3"""
        )
        custom half outputs:half (
            docs="""Output of type half for algorithm 3"""
        )
        custom matrix4d outputs:matrix (
            docs="""Output with 16 doubles interpreted as a double-precision 4d matrix"""
        )
        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"""
        )
    }
}
