Loading...
Searching...
No Matches
extComputationSchema.h
Go to the documentation of this file.
1//
2// Copyright 2023 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
8
9/* ************************************************************************** */
10/* ** ** */
11/* ** This file is generated by a script. ** */
12/* ** ** */
13/* ** Do not edit it directly (unless it is within a CUSTOM CODE section)! ** */
14/* ** Edit hdSchemaDefs.py instead to make changes. ** */
15/* ** ** */
16/* ************************************************************************** */
17
18#ifndef PXR_IMAGING_HD_EXT_COMPUTATION_SCHEMA_H
19#define PXR_IMAGING_HD_EXT_COMPUTATION_SCHEMA_H
20
22
23#include "pxr/imaging/hd/api.h"
24
25#include "pxr/imaging/hd/schema.h"
26
27// --(BEGIN CUSTOM CODE: Includes)--
28// --(END CUSTOM CODE: Includes)--
29
30PXR_NAMESPACE_OPEN_SCOPE
31
32// --(BEGIN CUSTOM CODE: Declares)--
33// --(END CUSTOM CODE: Declares)--
34
35#define HD_EXT_COMPUTATION_SCHEMA_TOKENS \
36 (extComputation) \
37 (inputValues) \
38 (inputComputations) \
39 (outputs) \
40 (glslKernel) \
41 (cpuCallback) \
42 (dispatchCount) \
43 (elementCount) \
44
45TF_DECLARE_PUBLIC_TOKENS(HdExtComputationSchemaTokens, HD_API,
46 HD_EXT_COMPUTATION_SCHEMA_TOKENS);
47
48//-----------------------------------------------------------------------------
49
50
51class HdExtComputationSchema : public HdSchema
52{
53public:
56
57 HdExtComputationSchema(HdContainerDataSourceHandle container)
58 : HdSchema(container) {}
59
65 HD_API
66 static HdExtComputationSchema GetFromParent(
67 const HdContainerDataSourceHandle &fromParentContainer);
68
70
71// --(BEGIN CUSTOM CODE: Schema Methods)--
72// --(END CUSTOM CODE: Schema Methods)--
73
76
77 HD_API
78 HdContainerDataSourceHandle GetInputValues() const;
79
80 HD_API
81 HdVectorDataSourceHandle GetInputComputations() const;
82
83 HD_API
84 HdVectorDataSourceHandle GetOutputs() const;
85
86 HD_API
87 HdStringDataSourceHandle GetGlslKernel() const;
88
89 HD_API
90 HdDataSourceBaseHandle GetCpuCallback() const;
91
92 HD_API
93 HdSizetDataSourceHandle GetDispatchCount() const;
94
95 HD_API
96 HdSizetDataSourceHandle GetElementCount() const;
97
99
102
105 HD_API
106 static const TfToken &GetSchemaToken();
107
110 HD_API
111 static const HdDataSourceLocator &GetDefaultLocator();
112
114
123
125 HD_API
126 static const HdDataSourceLocator &GetInputValuesLocator();
127
129 HD_API
130 static const HdDataSourceLocator &GetInputComputationsLocator();
131
133 HD_API
134 static const HdDataSourceLocator &GetOutputsLocator();
135
137 HD_API
138 static const HdDataSourceLocator &GetGlslKernelLocator();
139
141 HD_API
142 static const HdDataSourceLocator &GetCpuCallbackLocator();
143
145 HD_API
146 static const HdDataSourceLocator &GetDispatchCountLocator();
147
149 HD_API
150 static const HdDataSourceLocator &GetElementCountLocator();
152
155
163 HD_API
164 static HdContainerDataSourceHandle
165 BuildRetained(
166 const HdContainerDataSourceHandle &inputValues,
167 const HdVectorDataSourceHandle &inputComputations,
168 const HdVectorDataSourceHandle &outputs,
169 const HdStringDataSourceHandle &glslKernel,
170 const HdDataSourceBaseHandle &cpuCallback,
171 const HdSizetDataSourceHandle &dispatchCount,
172 const HdSizetDataSourceHandle &elementCount
173 );
174
182 {
183 public:
184 HD_API
185 Builder &SetInputValues(
186 const HdContainerDataSourceHandle &inputValues);
187 HD_API
188 Builder &SetInputComputations(
189 const HdVectorDataSourceHandle &inputComputations);
190 HD_API
191 Builder &SetOutputs(
192 const HdVectorDataSourceHandle &outputs);
193 HD_API
194 Builder &SetGlslKernel(
195 const HdStringDataSourceHandle &glslKernel);
196 HD_API
197 Builder &SetCpuCallback(
198 const HdDataSourceBaseHandle &cpuCallback);
199 HD_API
200 Builder &SetDispatchCount(
201 const HdSizetDataSourceHandle &dispatchCount);
202 HD_API
203 Builder &SetElementCount(
204 const HdSizetDataSourceHandle &elementCount);
205
207 HD_API
208 HdContainerDataSourceHandle Build();
209
210 private:
211 HdContainerDataSourceHandle _inputValues;
212 HdVectorDataSourceHandle _inputComputations;
213 HdVectorDataSourceHandle _outputs;
214 HdStringDataSourceHandle _glslKernel;
215 HdDataSourceBaseHandle _cpuCallback;
216 HdSizetDataSourceHandle _dispatchCount;
217 HdSizetDataSourceHandle _elementCount;
218
219 };
220
222};
223
224PXR_NAMESPACE_CLOSE_SCOPE
225
226#endif
Represents an object that can identify the location of a data source.
Utility class for setting sparse sets of child data source fields to be filled as arguments into Buil...
HD_API HdContainerDataSourceHandle Build()
Returns a container data source containing the members set thus far.
Schema classes represent a structured view of the inherently unstructured container data source passe...
Definition: schema.h:26
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:71
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.
Definition: staticTokens.h:81