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#include "pxr/imaging/hd/schemaTypeDefs.h"
25
26#include "pxr/imaging/hd/schema.h"
27
28// --(BEGIN CUSTOM CODE: Includes)--
29// --(END CUSTOM CODE: Includes)--
30
31PXR_NAMESPACE_OPEN_SCOPE
32
33// --(BEGIN CUSTOM CODE: Declares)--
34
35using HdExtComputationCpuCallbackSharedPtr =
36 std::shared_ptr<class HdExtComputationCpuCallback>;
39using HdExtComputationCpuCallbackDataSourceHandle =
40 HdExtComputationCpuCallbackDataSource::Handle;
41
42// --(END CUSTOM CODE: Declares)--
43
44#define HD_EXT_COMPUTATION_SCHEMA_TOKENS \
45 (extComputation) \
46 (inputValues) \
47 (inputComputations) \
48 (outputs) \
49 (glslKernel) \
50 (cpuCallback) \
51 (dispatchCount) \
52 (elementCount) \
53
54TF_DECLARE_PUBLIC_TOKENS(HdExtComputationSchemaTokens, HD_API,
55 HD_EXT_COMPUTATION_SCHEMA_TOKENS);
56
57//-----------------------------------------------------------------------------
58
59
62class HdExtComputationSchema : public HdSchema
63{
64public:
67
68 HdExtComputationSchema(HdContainerDataSourceHandle container)
69 : HdSchema(container) {}
70
76 HD_API
77 static HdExtComputationSchema GetFromParent(
78 const HdContainerDataSourceHandle &fromParentContainer);
79
81
82// --(BEGIN CUSTOM CODE: Schema Methods)--
83// --(END CUSTOM CODE: Schema Methods)--
84
87
88 HD_API
89 HdSampledDataSourceContainerSchema GetInputValues() const;
90
91 HD_API
92 HdExtComputationInputComputationContainerSchema GetInputComputations() const;
93
94 HD_API
96
97 HD_API
98 HdStringDataSourceHandle GetGlslKernel() const;
99
100 HD_API
101 HdExtComputationCpuCallbackDataSourceHandle GetCpuCallback() const;
102
103 HD_API
104 HdSizetDataSourceHandle GetDispatchCount() const;
105
106 HD_API
107 HdSizetDataSourceHandle GetElementCount() const;
108
110
113
116 HD_API
117 static const TfToken &GetSchemaToken();
118
121 HD_API
122 static const HdDataSourceLocator &GetDefaultLocator();
123
125
134
136 HD_API
137 static const HdDataSourceLocator &GetInputValuesLocator();
138
140 HD_API
141 static const HdDataSourceLocator &GetInputComputationsLocator();
142
144 HD_API
145 static const HdDataSourceLocator &GetOutputsLocator();
146
148 HD_API
149 static const HdDataSourceLocator &GetGlslKernelLocator();
150
152 HD_API
153 static const HdDataSourceLocator &GetCpuCallbackLocator();
154
156 HD_API
157 static const HdDataSourceLocator &GetDispatchCountLocator();
158
160 HD_API
161 static const HdDataSourceLocator &GetElementCountLocator();
163
166
174 HD_API
175 static HdContainerDataSourceHandle
176 BuildRetained(
177 const HdContainerDataSourceHandle &inputValues,
178 const HdContainerDataSourceHandle &inputComputations,
179 const HdContainerDataSourceHandle &outputs,
180 const HdStringDataSourceHandle &glslKernel,
181 const HdExtComputationCpuCallbackDataSourceHandle &cpuCallback,
182 const HdSizetDataSourceHandle &dispatchCount,
183 const HdSizetDataSourceHandle &elementCount
184 );
185
193 {
194 public:
195 HD_API
196 Builder &SetInputValues(
197 const HdContainerDataSourceHandle &inputValues);
198 HD_API
199 Builder &SetInputComputations(
200 const HdContainerDataSourceHandle &inputComputations);
201 HD_API
202 Builder &SetOutputs(
203 const HdContainerDataSourceHandle &outputs);
204 HD_API
205 Builder &SetGlslKernel(
206 const HdStringDataSourceHandle &glslKernel);
207 HD_API
208 Builder &SetCpuCallback(
209 const HdExtComputationCpuCallbackDataSourceHandle &cpuCallback);
210 HD_API
211 Builder &SetDispatchCount(
212 const HdSizetDataSourceHandle &dispatchCount);
213 HD_API
214 Builder &SetElementCount(
215 const HdSizetDataSourceHandle &elementCount);
216
218 HD_API
219 HdContainerDataSourceHandle Build();
220
221 private:
222 HdContainerDataSourceHandle _inputValues;
223 HdContainerDataSourceHandle _inputComputations;
224 HdContainerDataSourceHandle _outputs;
225 HdStringDataSourceHandle _glslKernel;
226 HdExtComputationCpuCallbackDataSourceHandle _cpuCallback;
227 HdSizetDataSourceHandle _dispatchCount;
228 HdSizetDataSourceHandle _elementCount;
229
230 };
231
233};
234
235PXR_NAMESPACE_CLOSE_SCOPE
236
237#endif
Template class for a schema backed by a container whose children have arbitrary names but an expected...
Template class for a schema backed by a container whose children have arbitrary names but an expected...
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
A datasource representing a concretely-typed sampled value.
Definition: dataSource.h:193
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:92