HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_OpenCL.proto.h
Go to the documentation of this file.
1 /* Automagically Generated by generate_proto.py
2  * Do not Edit
3  */
4 #pragma once
5 
6 #include <SOP/SOP_API.h>
7 #include <SOP/SOP_NodeVerb.h>
8 #include <SOP/SOP_GraphProxy.h>
9 
10 #include <OP/OP_Utils.h>
11 #include <PRM/PRM_Parm.h>
12 #include <UT/UT_IStream.h>
13 #include <UT/UT_NTStreamUtil.h>
14 #include <UT/UT_Ramp.h>
15 #include <UT/UT_SharedPtr.h>
16 #include <UT/UT_StringHolder.h>
17 #include <UT/UT_StringStream.h>
18 #include <UT/UT_VectorTypes.h>
19 #include <UT/UT_EnvControl.h>
20 #include <SYS/SYS_Types.h>
21 
22 class DEP_MicroNode;
23 namespace SOP_OpenCLEnums
24 {
25  enum class RunOver
26  {
27  ATTRIBUTE = 0,
28  VOLUME,
29  WORKSETS,
30  VDB
31  };
32 
34  getToken(RunOver enum_value)
35  {
36  using namespace UT::Literal;
37  switch (enum_value) {
38  case RunOver::ATTRIBUTE: return "attribute"_sh;
39  case RunOver::VOLUME: return "volume"_sh;
40  case RunOver::WORKSETS: return "worksets"_sh;
41  case RunOver::VDB: return "vdb"_sh;
42  default: UT_ASSERT(false); return ""_sh;
43  }
44  }
45 
46  enum class Timemethod
47  {
48  INVERT = 0,
49  POW
50  };
51 
53  getToken(Timemethod enum_value)
54  {
55  using namespace UT::Literal;
56  switch (enum_value) {
57  case Timemethod::INVERT: return "invert"_sh;
58  case Timemethod::POW: return "pow"_sh;
59  default: UT_ASSERT(false); return ""_sh;
60  }
61  }
62 
63  enum class Precision
64  {
65  AUTO = 0,
66  _16,
67  _32,
68  _64
69  };
70 
72  getToken(Precision enum_value)
73  {
74  using namespace UT::Literal;
75  switch (enum_value) {
76  case Precision::AUTO: return "auto"_sh;
77  case Precision::_16: return "16"_sh;
78  case Precision::_32: return "32"_sh;
79  case Precision::_64: return "64"_sh;
80  default: UT_ASSERT(false); return ""_sh;
81  }
82  }
83 
84  enum class Bindings_type
85  {
86  INT = 0,
87  FLOAT,
88  FLOAT3,
89  FLOAT4,
90  RAMP,
91  ATTRIBUTE,
92  VOLUME,
93  VDB
94  };
95 
97  getToken(Bindings_type enum_value)
98  {
99  using namespace UT::Literal;
100  switch (enum_value) {
101  case Bindings_type::INT: return "int"_sh;
102  case Bindings_type::FLOAT: return "float"_sh;
103  case Bindings_type::FLOAT3: return "float3"_sh;
104  case Bindings_type::FLOAT4: return "float4"_sh;
105  case Bindings_type::RAMP: return "ramp"_sh;
106  case Bindings_type::ATTRIBUTE: return "attribute"_sh;
107  case Bindings_type::VOLUME: return "volume"_sh;
108  case Bindings_type::VDB: return "vdb"_sh;
109  default: UT_ASSERT(false); return ""_sh;
110  }
111  }
112 
113  enum class Bindings_vdbtype
114  {
115  ANY = 0,
116  FLOAT,
117  VECTOR
118  };
119 
122  {
123  using namespace UT::Literal;
124  switch (enum_value) {
125  case Bindings_vdbtype::ANY: return "any"_sh;
126  case Bindings_vdbtype::FLOAT: return "float"_sh;
127  case Bindings_vdbtype::VECTOR: return "vector"_sh;
128  default: UT_ASSERT(false); return ""_sh;
129  }
130  }
131 
133  {
134  DETAIL = 0,
135  PRIMITIVE,
136  POINT,
137  VERTEX
138  };
139 
142  {
143  using namespace UT::Literal;
144  switch (enum_value) {
145  case Bindings_attribclass::DETAIL: return "detail"_sh;
146  case Bindings_attribclass::PRIMITIVE: return "primitive"_sh;
147  case Bindings_attribclass::POINT: return "point"_sh;
148  case Bindings_attribclass::VERTEX: return "vertex"_sh;
149  default: UT_ASSERT(false); return ""_sh;
150  }
151  }
152 
154  {
155  FLOAT = 0,
156  INT,
157  FLOATARRAY,
158  INTARRAY
159  };
160 
163  {
164  using namespace UT::Literal;
165  switch (enum_value) {
166  case Bindings_attribtype::FLOAT: return "float"_sh;
167  case Bindings_attribtype::INT: return "int"_sh;
168  case Bindings_attribtype::FLOATARRAY: return "floatarray"_sh;
169  case Bindings_attribtype::INTARRAY: return "intarray"_sh;
170  default: UT_ASSERT(false); return ""_sh;
171  }
172  }
173 
175  {
176  NODE = 0,
177  _16,
178  _32,
179  _64
180  };
181 
184  {
185  using namespace UT::Literal;
186  switch (enum_value) {
187  case Bindings_precision::NODE: return "node"_sh;
188  case Bindings_precision::_16: return "16"_sh;
189  case Bindings_precision::_32: return "32"_sh;
190  case Bindings_precision::_64: return "64"_sh;
191  default: UT_ASSERT(false); return ""_sh;
192  }
193  }
194 
196  {
197  NONE = 0,
198  MULT,
199  INVERT,
200  POW
201  };
202 
205  {
206  using namespace UT::Literal;
207  switch (enum_value) {
208  case Bindings_timescale::NONE: return "none"_sh;
209  case Bindings_timescale::MULT: return "mult"_sh;
210  case Bindings_timescale::INVERT: return "invert"_sh;
211  case Bindings_timescale::POW: return "pow"_sh;
212  default: UT_ASSERT(false); return ""_sh;
213  }
214  }
215 
216 }
217 
218 
220 {
221 public:
222  static int version() { return 1; }
223  struct Bindings
224  {
252 
253 
255  {
256  bindings_name = ""_UTsh;
257  bindings_type = 0;
258  bindings_ramp = UT_SharedPtr<UT_Ramp>(0);
259  bindings_rampsize = 1024;
260  bindings_input = 0;
261  bindings_volume = ""_UTsh;
262  bindings_vdbtype = 0;
263  bindings_forcealign = true;
264  bindings_resolution = false;
265  bindings_voxelsize = false;
266  bindings_xformtoworld = false;
267  bindings_xformtovoxel = false;
268  bindings_attribute = ""_UTsh;
269  bindings_attribclass = 2;
270  bindings_attribtype = 0;
271  bindings_attribsize = 1;
272  bindings_precision = 2;
273  bindings_readable = true;
274  bindings_writeable = false;
275  bindings_optional = false;
276  bindings_defval = false;
277  bindings_intval = 0;
278  bindings_fval = 0;
279  bindings_v2val = UT_Vector2D(0,0);
280  bindings_v3val = UT_Vector3D(0,0,0);
281  bindings_v4val = UT_Vector4D(0,0,0,0);
282  bindings_timescale = 0;
283 
284  }
285 
286  bool operator==(const Bindings &src) const
287  {
288  if (bindings_name != src.bindings_name) return false;
289  if (bindings_type != src.bindings_type) return false;
290  if (bindings_ramp != src.bindings_ramp) return false;
291  if (bindings_rampsize != src.bindings_rampsize) return false;
292  if (bindings_input != src.bindings_input) return false;
293  if (bindings_volume != src.bindings_volume) return false;
294  if (bindings_vdbtype != src.bindings_vdbtype) return false;
295  if (bindings_forcealign != src.bindings_forcealign) return false;
296  if (bindings_resolution != src.bindings_resolution) return false;
297  if (bindings_voxelsize != src.bindings_voxelsize) return false;
298  if (bindings_xformtoworld != src.bindings_xformtoworld) return false;
299  if (bindings_xformtovoxel != src.bindings_xformtovoxel) return false;
300  if (bindings_attribute != src.bindings_attribute) return false;
301  if (bindings_attribclass != src.bindings_attribclass) return false;
302  if (bindings_attribtype != src.bindings_attribtype) return false;
303  if (bindings_attribsize != src.bindings_attribsize) return false;
304  if (bindings_precision != src.bindings_precision) return false;
305  if (bindings_readable != src.bindings_readable) return false;
306  if (bindings_writeable != src.bindings_writeable) return false;
307  if (bindings_optional != src.bindings_optional) return false;
308  if (bindings_defval != src.bindings_defval) return false;
309  if (bindings_intval != src.bindings_intval) return false;
310  if (bindings_fval != src.bindings_fval) return false;
311  if (bindings_v2val != src.bindings_v2val) return false;
312  if (bindings_v3val != src.bindings_v3val) return false;
313  if (bindings_v4val != src.bindings_v4val) return false;
314  if (bindings_timescale != src.bindings_timescale) return false;
315 
316  return true;
317  }
318  bool operator!=(const Bindings &src) const
319  {
320  return !operator==(src);
321  }
322 
323  };
324 
326  {
328 
329  buf.strcat("[ ");
330  for (int i = 0; i < list.entries(); i++)
331  {
332  if (i)
333  buf.strcat(", ");
334  buf.strcat("( ");
335  buf.append("");
336  { UT_String tmp; tmp = UT_StringWrap(list(i).bindings_name).makeQuotedString('"'); buf.strcat(tmp); }
337  buf.append(", ");
338  buf.appendSprintf("%d", (int) list(i).bindings_type);
339  buf.append(", ");
340  if (list(i).bindings_ramp)
341  {
342  UT_OStringStream os;
343  UT_String tmp;
344  list(i).bindings_ramp->save(os);
345  tmp = UT_StringWrap(os.str().buffer()).makeQuotedString('"');
346  buf.strcat(tmp);
347  }
348  else buf.strcat("""");
349  buf.append(", ");
350  buf.appendSprintf("%d", (int) list(i).bindings_rampsize);
351  buf.append(", ");
352  buf.appendSprintf("%d", (int) list(i).bindings_input);
353  buf.append(", ");
354  { UT_String tmp; tmp = UT_StringWrap(list(i).bindings_volume).makeQuotedString('"'); buf.strcat(tmp); }
355  buf.append(", ");
356  buf.appendSprintf("%d", (int) list(i).bindings_vdbtype);
357  buf.append(", ");
358  buf.appendSprintf("%s", (list(i).bindings_forcealign) ? "true" : "false");
359  buf.append(", ");
360  buf.appendSprintf("%s", (list(i).bindings_resolution) ? "true" : "false");
361  buf.append(", ");
362  buf.appendSprintf("%s", (list(i).bindings_voxelsize) ? "true" : "false");
363  buf.append(", ");
364  buf.appendSprintf("%s", (list(i).bindings_xformtoworld) ? "true" : "false");
365  buf.append(", ");
366  buf.appendSprintf("%s", (list(i).bindings_xformtovoxel) ? "true" : "false");
367  buf.append(", ");
368  { UT_String tmp; tmp = UT_StringWrap(list(i).bindings_attribute).makeQuotedString('"'); buf.strcat(tmp); }
369  buf.append(", ");
370  buf.appendSprintf("%d", (int) list(i).bindings_attribclass);
371  buf.append(", ");
372  buf.appendSprintf("%d", (int) list(i).bindings_attribtype);
373  buf.append(", ");
374  buf.appendSprintf("%d", (int) list(i).bindings_attribsize);
375  buf.append(", ");
376  buf.appendSprintf("%d", (int) list(i).bindings_precision);
377  buf.append(", ");
378  buf.appendSprintf("%s", (list(i).bindings_readable) ? "true" : "false");
379  buf.append(", ");
380  buf.appendSprintf("%s", (list(i).bindings_writeable) ? "true" : "false");
381  buf.append(", ");
382  buf.appendSprintf("%s", (list(i).bindings_optional) ? "true" : "false");
383  buf.append(", ");
384  buf.appendSprintf("%s", (list(i).bindings_defval) ? "true" : "false");
385  buf.append(", ");
386  buf.appendSprintf("%d", (int) list(i).bindings_intval);
387  buf.append(", ");
388  buf.appendSprintf("%f", (list(i).bindings_fval));
389  buf.append(", ");
390  buf.appendSprintf("(%f, %f)", list(i).bindings_v2val.x(), list(i).bindings_v2val.y());
391  buf.append(", ");
392  buf.appendSprintf("(%f, %f, %f)", list(i).bindings_v3val.x(), list(i).bindings_v3val.y(), list(i).bindings_v3val.z());
393  buf.append(", ");
394  buf.appendSprintf("(%f, %f, %f, %f)", list(i).bindings_v4val.x(), list(i).bindings_v4val.y(), list(i).bindings_v4val.z(), list(i).bindings_v4val.w());
395  buf.append(", ");
396  buf.appendSprintf("%d", (int) list(i).bindings_timescale);
397 
398  buf.strcat(" )");
399  }
400  buf.strcat(" ]");
401 
403  return result;
404  }
405 
407  {
408  myKernelName = "kernelName"_UTsh;
409  myUseCode = false;
410  myKernelFile = ""_UTsh;
411  myKernelCode = ""_UTsh;
412  myAtBinding = false;
413  myKernelOptions = ""_UTsh;
414  myKernelOptionAttrib = ""_UTsh;
415  myUseWriteBackKernel = false;
416  myWriteBackKernelName = "writeBack"_UTsh;
417  myRecompile = false;
418  myRunOver = 0;
419  myIterations = 1;
420  myIteration = false;
421  myWorksets_begin = ""_UTsh;
422  myWorksets_length = ""_UTsh;
423  mySingleworkgroup = false;
424  myFinish = true;
425  myTime = false;
426  myTimeInc = false;
427  myTimescale = 1;
428  myTimemethod = 0;
429  myXnoise = false;
430  myPrecision = 2;
431  myImportPrequel = true;
432  myBindings.setSize(1);
433  myGeneratedCode = ""_UTsh;
434 
435  }
436 
437  explicit SOP_OpenCLParms(const SOP_OpenCLParms &) = default;
438  SOP_OpenCLParms &operator=(const SOP_OpenCLParms &) = default;
439  SOP_OpenCLParms(SOP_OpenCLParms &&) noexcept = default;
440  SOP_OpenCLParms &operator=(SOP_OpenCLParms &&) noexcept = default;
441 
442  ~SOP_OpenCLParms() override {}
443 
444  bool operator==(const SOP_OpenCLParms &src) const
445  {
446  if (myKernelName != src.myKernelName) return false;
447  if (myUseCode != src.myUseCode) return false;
448  if (myKernelFile != src.myKernelFile) return false;
449  if (myKernelCode != src.myKernelCode) return false;
450  if (myAtBinding != src.myAtBinding) return false;
451  if (myKernelOptions != src.myKernelOptions) return false;
452  if (myKernelOptionAttrib != src.myKernelOptionAttrib) return false;
453  if (myUseWriteBackKernel != src.myUseWriteBackKernel) return false;
454  if (myWriteBackKernelName != src.myWriteBackKernelName) return false;
455  if (myRecompile != src.myRecompile) return false;
456  if (myRunOver != src.myRunOver) return false;
457  if (myIterations != src.myIterations) return false;
458  if (myIteration != src.myIteration) return false;
459  if (myWorksets_begin != src.myWorksets_begin) return false;
460  if (myWorksets_length != src.myWorksets_length) return false;
461  if (mySingleworkgroup != src.mySingleworkgroup) return false;
462  if (myFinish != src.myFinish) return false;
463  if (myTime != src.myTime) return false;
464  if (myTimeInc != src.myTimeInc) return false;
465  if (myTimescale != src.myTimescale) return false;
466  if (myTimemethod != src.myTimemethod) return false;
467  if (myXnoise != src.myXnoise) return false;
468  if (myPrecision != src.myPrecision) return false;
469  if (myImportPrequel != src.myImportPrequel) return false;
470  if (myBindings != src.myBindings) return false;
471  if (myGeneratedCode != src.myGeneratedCode) return false;
472 
473  return true;
474  }
475  bool operator!=(const SOP_OpenCLParms &src) const
476  {
477  return !operator==(src);
478  }
488 
489 
490 
491  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
492  {
493  myKernelName = "kernelName"_UTsh;
494  if (true)
495  graph->evalOpParm(myKernelName, nodeidx, "kernelname", time, 0);
496  myUseCode = false;
497  if (true)
498  graph->evalOpParm(myUseCode, nodeidx, "usecode", time, 0);
499  myKernelFile = ""_UTsh;
500  if (true && ( (true&&!(((getUseCode()!=0)))) ) )
501  graph->evalOpParm(myKernelFile, nodeidx, "kernelfile", time, 0);
502  myKernelCode = ""_UTsh;
503  if (true && ( (true&&!(((getUseCode()==0)))) ) )
504  graph->evalOpParm(myKernelCode, nodeidx, "kernelcode", time, 0);
505  myAtBinding = false;
506  if (true && ( (true&&!(((getUseCode()==0)))) ) )
507  graph->evalOpParm(myAtBinding, nodeidx, "atbinding", time, 0);
508  myKernelOptions = ""_UTsh;
509  if (true)
510  graph->evalOpParm(myKernelOptions, nodeidx, "kerneloptions", time, 0);
511  myKernelOptionAttrib = ""_UTsh;
512  if (true)
513  graph->evalOpParm(myKernelOptionAttrib, nodeidx, "kerneloptionattrib", time, 0);
514  myUseWriteBackKernel = false;
515  if (true)
516  graph->evalOpParm(myUseWriteBackKernel, nodeidx, "usewritebackkernel", time, 0);
517  myWriteBackKernelName = "writeBack"_UTsh;
518  if (true && ( (true&&!(((getUseWriteBackKernel()==0)))) ) )
519  graph->evalOpParm(myWriteBackKernelName, nodeidx, "writebackkernelname", time, 0);
520  myRecompile = false;
521  if (true)
522  graph->evalOpParm(myRecompile, nodeidx, "recompile", time, 0);
523  myRunOver = 0;
524  if (true)
525  graph->evalOpParm(myRunOver, nodeidx, "runover", time, 0);
526  myIterations = 1;
527  if (true)
528  graph->evalOpParm(myIterations, nodeidx, "iterations", time, 0);
529  myIteration = false;
530  if (true)
531  graph->evalOpParm(myIteration, nodeidx, "iteration", time, 0);
532  myWorksets_begin = ""_UTsh;
533  if (true && ( (true&&!(((int64(getRunOver())!=2)))) ) )
534  graph->evalOpParm(myWorksets_begin, nodeidx, "worksets_begin", time, 0);
535  myWorksets_length = ""_UTsh;
536  if (true && ( (true&&!(((int64(getRunOver())!=2)))) ) )
537  graph->evalOpParm(myWorksets_length, nodeidx, "worksets_length", time, 0);
538  mySingleworkgroup = false;
539  if (true && ( (true&&!(((int64(getRunOver())!=2)))) ) )
540  graph->evalOpParm(mySingleworkgroup, nodeidx, "singleworkgroup", time, 0);
541  myFinish = true;
542  if (true)
543  graph->evalOpParm(myFinish, nodeidx, "finish", time, 0);
544  myTime = false;
545  if (true)
546  graph->evalOpParm(myTime, nodeidx, "time", time, 0);
547  myTimeInc = false;
548  if (true)
549  graph->evalOpParm(myTimeInc, nodeidx, "timeinc", time, 0);
550  myTimescale = 1;
551  if (true && ( (true&&!(((getTimeInc()==0)))) ) )
552  graph->evalOpParm(myTimescale, nodeidx, "timescale", time, 0);
553  myTimemethod = 0;
554  if (true && ( (true&&!(((getTimeInc()==0)))) ) )
555  graph->evalOpParm(myTimemethod, nodeidx, "timemethod", time, 0);
556  myXnoise = false;
557  if (true)
558  graph->evalOpParm(myXnoise, nodeidx, "xnoise", time, 0);
559  myPrecision = 2;
560  if (true)
561  graph->evalOpParm(myPrecision, nodeidx, "precision", time, 0);
562  myImportPrequel = true;
563  if (true)
564  graph->evalOpParm(myImportPrequel, nodeidx, "importprequel", time, 0);
565  if (true)
566  {
567  int64 length = 0;
568  graph->evalOpParm(length, nodeidx, "bindings", time, 0);
569  if (length < 0) length = 0;
570  myBindings.setSize(length);
571  for (exint i = 0; i < length; i++)
572  {
573  int parmidx[1];
574  int offsets[1];
575  parmidx[0] = i+1;
576  offsets[0] = 1;
577  auto && _curentry = myBindings(i);
578  (void) _curentry;
579  _curentry.bindings_name = ""_UTsh;
580  if (true)
581  graph->evalOpParmInst(_curentry.bindings_name, nodeidx, "bindings#_name", parmidx, offsets, time, 0, 2-1);
582  _curentry.bindings_type = 0;
583  if (true)
584  graph->evalOpParmInst(_curentry.bindings_type, nodeidx, "bindings#_type", parmidx, offsets, time, 0, 2-1);
585  _curentry.bindings_ramp = UT_SharedPtr<UT_Ramp>(0);
586  if (true && ( (true&&!(((_curentry.bindings_type!=4)))) ) )
587  graph->evalOpParmInst(_curentry.bindings_ramp, nodeidx, "bindings#_ramp", parmidx, offsets, time, 0, 2-1);
588  _curentry.bindings_rampsize = 1024;
589  if (true && ( (true&&!(((_curentry.bindings_type!=4)))) ) )
590  graph->evalOpParmInst(_curentry.bindings_rampsize, nodeidx, "bindings#_rampsize", parmidx, offsets, time, 0, 2-1);
591  _curentry.bindings_input = 0;
592  if (true && ( (true&&!(((_curentry.bindings_type!=6)&&(_curentry.bindings_type!=7)&&(_curentry.bindings_type!=5)))) ) )
593  graph->evalOpParmInst(_curentry.bindings_input, nodeidx, "bindings#_input", parmidx, offsets, time, 0, 2-1);
594  _curentry.bindings_volume = ""_UTsh;
595  if (true && ( (true&&!(((_curentry.bindings_type!=6)&&(_curentry.bindings_type!=7)))) ) )
596  graph->evalOpParmInst(_curentry.bindings_volume, nodeidx, "bindings#_volume", parmidx, offsets, time, 0, 2-1);
597  _curentry.bindings_vdbtype = 0;
598  if (true && ( (true&&!(((_curentry.bindings_type!=7)))) ) )
599  graph->evalOpParmInst(_curentry.bindings_vdbtype, nodeidx, "bindings#_vdbtype", parmidx, offsets, time, 0, 2-1);
600  _curentry.bindings_forcealign = true;
601  if (true && ( (true&&!(((_curentry.bindings_type!=6)))) ) )
602  graph->evalOpParmInst(_curentry.bindings_forcealign, nodeidx, "bindings#_forcealign", parmidx, offsets, time, 0, 2-1);
603  _curentry.bindings_resolution = false;
604  if (true && ( (true&&!(((_curentry.bindings_type!=6))||((_curentry.bindings_forcealign==1)))) ) )
605  graph->evalOpParmInst(_curentry.bindings_resolution, nodeidx, "bindings#_resolution", parmidx, offsets, time, 0, 2-1);
606  _curentry.bindings_voxelsize = false;
607  if (true && ( (true&&!(((_curentry.bindings_type!=6)&&(_curentry.bindings_type!=7))||((_curentry.bindings_forcealign==1)&&(_curentry.bindings_type==6)))) ) )
608  graph->evalOpParmInst(_curentry.bindings_voxelsize, nodeidx, "bindings#_voxelsize", parmidx, offsets, time, 0, 2-1);
609  _curentry.bindings_xformtoworld = false;
610  if (true && ( (true&&!(((_curentry.bindings_type!=6)&&(_curentry.bindings_type!=7))||((_curentry.bindings_forcealign==1)&&(_curentry.bindings_type==6)))) ) )
611  graph->evalOpParmInst(_curentry.bindings_xformtoworld, nodeidx, "bindings#_xformtoworld", parmidx, offsets, time, 0, 2-1);
612  _curentry.bindings_xformtovoxel = false;
613  if (true && ( (true&&!(((_curentry.bindings_type!=6)&&(_curentry.bindings_type!=7))||((_curentry.bindings_forcealign==1)&&(_curentry.bindings_type==6)))) ) )
614  graph->evalOpParmInst(_curentry.bindings_xformtovoxel, nodeidx, "bindings#_xformtovoxel", parmidx, offsets, time, 0, 2-1);
615  _curentry.bindings_attribute = ""_UTsh;
616  if (true && ( (true&&!(((_curentry.bindings_type!=5)))) ) )
617  graph->evalOpParmInst(_curentry.bindings_attribute, nodeidx, "bindings#_attribute", parmidx, offsets, time, 0, 2-1);
618  _curentry.bindings_attribclass = 2;
619  if (true && ( (true&&!(((_curentry.bindings_type!=5)))) ) )
620  graph->evalOpParmInst(_curentry.bindings_attribclass, nodeidx, "bindings#_attribclass", parmidx, offsets, time, 0, 2-1);
621  _curentry.bindings_attribtype = 0;
622  if (true && ( (true&&!(((_curentry.bindings_type!=5)))) ) )
623  graph->evalOpParmInst(_curentry.bindings_attribtype, nodeidx, "bindings#_attribtype", parmidx, offsets, time, 0, 2-1);
624  _curentry.bindings_attribsize = 1;
625  if (true && ( (true&&!(((_curentry.bindings_type!=5)))) ) )
626  graph->evalOpParmInst(_curentry.bindings_attribsize, nodeidx, "bindings#_attribsize", parmidx, offsets, time, 0, 2-1);
627  _curentry.bindings_precision = 2;
628  if (true)
629  graph->evalOpParmInst(_curentry.bindings_precision, nodeidx, "bindings#_precision", parmidx, offsets, time, 0, 2-1);
630  _curentry.bindings_readable = true;
631  if (true && ( (true&&!(((_curentry.bindings_type!=5)&&(_curentry.bindings_type!=6)))) ) )
632  graph->evalOpParmInst(_curentry.bindings_readable, nodeidx, "bindings#_readable", parmidx, offsets, time, 0, 2-1);
633  _curentry.bindings_writeable = false;
634  if (true && ( (true&&!(((_curentry.bindings_type!=5)&&(_curentry.bindings_type!=6)&&(_curentry.bindings_type!=7)))) ) )
635  graph->evalOpParmInst(_curentry.bindings_writeable, nodeidx, "bindings#_writeable", parmidx, offsets, time, 0, 2-1);
636  _curentry.bindings_optional = false;
637  if (true && ( (true&&!(((_curentry.bindings_type!=5)&&(_curentry.bindings_type!=6)&&(_curentry.bindings_type!=7)))) ) )
638  graph->evalOpParmInst(_curentry.bindings_optional, nodeidx, "bindings#_optional", parmidx, offsets, time, 0, 2-1);
639  _curentry.bindings_defval = false;
640  if (true && ( (true&&!(((_curentry.bindings_type!=5)&&(_curentry.bindings_type!=6)&&(_curentry.bindings_type!=7))||((_curentry.bindings_optional==0))||((_curentry.bindings_attribtype!=1)&&(_curentry.bindings_attribtype!=0)))) ) )
641  graph->evalOpParmInst(_curentry.bindings_defval, nodeidx, "bindings#_defval", parmidx, offsets, time, 0, 2-1);
642  _curentry.bindings_intval = 0;
643  if (true && ( (true&&!(((_curentry.bindings_type!=0)&&(_curentry.bindings_type!=5))||((_curentry.bindings_type==5)&&(_curentry.bindings_optional==0))||((_curentry.bindings_type==5)&&(_curentry.bindings_defval==0))||((_curentry.bindings_type==5)&&(_curentry.bindings_attribtype!=1)))) ) )
644  graph->evalOpParmInst(_curentry.bindings_intval, nodeidx, "bindings#_intval", parmidx, offsets, time, 0, 2-1);
645  _curentry.bindings_fval = 0;
646  if (true && ( (true&&!(((_curentry.bindings_type!=1)&&(_curentry.bindings_type!=5)&&(_curentry.bindings_type!=6)&&(_curentry.bindings_type!=7))||((_curentry.bindings_type==5)&&(_curentry.bindings_optional==0))||((_curentry.bindings_type==5)&&(_curentry.bindings_defval==0))||((_curentry.bindings_type==5)&&(_curentry.bindings_attribtype!=0))||((_curentry.bindings_type==5)&&(_curentry.bindings_attribtype==0)&&(_curentry.bindings_attribsize==2))||((_curentry.bindings_type==5)&&(_curentry.bindings_attribtype==0)&&(_curentry.bindings_attribsize==3))||((_curentry.bindings_type==5)&&(_curentry.bindings_attribtype==0)&&(_curentry.bindings_attribsize==4))||((_curentry.bindings_type==6)&&(_curentry.bindings_optional==0))||((_curentry.bindings_type==6)&&(_curentry.bindings_defval==0))||((_curentry.bindings_type==7)&&(_curentry.bindings_optional==0))||((_curentry.bindings_type==7)&&(_curentry.bindings_defval==0)))) ) )
647  graph->evalOpParmInst(_curentry.bindings_fval, nodeidx, "bindings#_fval", parmidx, offsets, time, 0, 2-1);
648  _curentry.bindings_v2val = UT_Vector2D(0,0);
649  if (true && ( (true&&!(((_curentry.bindings_type!=5))||((_curentry.bindings_type==5)&&(_curentry.bindings_optional==0))||((_curentry.bindings_type==5)&&(_curentry.bindings_defval==0))||((_curentry.bindings_type==5)&&(_curentry.bindings_attribtype!=0))||((_curentry.bindings_type==5)&&(_curentry.bindings_attribtype==0)&&(_curentry.bindings_attribsize!=2)))) ) )
650  graph->evalOpParmInst(_curentry.bindings_v2val, nodeidx, "bindings#_v2val", parmidx, offsets, time, 0, 2-1);
651  _curentry.bindings_v3val = UT_Vector3D(0,0,0);
652  if (true && ( (true&&!(((_curentry.bindings_type!=2)&&(_curentry.bindings_type!=5))||((_curentry.bindings_type==5)&&(_curentry.bindings_optional==0))||((_curentry.bindings_type==5)&&(_curentry.bindings_defval==0))||((_curentry.bindings_type==5)&&(_curentry.bindings_attribtype!=0))||((_curentry.bindings_type==5)&&(_curentry.bindings_attribtype==0)&&(_curentry.bindings_attribsize!=3)))) ) )
653  graph->evalOpParmInst(_curentry.bindings_v3val, nodeidx, "bindings#_v3val", parmidx, offsets, time, 0, 2-1);
654  _curentry.bindings_v4val = UT_Vector4D(0,0,0,0);
655  if (true && ( (true&&!(((_curentry.bindings_type!=3)&&(_curentry.bindings_type!=5))||((_curentry.bindings_type==5)&&(_curentry.bindings_optional==0))||((_curentry.bindings_type==5)&&(_curentry.bindings_defval==0))||((_curentry.bindings_type==5)&&(_curentry.bindings_attribtype!=0))||((_curentry.bindings_type==5)&&(_curentry.bindings_attribtype==0)&&(_curentry.bindings_attribsize!=4)))) ) )
656  graph->evalOpParmInst(_curentry.bindings_v4val, nodeidx, "bindings#_v4val", parmidx, offsets, time, 0, 2-1);
657  _curentry.bindings_timescale = 0;
658  if (true && ( (true&&!(((_curentry.bindings_type!=1)))) ) )
659  graph->evalOpParmInst(_curentry.bindings_timescale, nodeidx, "bindings#_timescale", parmidx, offsets, time, 0, 2-1);
660 
661  }
662  }
663  else
664  myBindings.clear();
665  myGeneratedCode = ""_UTsh;
666  if (true && ( (true&&!((((graph->getInput(nodeidx,0)>=0)==0))||(((graph->getInput(nodeidx,0)>=0)==1)))) ) )
667  graph->evalOpParm(myGeneratedCode, nodeidx, "generatedcode", time, 0);
668 
669  }
670 
671 
672  void loadFromOpSubclass(const LoadParms &loadparms) override
673  {
674  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
675  }
676 
677 
678  void copyFrom(const OP_NodeParms *src) override
679  {
680  *this = *((const SOP_OpenCLParms *)src);
681  }
682 
683  template <typename T>
684  void
685  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
686  {
687  if (idx.size() < 1)
688  return;
689  UT_ASSERT(idx.size() == instance.size()+1);
690  if (idx.size() != instance.size()+1)
691  return;
692  switch (idx[0])
693  {
694  case 0:
695  coerceValue(value, myKernelName);
696  break;
697  case 1:
698  coerceValue(value, myUseCode);
699  break;
700  case 2:
701  coerceValue(value, myKernelFile);
702  break;
703  case 3:
704  coerceValue(value, myKernelCode);
705  break;
706  case 4:
707  coerceValue(value, myAtBinding);
708  break;
709  case 5:
710  coerceValue(value, myKernelOptions);
711  break;
712  case 6:
713  coerceValue(value, myKernelOptionAttrib);
714  break;
715  case 7:
716  coerceValue(value, myUseWriteBackKernel);
717  break;
718  case 8:
719  coerceValue(value, myWriteBackKernelName);
720  break;
721  case 9:
722  coerceValue(value, myRecompile);
723  break;
724  case 10:
725  coerceValue(value, myRunOver);
726  break;
727  case 11:
728  coerceValue(value, myIterations);
729  break;
730  case 12:
731  coerceValue(value, myIteration);
732  break;
733  case 13:
734  coerceValue(value, myWorksets_begin);
735  break;
736  case 14:
737  coerceValue(value, myWorksets_length);
738  break;
739  case 15:
740  coerceValue(value, mySingleworkgroup);
741  break;
742  case 16:
743  coerceValue(value, myFinish);
744  break;
745  case 17:
746  coerceValue(value, myTime);
747  break;
748  case 18:
749  coerceValue(value, myTimeInc);
750  break;
751  case 19:
752  coerceValue(value, myTimescale);
753  break;
754  case 20:
755  coerceValue(value, myTimemethod);
756  break;
757  case 21:
758  coerceValue(value, myXnoise);
759  break;
760  case 22:
761  coerceValue(value, myPrecision);
762  break;
763  case 23:
764  coerceValue(value, myImportPrequel);
765  break;
766  case 24:
767  if (idx.size() == 1)
768  coerceValue(value, myBindings.entries());
769  else if (instance[0] < myBindings.entries())
770  {
771  auto && _data = myBindings(instance[0]);
772  switch (idx[1])
773  {
774  case 0:
775  coerceValue(value, _data.bindings_name);
776  break;
777  case 1:
778  coerceValue(value, _data.bindings_type);
779  break;
780  case 2:
781  coerceValue(value, _data.bindings_ramp);
782  break;
783  case 3:
784  coerceValue(value, _data.bindings_rampsize);
785  break;
786  case 4:
787  coerceValue(value, _data.bindings_input);
788  break;
789  case 5:
790  coerceValue(value, _data.bindings_volume);
791  break;
792  case 6:
793  coerceValue(value, _data.bindings_vdbtype);
794  break;
795  case 7:
796  coerceValue(value, _data.bindings_forcealign);
797  break;
798  case 8:
799  coerceValue(value, _data.bindings_resolution);
800  break;
801  case 9:
802  coerceValue(value, _data.bindings_voxelsize);
803  break;
804  case 10:
805  coerceValue(value, _data.bindings_xformtoworld);
806  break;
807  case 11:
808  coerceValue(value, _data.bindings_xformtovoxel);
809  break;
810  case 12:
811  coerceValue(value, _data.bindings_attribute);
812  break;
813  case 13:
814  coerceValue(value, _data.bindings_attribclass);
815  break;
816  case 14:
817  coerceValue(value, _data.bindings_attribtype);
818  break;
819  case 15:
820  coerceValue(value, _data.bindings_attribsize);
821  break;
822  case 16:
823  coerceValue(value, _data.bindings_precision);
824  break;
825  case 17:
826  coerceValue(value, _data.bindings_readable);
827  break;
828  case 18:
829  coerceValue(value, _data.bindings_writeable);
830  break;
831  case 19:
832  coerceValue(value, _data.bindings_optional);
833  break;
834  case 20:
835  coerceValue(value, _data.bindings_defval);
836  break;
837  case 21:
838  coerceValue(value, _data.bindings_intval);
839  break;
840  case 22:
841  coerceValue(value, _data.bindings_fval);
842  break;
843  case 23:
844  coerceValue(value, _data.bindings_v2val);
845  break;
846  case 24:
847  coerceValue(value, _data.bindings_v3val);
848  break;
849  case 25:
850  coerceValue(value, _data.bindings_v4val);
851  break;
852  case 26:
853  coerceValue(value, _data.bindings_timescale);
854  break;
855 
856  }
857  }
858  break;
859  case 25:
860  coerceValue(value, myGeneratedCode);
861  break;
862 
863  }
864  }
865 
866  bool isParmColorRamp(exint idx) const override
867  {
868  switch (idx)
869  {
870 
871  }
872  return false;
873  }
874 
875  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
876  { doGetParmValue(idx, instance, value); }
877  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
878  { doGetParmValue(idx, instance, value); }
879  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
880  { doGetParmValue(idx, instance, value); }
881  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
882  { doGetParmValue(idx, instance, value); }
883  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
884  { doGetParmValue(idx, instance, value); }
885  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
886  { doGetParmValue(idx, instance, value); }
887  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
888  { doGetParmValue(idx, instance, value); }
889  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
890  { doGetParmValue(idx, instance, value); }
891  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
892  { doGetParmValue(idx, instance, value); }
893  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
894  { doGetParmValue(idx, instance, value); }
895  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
896  { doGetParmValue(idx, instance, value); }
897 
898  template <typename T>
899  void
900  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
901  {
902  if (idx.size() < 1)
903  return;
904  UT_ASSERT(idx.size() == instance.size()+1);
905  if (idx.size() != instance.size()+1)
906  return;
907  switch (idx[0])
908  {
909  case 0:
910  coerceValue(myKernelName, ( ( value ) ));
911  break;
912  case 1:
913  coerceValue(myUseCode, ( ( value ) ));
914  break;
915  case 2:
916  coerceValue(myKernelFile, ( ( value ) ));
917  break;
918  case 3:
919  coerceValue(myKernelCode, ( ( value ) ));
920  break;
921  case 4:
922  coerceValue(myAtBinding, ( ( value ) ));
923  break;
924  case 5:
925  coerceValue(myKernelOptions, ( ( value ) ));
926  break;
927  case 6:
928  coerceValue(myKernelOptionAttrib, ( ( value ) ));
929  break;
930  case 7:
931  coerceValue(myUseWriteBackKernel, ( ( value ) ));
932  break;
933  case 8:
934  coerceValue(myWriteBackKernelName, ( ( value ) ));
935  break;
936  case 9:
937  coerceValue(myRecompile, ( ( value ) ));
938  break;
939  case 10:
940  coerceValue(myRunOver, clampMinValue(0, clampMaxValue(3, value ) ));
941  break;
942  case 11:
943  coerceValue(myIterations, ( ( value ) ));
944  break;
945  case 12:
946  coerceValue(myIteration, ( ( value ) ));
947  break;
948  case 13:
949  coerceValue(myWorksets_begin, ( ( value ) ));
950  break;
951  case 14:
952  coerceValue(myWorksets_length, ( ( value ) ));
953  break;
954  case 15:
955  coerceValue(mySingleworkgroup, ( ( value ) ));
956  break;
957  case 16:
958  coerceValue(myFinish, ( ( value ) ));
959  break;
960  case 17:
961  coerceValue(myTime, ( ( value ) ));
962  break;
963  case 18:
964  coerceValue(myTimeInc, ( ( value ) ));
965  break;
966  case 19:
967  coerceValue(myTimescale, ( ( value ) ));
968  break;
969  case 20:
970  coerceValue(myTimemethod, clampMinValue(0, clampMaxValue(1, value ) ));
971  break;
972  case 21:
973  coerceValue(myXnoise, ( ( value ) ));
974  break;
975  case 22:
976  coerceValue(myPrecision, clampMinValue(0, clampMaxValue(3, value ) ));
977  break;
978  case 23:
979  coerceValue(myImportPrequel, ( ( value ) ));
980  break;
981  case 24:
982  if (idx.size() == 1)
983  {
984  exint newsize;
985  coerceValue(newsize, value);
986  if (newsize < 0) newsize = 0;
987  myBindings.setSize(newsize);
988  }
989  else
990  {
991  if (instance[0] < 0)
992  return;
993  myBindings.setSizeIfNeeded(instance[0]+1);
994  auto && _data = myBindings(instance[0]);
995  switch (idx[1])
996  {
997  case 0:
998  coerceValue(_data.bindings_name, value);
999  break;
1000  case 1:
1001  coerceValue(_data.bindings_type, value);
1002  break;
1003  case 2:
1004  coerceValue(_data.bindings_ramp, value);
1005  break;
1006  case 3:
1007  coerceValue(_data.bindings_rampsize, value);
1008  break;
1009  case 4:
1010  coerceValue(_data.bindings_input, value);
1011  break;
1012  case 5:
1013  coerceValue(_data.bindings_volume, value);
1014  break;
1015  case 6:
1016  coerceValue(_data.bindings_vdbtype, value);
1017  break;
1018  case 7:
1019  coerceValue(_data.bindings_forcealign, value);
1020  break;
1021  case 8:
1022  coerceValue(_data.bindings_resolution, value);
1023  break;
1024  case 9:
1025  coerceValue(_data.bindings_voxelsize, value);
1026  break;
1027  case 10:
1028  coerceValue(_data.bindings_xformtoworld, value);
1029  break;
1030  case 11:
1031  coerceValue(_data.bindings_xformtovoxel, value);
1032  break;
1033  case 12:
1034  coerceValue(_data.bindings_attribute, value);
1035  break;
1036  case 13:
1037  coerceValue(_data.bindings_attribclass, value);
1038  break;
1039  case 14:
1040  coerceValue(_data.bindings_attribtype, value);
1041  break;
1042  case 15:
1043  coerceValue(_data.bindings_attribsize, value);
1044  break;
1045  case 16:
1046  coerceValue(_data.bindings_precision, value);
1047  break;
1048  case 17:
1049  coerceValue(_data.bindings_readable, value);
1050  break;
1051  case 18:
1052  coerceValue(_data.bindings_writeable, value);
1053  break;
1054  case 19:
1055  coerceValue(_data.bindings_optional, value);
1056  break;
1057  case 20:
1058  coerceValue(_data.bindings_defval, value);
1059  break;
1060  case 21:
1061  coerceValue(_data.bindings_intval, value);
1062  break;
1063  case 22:
1064  coerceValue(_data.bindings_fval, value);
1065  break;
1066  case 23:
1067  coerceValue(_data.bindings_v2val, value);
1068  break;
1069  case 24:
1070  coerceValue(_data.bindings_v3val, value);
1071  break;
1072  case 25:
1073  coerceValue(_data.bindings_v4val, value);
1074  break;
1075  case 26:
1076  coerceValue(_data.bindings_timescale, value);
1077  break;
1078 
1079  }
1080  }
1081  break;
1082  case 25:
1083  coerceValue(myGeneratedCode, ( ( value ) ));
1084  break;
1085 
1086  }
1087  }
1088 
1089  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
1090  { doSetParmValue(idx, instance, value); }
1091  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
1092  { doSetParmValue(idx, instance, value); }
1093  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
1094  { doSetParmValue(idx, instance, value); }
1095  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
1096  { doSetParmValue(idx, instance, value); }
1097  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
1098  { doSetParmValue(idx, instance, value); }
1099  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
1100  { doSetParmValue(idx, instance, value); }
1101  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
1102  { doSetParmValue(idx, instance, value); }
1103  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
1104  { doSetParmValue(idx, instance, value); }
1105  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
1106  { doSetParmValue(idx, instance, value); }
1107  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
1108  { doSetParmValue(idx, instance, value); }
1109  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
1110  { doSetParmValue(idx, instance, value); }
1111 
1112  exint getNestNumParms(TempIndex idx) const override
1113  {
1114  if (idx.size() == 0)
1115  return 26;
1116  switch (idx[0])
1117  {
1118  case 24:
1119  return 27;
1120 
1121  }
1122  // Invalid
1123  return 0;
1124  }
1125 
1126  const char *getNestParmName(TempIndex fieldnum) const override
1127  {
1128  if (fieldnum.size() < 1)
1129  return 0;
1130  switch (fieldnum[0])
1131  {
1132  case 0:
1133  return "kernelname";
1134  case 1:
1135  return "usecode";
1136  case 2:
1137  return "kernelfile";
1138  case 3:
1139  return "kernelcode";
1140  case 4:
1141  return "atbinding";
1142  case 5:
1143  return "kerneloptions";
1144  case 6:
1145  return "kerneloptionattrib";
1146  case 7:
1147  return "usewritebackkernel";
1148  case 8:
1149  return "writebackkernelname";
1150  case 9:
1151  return "recompile";
1152  case 10:
1153  return "runover";
1154  case 11:
1155  return "iterations";
1156  case 12:
1157  return "iteration";
1158  case 13:
1159  return "worksets_begin";
1160  case 14:
1161  return "worksets_length";
1162  case 15:
1163  return "singleworkgroup";
1164  case 16:
1165  return "finish";
1166  case 17:
1167  return "time";
1168  case 18:
1169  return "timeinc";
1170  case 19:
1171  return "timescale";
1172  case 20:
1173  return "timemethod";
1174  case 21:
1175  return "xnoise";
1176  case 22:
1177  return "precision";
1178  case 23:
1179  return "importprequel";
1180  case 24:
1181  if (fieldnum.size() == 1)
1182  return "bindings";
1183  switch (fieldnum[1])
1184  {
1185  case 0:
1186  return "bindings#_name";
1187  case 1:
1188  return "bindings#_type";
1189  case 2:
1190  return "bindings#_ramp";
1191  case 3:
1192  return "bindings#_rampsize";
1193  case 4:
1194  return "bindings#_input";
1195  case 5:
1196  return "bindings#_volume";
1197  case 6:
1198  return "bindings#_vdbtype";
1199  case 7:
1200  return "bindings#_forcealign";
1201  case 8:
1202  return "bindings#_resolution";
1203  case 9:
1204  return "bindings#_voxelsize";
1205  case 10:
1206  return "bindings#_xformtoworld";
1207  case 11:
1208  return "bindings#_xformtovoxel";
1209  case 12:
1210  return "bindings#_attribute";
1211  case 13:
1212  return "bindings#_attribclass";
1213  case 14:
1214  return "bindings#_attribtype";
1215  case 15:
1216  return "bindings#_attribsize";
1217  case 16:
1218  return "bindings#_precision";
1219  case 17:
1220  return "bindings#_readable";
1221  case 18:
1222  return "bindings#_writeable";
1223  case 19:
1224  return "bindings#_optional";
1225  case 20:
1226  return "bindings#_defval";
1227  case 21:
1228  return "bindings#_intval";
1229  case 22:
1230  return "bindings#_fval";
1231  case 23:
1232  return "bindings#_v2val";
1233  case 24:
1234  return "bindings#_v3val";
1235  case 25:
1236  return "bindings#_v4val";
1237  case 26:
1238  return "bindings#_timescale";
1239 
1240  }
1241  return 0;
1242  case 25:
1243  return "generatedcode";
1244 
1245  }
1246  return 0;
1247  }
1248 
1249  ParmType getNestParmType(TempIndex fieldnum) const override
1250  {
1251  if (fieldnum.size() < 1)
1252  return PARM_UNSUPPORTED;
1253  switch (fieldnum[0])
1254  {
1255  case 0:
1256  return PARM_STRING;
1257  case 1:
1258  return PARM_INTEGER;
1259  case 2:
1260  return PARM_STRING;
1261  case 3:
1262  return PARM_STRING;
1263  case 4:
1264  return PARM_INTEGER;
1265  case 5:
1266  return PARM_STRING;
1267  case 6:
1268  return PARM_STRING;
1269  case 7:
1270  return PARM_INTEGER;
1271  case 8:
1272  return PARM_STRING;
1273  case 9:
1274  return PARM_INTEGER;
1275  case 10:
1276  return PARM_INTEGER;
1277  case 11:
1278  return PARM_INTEGER;
1279  case 12:
1280  return PARM_INTEGER;
1281  case 13:
1282  return PARM_STRING;
1283  case 14:
1284  return PARM_STRING;
1285  case 15:
1286  return PARM_INTEGER;
1287  case 16:
1288  return PARM_INTEGER;
1289  case 17:
1290  return PARM_INTEGER;
1291  case 18:
1292  return PARM_INTEGER;
1293  case 19:
1294  return PARM_FLOAT;
1295  case 20:
1296  return PARM_INTEGER;
1297  case 21:
1298  return PARM_INTEGER;
1299  case 22:
1300  return PARM_INTEGER;
1301  case 23:
1302  return PARM_INTEGER;
1303  case 24:
1304  if (fieldnum.size() == 1)
1305  return PARM_MULTIPARM;
1306  switch (fieldnum[1])
1307  {
1308  case 0:
1309  return PARM_STRING;
1310  case 1:
1311  return PARM_INTEGER;
1312  case 2:
1313  return PARM_RAMP;
1314  case 3:
1315  return PARM_INTEGER;
1316  case 4:
1317  return PARM_INTEGER;
1318  case 5:
1319  return PARM_STRING;
1320  case 6:
1321  return PARM_INTEGER;
1322  case 7:
1323  return PARM_INTEGER;
1324  case 8:
1325  return PARM_INTEGER;
1326  case 9:
1327  return PARM_INTEGER;
1328  case 10:
1329  return PARM_INTEGER;
1330  case 11:
1331  return PARM_INTEGER;
1332  case 12:
1333  return PARM_STRING;
1334  case 13:
1335  return PARM_INTEGER;
1336  case 14:
1337  return PARM_INTEGER;
1338  case 15:
1339  return PARM_INTEGER;
1340  case 16:
1341  return PARM_INTEGER;
1342  case 17:
1343  return PARM_INTEGER;
1344  case 18:
1345  return PARM_INTEGER;
1346  case 19:
1347  return PARM_INTEGER;
1348  case 20:
1349  return PARM_INTEGER;
1350  case 21:
1351  return PARM_INTEGER;
1352  case 22:
1353  return PARM_FLOAT;
1354  case 23:
1355  return PARM_VECTOR2;
1356  case 24:
1357  return PARM_VECTOR3;
1358  case 25:
1359  return PARM_VECTOR4;
1360  case 26:
1361  return PARM_INTEGER;
1362 
1363  }
1364  return PARM_UNSUPPORTED;
1365  case 25:
1366  return PARM_STRING;
1367 
1368  }
1369  return PARM_UNSUPPORTED;
1370  }
1371 
1372  // Boiler plate to load individual types.
1373  static void loadData(UT_IStream &is, int64 &v)
1374  { is.bread(&v, 1); }
1375  static void loadData(UT_IStream &is, bool &v)
1376  { int64 iv; is.bread(&iv, 1); v = iv; }
1377  static void loadData(UT_IStream &is, fpreal64 &v)
1378  { is.bread<fpreal64>(&v, 1); }
1379  static void loadData(UT_IStream &is, UT_Vector2D &v)
1380  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
1381  static void loadData(UT_IStream &is, UT_Vector3D &v)
1382  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
1383  is.bread<fpreal64>(&v.z(), 1); }
1384  static void loadData(UT_IStream &is, UT_Vector4D &v)
1385  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
1386  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
1387  static void loadData(UT_IStream &is, UT_Matrix2D &v)
1388  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
1389  static void loadData(UT_IStream &is, UT_Matrix3D &v)
1390  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
1391  static void loadData(UT_IStream &is, UT_Matrix4D &v)
1392  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
1393  static void loadData(UT_IStream &is, UT_Vector2I &v)
1394  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
1395  static void loadData(UT_IStream &is, UT_Vector3I &v)
1396  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
1397  is.bread<int64>(&v.z(), 1); }
1398  static void loadData(UT_IStream &is, UT_Vector4I &v)
1399  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
1400  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
1402  { is.bread(v); }
1404  { UT_StringHolder rampdata;
1405  loadData(is, rampdata);
1406  if (rampdata.isstring())
1407  {
1408  v.reset(new UT_Ramp());
1409  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
1410  v->load(istr);
1411  }
1412  else v.reset();
1413  }
1416  loadData(is, data);
1417  if (data.isstring())
1418  {
1419  // Find the data type.
1420  const char *colon = UT_StringWrap(data).findChar(':');
1421  if (colon)
1422  {
1423  int typelen = colon - data.buffer();
1425  type.strncpy(data.buffer(), typelen);
1426  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
1427 
1428  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
1429  }
1430  }
1431  else v.reset();
1432  }
1433 
1434  static void saveData(std::ostream &os, int64 v)
1435  { UTwrite(os, &v); }
1436  static void saveData(std::ostream &os, bool v)
1437  { int64 iv = v; UTwrite(os, &iv); }
1438  static void saveData(std::ostream &os, fpreal64 v)
1439  { UTwrite<fpreal64>(os, &v); }
1440  static void saveData(std::ostream &os, UT_Vector2D v)
1441  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
1442  static void saveData(std::ostream &os, UT_Vector3D v)
1443  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
1444  UTwrite<fpreal64>(os, &v.z()); }
1445  static void saveData(std::ostream &os, UT_Vector4D v)
1446  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
1447  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
1448  static void saveData(std::ostream &os, UT_Matrix2D v)
1450  static void saveData(std::ostream &os, UT_Matrix3D v)
1452  static void saveData(std::ostream &os, UT_Matrix4D v)
1454  static void saveData(std::ostream &os, UT_StringHolder s)
1455  { UT_StringWrap(s).saveBinary(os); }
1456  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
1458  UT_OStringStream ostr;
1459  if (s) s->save(ostr);
1460  result = ostr.str();
1461  saveData(os, result);
1462  }
1463  static void saveData(std::ostream &os, PRM_DataItemHandle s)
1465  UT_OStringStream ostr;
1466  if (s)
1467  {
1468  ostr << s->getDataTypeToken();
1469  ostr << ":";
1470  s->saveBinary(ostr);
1471  }
1472  result = ostr.str();
1473  saveData(os, result);
1474  }
1475 
1476 
1477  void save(std::ostream &os) const
1478  {
1479  int32 v = version();
1480  UTwrite(os, &v);
1481  saveData(os, myKernelName);
1482  saveData(os, myUseCode);
1483  saveData(os, myKernelFile);
1484  saveData(os, myKernelCode);
1485  saveData(os, myAtBinding);
1486  saveData(os, myKernelOptions);
1487  saveData(os, myKernelOptionAttrib);
1488  saveData(os, myUseWriteBackKernel);
1489  saveData(os, myWriteBackKernelName);
1490  saveData(os, myRecompile);
1491  saveData(os, myRunOver);
1492  saveData(os, myIterations);
1493  saveData(os, myIteration);
1494  saveData(os, myWorksets_begin);
1495  saveData(os, myWorksets_length);
1496  saveData(os, mySingleworkgroup);
1497  saveData(os, myFinish);
1498  saveData(os, myTime);
1499  saveData(os, myTimeInc);
1500  saveData(os, myTimescale);
1501  saveData(os, myTimemethod);
1502  saveData(os, myXnoise);
1503  saveData(os, myPrecision);
1504  saveData(os, myImportPrequel);
1505  {
1506  int64 length = myBindings.entries();
1507  UTwrite(os, &length);
1508  for (exint i = 0; i < length; i++)
1509  {
1510  auto && _curentry = myBindings(i);
1511  (void) _curentry;
1512  saveData(os, _curentry.bindings_name);
1513  saveData(os, _curentry.bindings_type);
1514  saveData(os, _curentry.bindings_ramp);
1515  saveData(os, _curentry.bindings_rampsize);
1516  saveData(os, _curentry.bindings_input);
1517  saveData(os, _curentry.bindings_volume);
1518  saveData(os, _curentry.bindings_vdbtype);
1519  saveData(os, _curentry.bindings_forcealign);
1520  saveData(os, _curentry.bindings_resolution);
1521  saveData(os, _curentry.bindings_voxelsize);
1522  saveData(os, _curentry.bindings_xformtoworld);
1523  saveData(os, _curentry.bindings_xformtovoxel);
1524  saveData(os, _curentry.bindings_attribute);
1525  saveData(os, _curentry.bindings_attribclass);
1526  saveData(os, _curentry.bindings_attribtype);
1527  saveData(os, _curentry.bindings_attribsize);
1528  saveData(os, _curentry.bindings_precision);
1529  saveData(os, _curentry.bindings_readable);
1530  saveData(os, _curentry.bindings_writeable);
1531  saveData(os, _curentry.bindings_optional);
1532  saveData(os, _curentry.bindings_defval);
1533  saveData(os, _curentry.bindings_intval);
1534  saveData(os, _curentry.bindings_fval);
1535  saveData(os, _curentry.bindings_v2val);
1536  saveData(os, _curentry.bindings_v3val);
1537  saveData(os, _curentry.bindings_v4val);
1538  saveData(os, _curentry.bindings_timescale);
1539 
1540  }
1541  }
1542  saveData(os, myGeneratedCode);
1543 
1544  }
1545 
1546  bool load(UT_IStream &is)
1547  {
1548  int32 v;
1549  is.bread(&v, 1);
1550  if (version() != v)
1551  {
1552  // Fail incompatible versions
1553  return false;
1554  }
1555  loadData(is, myKernelName);
1556  loadData(is, myUseCode);
1557  loadData(is, myKernelFile);
1558  loadData(is, myKernelCode);
1559  loadData(is, myAtBinding);
1560  loadData(is, myKernelOptions);
1561  loadData(is, myKernelOptionAttrib);
1562  loadData(is, myUseWriteBackKernel);
1563  loadData(is, myWriteBackKernelName);
1564  loadData(is, myRecompile);
1565  loadData(is, myRunOver);
1566  loadData(is, myIterations);
1567  loadData(is, myIteration);
1568  loadData(is, myWorksets_begin);
1569  loadData(is, myWorksets_length);
1570  loadData(is, mySingleworkgroup);
1571  loadData(is, myFinish);
1572  loadData(is, myTime);
1573  loadData(is, myTimeInc);
1574  loadData(is, myTimescale);
1575  loadData(is, myTimemethod);
1576  loadData(is, myXnoise);
1577  loadData(is, myPrecision);
1578  loadData(is, myImportPrequel);
1579  {
1580  int64 length;
1581  is.read(&length, 1);
1582  myBindings.setSize(length);
1583  for (exint i = 0; i < length; i++)
1584  {
1585  auto && _curentry = myBindings(i);
1586  (void) _curentry;
1587  loadData(is, _curentry.bindings_name);
1588  loadData(is, _curentry.bindings_type);
1589  loadData(is, _curentry.bindings_ramp);
1590  loadData(is, _curentry.bindings_rampsize);
1591  loadData(is, _curentry.bindings_input);
1592  loadData(is, _curentry.bindings_volume);
1593  loadData(is, _curentry.bindings_vdbtype);
1594  loadData(is, _curentry.bindings_forcealign);
1595  loadData(is, _curentry.bindings_resolution);
1596  loadData(is, _curentry.bindings_voxelsize);
1597  loadData(is, _curentry.bindings_xformtoworld);
1598  loadData(is, _curentry.bindings_xformtovoxel);
1599  loadData(is, _curentry.bindings_attribute);
1600  loadData(is, _curentry.bindings_attribclass);
1601  loadData(is, _curentry.bindings_attribtype);
1602  loadData(is, _curentry.bindings_attribsize);
1603  loadData(is, _curentry.bindings_precision);
1604  loadData(is, _curentry.bindings_readable);
1605  loadData(is, _curentry.bindings_writeable);
1606  loadData(is, _curentry.bindings_optional);
1607  loadData(is, _curentry.bindings_defval);
1608  loadData(is, _curentry.bindings_intval);
1609  loadData(is, _curentry.bindings_fval);
1610  loadData(is, _curentry.bindings_v2val);
1611  loadData(is, _curentry.bindings_v3val);
1612  loadData(is, _curentry.bindings_v4val);
1613  loadData(is, _curentry.bindings_timescale);
1614 
1615  }
1616  }
1617  loadData(is, myGeneratedCode);
1618 
1619  return true;
1620  }
1621 
1622  const UT_StringHolder & getKernelName() const { return myKernelName; }
1623  void setKernelName(const UT_StringHolder & val) { myKernelName = val; }
1625  {
1626  SOP_Node *thissop = cookparms.getNode();
1627  if (!thissop) return getKernelName();
1629  OP_Utils::evalOpParm(result, thissop, "kernelname", cookparms.getCookTime(), 0);
1630  return result;
1631  }
1632  bool getUseCode() const { return myUseCode; }
1633  void setUseCode(bool val) { myUseCode = val; }
1634  bool opUseCode(const SOP_NodeVerb::CookParms &cookparms) const
1635  {
1636  SOP_Node *thissop = cookparms.getNode();
1637  if (!thissop) return getUseCode();
1638  bool result;
1639  OP_Utils::evalOpParm(result, thissop, "usecode", cookparms.getCookTime(), 0);
1640  return result;
1641  }
1642  const UT_StringHolder & getKernelFile() const { return myKernelFile; }
1643  void setKernelFile(const UT_StringHolder & val) { myKernelFile = val; }
1645  {
1646  SOP_Node *thissop = cookparms.getNode();
1647  if (!thissop) return getKernelFile();
1649  OP_Utils::evalOpParm(result, thissop, "kernelfile", cookparms.getCookTime(), 0);
1650  return result;
1651  }
1652  const UT_StringHolder & getKernelCode() const { return myKernelCode; }
1653  void setKernelCode(const UT_StringHolder & val) { myKernelCode = val; }
1655  {
1656  SOP_Node *thissop = cookparms.getNode();
1657  if (!thissop) return getKernelCode();
1659  OP_Utils::evalOpParm(result, thissop, "kernelcode", cookparms.getCookTime(), 0);
1660  return result;
1661  }
1662  bool getAtBinding() const { return myAtBinding; }
1663  void setAtBinding(bool val) { myAtBinding = val; }
1664  bool opAtBinding(const SOP_NodeVerb::CookParms &cookparms) const
1665  {
1666  SOP_Node *thissop = cookparms.getNode();
1667  if (!thissop) return getAtBinding();
1668  bool result;
1669  OP_Utils::evalOpParm(result, thissop, "atbinding", cookparms.getCookTime(), 0);
1670  return result;
1671  }
1672  const UT_StringHolder & getKernelOptions() const { return myKernelOptions; }
1673  void setKernelOptions(const UT_StringHolder & val) { myKernelOptions = val; }
1675  {
1676  SOP_Node *thissop = cookparms.getNode();
1677  if (!thissop) return getKernelOptions();
1679  OP_Utils::evalOpParm(result, thissop, "kerneloptions", cookparms.getCookTime(), 0);
1680  return result;
1681  }
1682  const UT_StringHolder & getKernelOptionAttrib() const { return myKernelOptionAttrib; }
1683  void setKernelOptionAttrib(const UT_StringHolder & val) { myKernelOptionAttrib = val; }
1685  {
1686  SOP_Node *thissop = cookparms.getNode();
1687  if (!thissop) return getKernelOptionAttrib();
1689  OP_Utils::evalOpParm(result, thissop, "kerneloptionattrib", cookparms.getCookTime(), 0);
1690  return result;
1691  }
1692  bool getUseWriteBackKernel() const { return myUseWriteBackKernel; }
1693  void setUseWriteBackKernel(bool val) { myUseWriteBackKernel = val; }
1694  bool opUseWriteBackKernel(const SOP_NodeVerb::CookParms &cookparms) const
1695  {
1696  SOP_Node *thissop = cookparms.getNode();
1697  if (!thissop) return getUseWriteBackKernel();
1698  bool result;
1699  OP_Utils::evalOpParm(result, thissop, "usewritebackkernel", cookparms.getCookTime(), 0);
1700  return result;
1701  }
1702  const UT_StringHolder & getWriteBackKernelName() const { return myWriteBackKernelName; }
1703  void setWriteBackKernelName(const UT_StringHolder & val) { myWriteBackKernelName = val; }
1705  {
1706  SOP_Node *thissop = cookparms.getNode();
1707  if (!thissop) return getWriteBackKernelName();
1709  OP_Utils::evalOpParm(result, thissop, "writebackkernelname", cookparms.getCookTime(), 0);
1710  return result;
1711  }
1712  bool getRecompile() const { return myRecompile; }
1713  void setRecompile(bool val) { myRecompile = val; }
1714  bool opRecompile(const SOP_NodeVerb::CookParms &cookparms) const
1715  {
1716  SOP_Node *thissop = cookparms.getNode();
1717  if (!thissop) return getRecompile();
1718  bool result;
1719  OP_Utils::evalOpParm(result, thissop, "recompile", cookparms.getCookTime(), 0);
1720  return result;
1721  }
1722  RunOver getRunOver() const { return RunOver(myRunOver); }
1723  void setRunOver(RunOver val) { myRunOver = int64(val); }
1725  {
1726  SOP_Node *thissop = cookparms.getNode();
1727  if (!thissop) return getRunOver();
1728  int64 result;
1729  OP_Utils::evalOpParm(result, thissop, "runover", cookparms.getCookTime(), 0);
1730  return RunOver(result);
1731  }
1732  int64 getIterations() const { return myIterations; }
1733  void setIterations(int64 val) { myIterations = val; }
1735  {
1736  SOP_Node *thissop = cookparms.getNode();
1737  if (!thissop) return getIterations();
1738  int64 result;
1739  OP_Utils::evalOpParm(result, thissop, "iterations", cookparms.getCookTime(), 0);
1740  return result;
1741  }
1742  bool getIteration() const { return myIteration; }
1743  void setIteration(bool val) { myIteration = val; }
1744  bool opIteration(const SOP_NodeVerb::CookParms &cookparms) const
1745  {
1746  SOP_Node *thissop = cookparms.getNode();
1747  if (!thissop) return getIteration();
1748  bool result;
1749  OP_Utils::evalOpParm(result, thissop, "iteration", cookparms.getCookTime(), 0);
1750  return result;
1751  }
1752  const UT_StringHolder & getWorksets_begin() const { return myWorksets_begin; }
1753  void setWorksets_begin(const UT_StringHolder & val) { myWorksets_begin = val; }
1755  {
1756  SOP_Node *thissop = cookparms.getNode();
1757  if (!thissop) return getWorksets_begin();
1759  OP_Utils::evalOpParm(result, thissop, "worksets_begin", cookparms.getCookTime(), 0);
1760  return result;
1761  }
1762  const UT_StringHolder & getWorksets_length() const { return myWorksets_length; }
1763  void setWorksets_length(const UT_StringHolder & val) { myWorksets_length = val; }
1765  {
1766  SOP_Node *thissop = cookparms.getNode();
1767  if (!thissop) return getWorksets_length();
1769  OP_Utils::evalOpParm(result, thissop, "worksets_length", cookparms.getCookTime(), 0);
1770  return result;
1771  }
1772  bool getSingleworkgroup() const { return mySingleworkgroup; }
1773  void setSingleworkgroup(bool val) { mySingleworkgroup = val; }
1774  bool opSingleworkgroup(const SOP_NodeVerb::CookParms &cookparms) const
1775  {
1776  SOP_Node *thissop = cookparms.getNode();
1777  if (!thissop) return getSingleworkgroup();
1778  bool result;
1779  OP_Utils::evalOpParm(result, thissop, "singleworkgroup", cookparms.getCookTime(), 0);
1780  return result;
1781  }
1782  bool getFinish() const { return myFinish; }
1783  void setFinish(bool val) { myFinish = val; }
1784  bool opFinish(const SOP_NodeVerb::CookParms &cookparms) const
1785  {
1786  SOP_Node *thissop = cookparms.getNode();
1787  if (!thissop) return getFinish();
1788  bool result;
1789  OP_Utils::evalOpParm(result, thissop, "finish", cookparms.getCookTime(), 0);
1790  return result;
1791  }
1792  bool getTime() const { return myTime; }
1793  void setTime(bool val) { myTime = val; }
1794  bool opTime(const SOP_NodeVerb::CookParms &cookparms) const
1795  {
1796  SOP_Node *thissop = cookparms.getNode();
1797  if (!thissop) return getTime();
1798  bool result;
1799  OP_Utils::evalOpParm(result, thissop, "time", cookparms.getCookTime(), 0);
1800  return result;
1801  }
1802  bool getTimeInc() const { return myTimeInc; }
1803  void setTimeInc(bool val) { myTimeInc = val; }
1804  bool opTimeInc(const SOP_NodeVerb::CookParms &cookparms) const
1805  {
1806  SOP_Node *thissop = cookparms.getNode();
1807  if (!thissop) return getTimeInc();
1808  bool result;
1809  OP_Utils::evalOpParm(result, thissop, "timeinc", cookparms.getCookTime(), 0);
1810  return result;
1811  }
1812  fpreal64 getTimescale() const { return myTimescale; }
1813  void setTimescale(fpreal64 val) { myTimescale = val; }
1815  {
1816  SOP_Node *thissop = cookparms.getNode();
1817  if (!thissop) return getTimescale();
1818  fpreal64 result;
1819  OP_Utils::evalOpParm(result, thissop, "timescale", cookparms.getCookTime(), 0);
1820  return result;
1821  }
1822  Timemethod getTimemethod() const { return Timemethod(myTimemethod); }
1823  void setTimemethod(Timemethod val) { myTimemethod = int64(val); }
1825  {
1826  SOP_Node *thissop = cookparms.getNode();
1827  if (!thissop) return getTimemethod();
1828  int64 result;
1829  OP_Utils::evalOpParm(result, thissop, "timemethod", cookparms.getCookTime(), 0);
1830  return Timemethod(result);
1831  }
1832  bool getXnoise() const { return myXnoise; }
1833  void setXnoise(bool val) { myXnoise = val; }
1834  bool opXnoise(const SOP_NodeVerb::CookParms &cookparms) const
1835  {
1836  SOP_Node *thissop = cookparms.getNode();
1837  if (!thissop) return getXnoise();
1838  bool result;
1839  OP_Utils::evalOpParm(result, thissop, "xnoise", cookparms.getCookTime(), 0);
1840  return result;
1841  }
1842  Precision getPrecision() const { return Precision(myPrecision); }
1843  void setPrecision(Precision val) { myPrecision = int64(val); }
1845  {
1846  SOP_Node *thissop = cookparms.getNode();
1847  if (!thissop) return getPrecision();
1848  int64 result;
1849  OP_Utils::evalOpParm(result, thissop, "precision", cookparms.getCookTime(), 0);
1850  return Precision(result);
1851  }
1852  bool getImportPrequel() const { return myImportPrequel; }
1853  void setImportPrequel(bool val) { myImportPrequel = val; }
1854  bool opImportPrequel(const SOP_NodeVerb::CookParms &cookparms) const
1855  {
1856  SOP_Node *thissop = cookparms.getNode();
1857  if (!thissop) return getImportPrequel();
1858  bool result;
1859  OP_Utils::evalOpParm(result, thissop, "importprequel", cookparms.getCookTime(), 0);
1860  return result;
1861  }
1862  const UT_Array<Bindings> &getBindings() const { return myBindings; }
1863 void setBindings(const UT_Array<Bindings> &val) { myBindings = val; }
1864  exint opBindings(const SOP_NodeVerb::CookParms &cookparms) const
1865  {
1866  SOP_Node *thissop = cookparms.getNode();
1867  if (!thissop) return getBindings().entries();
1868  exint result;
1869  OP_Utils::evalOpParm(result, thissop, "bindings", cookparms.getCookTime(), 0);
1870  return result;
1871  }
1873  { return opinstBindings_bindings_name(cookparms, &_idx); }
1875  {
1876  SOP_Node *thissop = cookparms.getNode();
1877  if (!thissop) return (myBindings(_idx[0]).bindings_name);
1878  int _parmidx[2-1];
1879  _parmidx[1-1] = _idx[1-1] + 1;
1880 
1882  OP_Utils::evalOpParmInst(result, thissop, "bindings#_name", _parmidx, cookparms.getCookTime(), 0, 2-1);
1883  return (result);
1884  }
1885  int64 opBindings_bindings_type(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1886  { return opinstBindings_bindings_type(cookparms, &_idx); }
1887  int64 opinstBindings_bindings_type(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1888  {
1889  SOP_Node *thissop = cookparms.getNode();
1890  if (!thissop) return (myBindings(_idx[0]).bindings_type);
1891  int _parmidx[2-1];
1892  _parmidx[1-1] = _idx[1-1] + 1;
1893 
1894  int64 result;
1895  OP_Utils::evalOpParmInst(result, thissop, "bindings#_type", _parmidx, cookparms.getCookTime(), 0, 2-1);
1896  return (result);
1897  }
1899  { return opinstBindings_bindings_ramp(cookparms, &_idx); }
1901  {
1902  SOP_Node *thissop = cookparms.getNode();
1903  if (!thissop) return (myBindings(_idx[0]).bindings_ramp);
1904  int _parmidx[2-1];
1905  _parmidx[1-1] = _idx[1-1] + 1;
1906 
1908  OP_Utils::evalOpParmInst(result, thissop, "bindings#_ramp", _parmidx, cookparms.getCookTime(), 0, 2-1);
1909  return (result);
1910  }
1912  { return opinstBindings_bindings_rampsize(cookparms, &_idx); }
1913  int64 opinstBindings_bindings_rampsize(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1914  {
1915  SOP_Node *thissop = cookparms.getNode();
1916  if (!thissop) return (myBindings(_idx[0]).bindings_rampsize);
1917  int _parmidx[2-1];
1918  _parmidx[1-1] = _idx[1-1] + 1;
1919 
1920  int64 result;
1921  OP_Utils::evalOpParmInst(result, thissop, "bindings#_rampsize", _parmidx, cookparms.getCookTime(), 0, 2-1);
1922  return (result);
1923  }
1924  int64 opBindings_bindings_input(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1925  { return opinstBindings_bindings_input(cookparms, &_idx); }
1926  int64 opinstBindings_bindings_input(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1927  {
1928  SOP_Node *thissop = cookparms.getNode();
1929  if (!thissop) return (myBindings(_idx[0]).bindings_input);
1930  int _parmidx[2-1];
1931  _parmidx[1-1] = _idx[1-1] + 1;
1932 
1933  int64 result;
1934  OP_Utils::evalOpParmInst(result, thissop, "bindings#_input", _parmidx, cookparms.getCookTime(), 0, 2-1);
1935  return (result);
1936  }
1938  { return opinstBindings_bindings_volume(cookparms, &_idx); }
1940  {
1941  SOP_Node *thissop = cookparms.getNode();
1942  if (!thissop) return (myBindings(_idx[0]).bindings_volume);
1943  int _parmidx[2-1];
1944  _parmidx[1-1] = _idx[1-1] + 1;
1945 
1947  OP_Utils::evalOpParmInst(result, thissop, "bindings#_volume", _parmidx, cookparms.getCookTime(), 0, 2-1);
1948  return (result);
1949  }
1951  { return opinstBindings_bindings_vdbtype(cookparms, &_idx); }
1952  int64 opinstBindings_bindings_vdbtype(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1953  {
1954  SOP_Node *thissop = cookparms.getNode();
1955  if (!thissop) return (myBindings(_idx[0]).bindings_vdbtype);
1956  int _parmidx[2-1];
1957  _parmidx[1-1] = _idx[1-1] + 1;
1958 
1959  int64 result;
1960  OP_Utils::evalOpParmInst(result, thissop, "bindings#_vdbtype", _parmidx, cookparms.getCookTime(), 0, 2-1);
1961  return (result);
1962  }
1963  bool opBindings_bindings_forcealign(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1964  { return opinstBindings_bindings_forcealign(cookparms, &_idx); }
1965  bool opinstBindings_bindings_forcealign(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1966  {
1967  SOP_Node *thissop = cookparms.getNode();
1968  if (!thissop) return (myBindings(_idx[0]).bindings_forcealign);
1969  int _parmidx[2-1];
1970  _parmidx[1-1] = _idx[1-1] + 1;
1971 
1972  bool result;
1973  OP_Utils::evalOpParmInst(result, thissop, "bindings#_forcealign", _parmidx, cookparms.getCookTime(), 0, 2-1);
1974  return (result);
1975  }
1976  bool opBindings_bindings_resolution(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1977  { return opinstBindings_bindings_resolution(cookparms, &_idx); }
1978  bool opinstBindings_bindings_resolution(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1979  {
1980  SOP_Node *thissop = cookparms.getNode();
1981  if (!thissop) return (myBindings(_idx[0]).bindings_resolution);
1982  int _parmidx[2-1];
1983  _parmidx[1-1] = _idx[1-1] + 1;
1984 
1985  bool result;
1986  OP_Utils::evalOpParmInst(result, thissop, "bindings#_resolution", _parmidx, cookparms.getCookTime(), 0, 2-1);
1987  return (result);
1988  }
1989  bool opBindings_bindings_voxelsize(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
1990  { return opinstBindings_bindings_voxelsize(cookparms, &_idx); }
1991  bool opinstBindings_bindings_voxelsize(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
1992  {
1993  SOP_Node *thissop = cookparms.getNode();
1994  if (!thissop) return (myBindings(_idx[0]).bindings_voxelsize);
1995  int _parmidx[2-1];
1996  _parmidx[1-1] = _idx[1-1] + 1;
1997 
1998  bool result;
1999  OP_Utils::evalOpParmInst(result, thissop, "bindings#_voxelsize", _parmidx, cookparms.getCookTime(), 0, 2-1);
2000  return (result);
2001  }
2002  bool opBindings_bindings_xformtoworld(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
2003  { return opinstBindings_bindings_xformtoworld(cookparms, &_idx); }
2004  bool opinstBindings_bindings_xformtoworld(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
2005  {
2006  SOP_Node *thissop = cookparms.getNode();
2007  if (!thissop) return (myBindings(_idx[0]).bindings_xformtoworld);
2008  int _parmidx[2-1];
2009  _parmidx[1-1] = _idx[1-1] + 1;
2010 
2011  bool result;
2012  OP_Utils::evalOpParmInst(result, thissop, "bindings#_xformtoworld", _parmidx, cookparms.getCookTime(), 0, 2-1);
2013  return (result);
2014  }
2015  bool opBindings_bindings_xformtovoxel(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
2016  { return opinstBindings_bindings_xformtovoxel(cookparms, &_idx); }
2017  bool opinstBindings_bindings_xformtovoxel(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
2018  {
2019  SOP_Node *thissop = cookparms.getNode();
2020  if (!thissop) return (myBindings(_idx[0]).bindings_xformtovoxel);
2021  int _parmidx[2-1];
2022  _parmidx[1-1] = _idx[1-1] + 1;
2023 
2024  bool result;
2025  OP_Utils::evalOpParmInst(result, thissop, "bindings#_xformtovoxel", _parmidx, cookparms.getCookTime(), 0, 2-1);
2026  return (result);
2027  }
2029  { return opinstBindings_bindings_attribute(cookparms, &_idx); }
2031  {
2032  SOP_Node *thissop = cookparms.getNode();
2033  if (!thissop) return (myBindings(_idx[0]).bindings_attribute);
2034  int _parmidx[2-1];
2035  _parmidx[1-1] = _idx[1-1] + 1;
2036 
2038  OP_Utils::evalOpParmInst(result, thissop, "bindings#_attribute", _parmidx, cookparms.getCookTime(), 0, 2-1);
2039  return (result);
2040  }
2042  { return opinstBindings_bindings_attribclass(cookparms, &_idx); }
2043  int64 opinstBindings_bindings_attribclass(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
2044  {
2045  SOP_Node *thissop = cookparms.getNode();
2046  if (!thissop) return (myBindings(_idx[0]).bindings_attribclass);
2047  int _parmidx[2-1];
2048  _parmidx[1-1] = _idx[1-1] + 1;
2049 
2050  int64 result;
2051  OP_Utils::evalOpParmInst(result, thissop, "bindings#_attribclass", _parmidx, cookparms.getCookTime(), 0, 2-1);
2052  return (result);
2053  }
2055  { return opinstBindings_bindings_attribtype(cookparms, &_idx); }
2056  int64 opinstBindings_bindings_attribtype(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
2057  {
2058  SOP_Node *thissop = cookparms.getNode();
2059  if (!thissop) return (myBindings(_idx[0]).bindings_attribtype);
2060  int _parmidx[2-1];
2061  _parmidx[1-1] = _idx[1-1] + 1;
2062 
2063  int64 result;
2064  OP_Utils::evalOpParmInst(result, thissop, "bindings#_attribtype", _parmidx, cookparms.getCookTime(), 0, 2-1);
2065  return (result);
2066  }
2068  { return opinstBindings_bindings_attribsize(cookparms, &_idx); }
2069  int64 opinstBindings_bindings_attribsize(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
2070  {
2071  SOP_Node *thissop = cookparms.getNode();
2072  if (!thissop) return (myBindings(_idx[0]).bindings_attribsize);
2073  int _parmidx[2-1];
2074  _parmidx[1-1] = _idx[1-1] + 1;
2075 
2076  int64 result;
2077  OP_Utils::evalOpParmInst(result, thissop, "bindings#_attribsize", _parmidx, cookparms.getCookTime(), 0, 2-1);
2078  return (result);
2079  }
2081  { return opinstBindings_bindings_precision(cookparms, &_idx); }
2082  int64 opinstBindings_bindings_precision(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
2083  {
2084  SOP_Node *thissop = cookparms.getNode();
2085  if (!thissop) return (myBindings(_idx[0]).bindings_precision);
2086  int _parmidx[2-1];
2087  _parmidx[1-1] = _idx[1-1] + 1;
2088 
2089  int64 result;
2090  OP_Utils::evalOpParmInst(result, thissop, "bindings#_precision", _parmidx, cookparms.getCookTime(), 0, 2-1);
2091  return (result);
2092  }
2093  bool opBindings_bindings_readable(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
2094  { return opinstBindings_bindings_readable(cookparms, &_idx); }
2095  bool opinstBindings_bindings_readable(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
2096  {
2097  SOP_Node *thissop = cookparms.getNode();
2098  if (!thissop) return (myBindings(_idx[0]).bindings_readable);
2099  int _parmidx[2-1];
2100  _parmidx[1-1] = _idx[1-1] + 1;
2101 
2102  bool result;
2103  OP_Utils::evalOpParmInst(result, thissop, "bindings#_readable", _parmidx, cookparms.getCookTime(), 0, 2-1);
2104  return (result);
2105  }
2106  bool opBindings_bindings_writeable(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
2107  { return opinstBindings_bindings_writeable(cookparms, &_idx); }
2108  bool opinstBindings_bindings_writeable(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
2109  {
2110  SOP_Node *thissop = cookparms.getNode();
2111  if (!thissop) return (myBindings(_idx[0]).bindings_writeable);
2112  int _parmidx[2-1];
2113  _parmidx[1-1] = _idx[1-1] + 1;
2114 
2115  bool result;
2116  OP_Utils::evalOpParmInst(result, thissop, "bindings#_writeable", _parmidx, cookparms.getCookTime(), 0, 2-1);
2117  return (result);
2118  }
2119  bool opBindings_bindings_optional(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
2120  { return opinstBindings_bindings_optional(cookparms, &_idx); }
2121  bool opinstBindings_bindings_optional(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
2122  {
2123  SOP_Node *thissop = cookparms.getNode();
2124  if (!thissop) return (myBindings(_idx[0]).bindings_optional);
2125  int _parmidx[2-1];
2126  _parmidx[1-1] = _idx[1-1] + 1;
2127 
2128  bool result;
2129  OP_Utils::evalOpParmInst(result, thissop, "bindings#_optional", _parmidx, cookparms.getCookTime(), 0, 2-1);
2130  return (result);
2131  }
2132  bool opBindings_bindings_defval(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
2133  { return opinstBindings_bindings_defval(cookparms, &_idx); }
2134  bool opinstBindings_bindings_defval(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
2135  {
2136  SOP_Node *thissop = cookparms.getNode();
2137  if (!thissop) return (myBindings(_idx[0]).bindings_defval);
2138  int _parmidx[2-1];
2139  _parmidx[1-1] = _idx[1-1] + 1;
2140 
2141  bool result;
2142  OP_Utils::evalOpParmInst(result, thissop, "bindings#_defval", _parmidx, cookparms.getCookTime(), 0, 2-1);
2143  return (result);
2144  }
2146  { return opinstBindings_bindings_intval(cookparms, &_idx); }
2147  int64 opinstBindings_bindings_intval(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
2148  {
2149  SOP_Node *thissop = cookparms.getNode();
2150  if (!thissop) return (myBindings(_idx[0]).bindings_intval);
2151  int _parmidx[2-1];
2152  _parmidx[1-1] = _idx[1-1] + 1;
2153 
2154  int64 result;
2155  OP_Utils::evalOpParmInst(result, thissop, "bindings#_intval", _parmidx, cookparms.getCookTime(), 0, 2-1);
2156  return (result);
2157  }
2159  { return opinstBindings_bindings_fval(cookparms, &_idx); }
2160  fpreal64 opinstBindings_bindings_fval(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
2161  {
2162  SOP_Node *thissop = cookparms.getNode();
2163  if (!thissop) return (myBindings(_idx[0]).bindings_fval);
2164  int _parmidx[2-1];
2165  _parmidx[1-1] = _idx[1-1] + 1;
2166 
2167  fpreal64 result;
2168  OP_Utils::evalOpParmInst(result, thissop, "bindings#_fval", _parmidx, cookparms.getCookTime(), 0, 2-1);
2169  return (result);
2170  }
2172  { return opinstBindings_bindings_v2val(cookparms, &_idx); }
2173  UT_Vector2D opinstBindings_bindings_v2val(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
2174  {
2175  SOP_Node *thissop = cookparms.getNode();
2176  if (!thissop) return (myBindings(_idx[0]).bindings_v2val);
2177  int _parmidx[2-1];
2178  _parmidx[1-1] = _idx[1-1] + 1;
2179 
2181  OP_Utils::evalOpParmInst(result, thissop, "bindings#_v2val", _parmidx, cookparms.getCookTime(), 0, 2-1);
2182  return (result);
2183  }
2185  { return opinstBindings_bindings_v3val(cookparms, &_idx); }
2186  UT_Vector3D opinstBindings_bindings_v3val(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
2187  {
2188  SOP_Node *thissop = cookparms.getNode();
2189  if (!thissop) return (myBindings(_idx[0]).bindings_v3val);
2190  int _parmidx[2-1];
2191  _parmidx[1-1] = _idx[1-1] + 1;
2192 
2194  OP_Utils::evalOpParmInst(result, thissop, "bindings#_v3val", _parmidx, cookparms.getCookTime(), 0, 2-1);
2195  return (result);
2196  }
2198  { return opinstBindings_bindings_v4val(cookparms, &_idx); }
2199  UT_Vector4D opinstBindings_bindings_v4val(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
2200  {
2201  SOP_Node *thissop = cookparms.getNode();
2202  if (!thissop) return (myBindings(_idx[0]).bindings_v4val);
2203  int _parmidx[2-1];
2204  _parmidx[1-1] = _idx[1-1] + 1;
2205 
2207  OP_Utils::evalOpParmInst(result, thissop, "bindings#_v4val", _parmidx, cookparms.getCookTime(), 0, 2-1);
2208  return (result);
2209  }
2211  { return opinstBindings_bindings_timescale(cookparms, &_idx); }
2212  int64 opinstBindings_bindings_timescale(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
2213  {
2214  SOP_Node *thissop = cookparms.getNode();
2215  if (!thissop) return (myBindings(_idx[0]).bindings_timescale);
2216  int _parmidx[2-1];
2217  _parmidx[1-1] = _idx[1-1] + 1;
2218 
2219  int64 result;
2220  OP_Utils::evalOpParmInst(result, thissop, "bindings#_timescale", _parmidx, cookparms.getCookTime(), 0, 2-1);
2221  return (result);
2222  }
2223 
2224  const UT_StringHolder & getGeneratedCode() const { return myGeneratedCode; }
2225  void setGeneratedCode(const UT_StringHolder & val) { myGeneratedCode = val; }
2227  {
2228  SOP_Node *thissop = cookparms.getNode();
2229  if (!thissop) return getGeneratedCode();
2231  OP_Utils::evalOpParm(result, thissop, "generatedcode", cookparms.getCookTime(), 0);
2232  return result;
2233  }
2234 
2235 private:
2236  UT_StringHolder myKernelName;
2237  bool myUseCode;
2238  UT_StringHolder myKernelFile;
2239  UT_StringHolder myKernelCode;
2240  bool myAtBinding;
2241  UT_StringHolder myKernelOptions;
2242  UT_StringHolder myKernelOptionAttrib;
2243  bool myUseWriteBackKernel;
2244  UT_StringHolder myWriteBackKernelName;
2245  bool myRecompile;
2246  int64 myRunOver;
2247  int64 myIterations;
2248  bool myIteration;
2249  UT_StringHolder myWorksets_begin;
2250  UT_StringHolder myWorksets_length;
2251  bool mySingleworkgroup;
2252  bool myFinish;
2253  bool myTime;
2254  bool myTimeInc;
2255  fpreal64 myTimescale;
2256  int64 myTimemethod;
2257  bool myXnoise;
2258  int64 myPrecision;
2259  bool myImportPrequel;
2260  UT_Array<Bindings> myBindings;
2261  UT_StringHolder myGeneratedCode;
2262 
2263 };
const UT_StringHolder & getWorksets_length() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
bool getRecompile() const
bool opXnoise(const SOP_NodeVerb::CookParms &cookparms) const
bool opinstBindings_bindings_optional(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
bool getUseWriteBackKernel() const
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glcorearb.h:2540
UT_StringHolder opGeneratedCode(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Vector3D &v)
void setAtBinding(bool val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
void setIteration(bool val)
UT_Vector3D opBindings_bindings_v3val(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
SYS_FORCE_INLINE UT_StringHolder getToken(RunOver enum_value)
int int32
Definition: SYS_Types.h:39
void setKernelCode(const UT_StringHolder &val)
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
bool opinstBindings_bindings_defval(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
void setWorksets_begin(const UT_StringHolder &val)
int64 opinstBindings_bindings_rampsize(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
int64 opinstBindings_bindings_attribclass(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
UT_Vector3D opinstBindings_bindings_v3val(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
bool opUseCode(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opBindings_bindings_name(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
Timemethod opTimemethod(const SOP_NodeVerb::CookParms &cookparms) const
void
Definition: png.h:1083
UT_SharedPtr< UT_Ramp > opinstBindings_bindings_ramp(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
UT_StringHolder opKernelName(const SOP_NodeVerb::CookParms &cookparms) const
exint bread(int32 *buffer, exint asize=1)
GLboolean * data
Definition: glcorearb.h:131
GT_API const UT_StringHolder time
bool opIteration(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector4.h:493
const GLdouble * v
Definition: glcorearb.h:837
const UT_StringHolder & getKernelOptionAttrib() const
fpreal getTime() const
Definition: OP_Context.h:62
int64 opBindings_bindings_input(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
static void saveData(std::ostream &os, int64 v)
UT_Vector2T< fpreal64 > UT_Vector2D
void setTimemethod(Timemethod val)
int64 opinstBindings_bindings_type(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
static void loadData(UT_IStream &is, UT_Vector4D &v)
ParmType getNestParmType(TempIndex fieldnum) const override
void setRecompile(bool val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
int64 opBindings_bindings_rampsize(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
UT_String makeQuotedString(char delimiter='\'', bool escape_nonprinting=false) const
const OP_Context & context() const
Definition: OP_NodeParms.h:97
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
void setKernelFile(const UT_StringHolder &val)
void setKernelName(const UT_StringHolder &val)
bool opBindings_bindings_forcealign(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:667
int64 exint
Definition: SYS_Types.h:125
static void loadData(UT_IStream &is, UT_Vector2D &v)
static void saveData(std::ostream &os, fpreal64 v)
bool operator!=(const Bindings &src) const
SYS_FORCE_INLINE const char * buffer() const
bool opFinish(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
GLdouble s
Definition: glad.h:3009
int64 opBindings_bindings_type(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
UT_StringHolder opinstBindings_bindings_attribute(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
GLuint GLsizei GLsizei * length
Definition: glcorearb.h:795
fpreal64 opTimescale(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opWorksets_length(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getWriteBackKernelName() const
An output stream object that owns its own string buffer storage.
const char * getNestParmName(TempIndex fieldnum) const override
void setTime(bool val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
UT_StringHolder bindings_volume
static void loadData(UT_IStream &is, UT_Vector3I &v)
const UT_StringHolder & getKernelOptions() const
int64 getIterations() const
**But if you need a result
Definition: thread.h:613
static void saveData(std::ostream &os, UT_Vector2D v)
fpreal64 opinstBindings_bindings_fval(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
UT_StringHolder opinstBindings_bindings_volume(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
int64 opBindings_bindings_attribclass(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
exint nodeIdx() const
Definition: OP_NodeParms.h:95
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
void setImportPrequel(bool val)
bool opImportPrequel(const SOP_NodeVerb::CookParms &cookparms) const
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
UT_StringHolder opKernelOptionAttrib(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opBindings_bindings_attribute(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
int64 opinstBindings_bindings_intval(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
virtual NodeIdx getInput(NodeIdx idx, int input, bool markused=false) const =0
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
void save(std::ostream &os) const
void setKernelOptions(const UT_StringHolder &val)
GLuint GLsizei const GLuint const GLintptr * offsets
Definition: glcorearb.h:2621
void setTimescale(fpreal64 val)
const UT_StringHolder & getWorksets_begin() const
double fpreal64
Definition: SYS_Types.h:201
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
RunOver getRunOver() const
UT_StringHolder opWorksets_begin(const SOP_NodeVerb::CookParms &cookparms) const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
static void saveData(std::ostream &os, UT_Matrix3D v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
fpreal64 getTimescale() const
const UT_StringHolder & getKernelFile() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
void setXnoise(bool val)
exint opBindings(const SOP_NodeVerb::CookParms &cookparms) const
bool opTime(const SOP_NodeVerb::CookParms &cookparms) const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
bool getAtBinding() const
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
bool getIteration() const
int64 opinstBindings_bindings_vdbtype(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
exint length() const
static void saveData(std::ostream &os, UT_Vector4D v)
UT_SharedPtr< UT_Ramp > bindings_ramp
int64 opBindings_bindings_attribtype(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
static void loadData(UT_IStream &is, UT_Vector4I &v)
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:36
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:495
UT_Vector2D opinstBindings_bindings_v2val(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
Precision getPrecision() const
bool getTime() const
void setWorksets_length(const UT_StringHolder &val)
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
UT_StringHolder opWriteBackKernelName(const SOP_NodeVerb::CookParms &cookparms) const
bool opinstBindings_bindings_xformtoworld(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
exint read(bool *array, exint sz=1)
Definition: UT_IStream.h:276
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
void setUseCode(bool val)
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
bool opBindings_bindings_defval(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
bool opBindings_bindings_voxelsize(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
void setPrecision(Precision val)
static void saveData(std::ostream &os, UT_StringHolder s)
bool opinstBindings_bindings_xformtovoxel(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
static void loadData(UT_IStream &is, UT_Vector2I &v)
void loadFromOpSubclass(const LoadParms &loadparms) override
UT_StringHolder opKernelFile(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector4D opBindings_bindings_v4val(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
static void saveData(std::ostream &os, UT_Vector3D v)
void setWriteBackKernelName(const UT_StringHolder &val)
bool getSingleworkgroup() const
bool opinstBindings_bindings_voxelsize(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
UT_Vector2D opBindings_bindings_v2val(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
virtual void evalOpParmInst(int64 &v, NodeIdx node, const char *parmname, const int *inst, const int *offsets, fpreal time, DEP_MicroNode *depnode, int nestlevel=1) const =0
long long int64
Definition: SYS_Types.h:116
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
UT_Vector3T< fpreal64 > UT_Vector3D
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
bool opUseWriteBackKernel(const SOP_NodeVerb::CookParms &cookparms) const
bool opBindings_bindings_xformtoworld(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
bool opBindings_bindings_xformtovoxel(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
static void loadData(UT_IStream &is, int64 &v)
bool getImportPrequel() const
int64 opBindings_bindings_vdbtype(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
void copyFrom(const OP_NodeParms *src) override
UT_StringHolder opBindings_bindings_volume(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
bool opSingleworkgroup(const SOP_NodeVerb::CookParms &cookparms) const
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
bool opBindings_bindings_writeable(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
exint getNestNumParms(TempIndex idx) const override
bool opTimeInc(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix3D &v)
SYS_FORCE_INLINE void strcat(const char *src)
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:296
UT_StringHolder createString(const UT_Array< Bindings > &list) const
int64 opBindings_bindings_precision(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
GT_API const UT_StringHolder version
int64 opinstBindings_bindings_input(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
exint entries() const
Alias of size(). size() is preferred.
Definition: UT_Array.h:648
UT_StringHolder bindings_attribute
void setGeneratedCode(const UT_StringHolder &val)
bool getXnoise() const
bool operator==(const SOP_OpenCLParms &src) const
UT_Vector4D opinstBindings_bindings_v4val(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
bool operator==(const Bindings &src) const
bool isParmColorRamp(exint idx) const override
int64 opinstBindings_bindings_attribtype(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
void setIterations(int64 val)
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
int int appendSprintf(const char *fmt,...) SYS_PRINTF_CHECK_ATTRIBUTE(2
const UT_StringHolder & getKernelCode() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
void setFinish(bool val)
static void loadData(UT_IStream &is, fpreal64 &v)
void setRunOver(RunOver val)
static int version()
int64 opBindings_bindings_intval(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
void setSingleworkgroup(bool val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
bool opinstBindings_bindings_readable(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
bool getFinish() const
bool opRecompile(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 fpreal
Definition: SYS_Types.h:277
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
int64 opinstBindings_bindings_precision(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
Timemethod getTimemethod() const
LeafData & operator=(const LeafData &)=delete
Utility class for containing a color ramp.
Definition: UT_Ramp.h:92
bool opAtBinding(const SOP_NodeVerb::CookParms &cookparms) const
bool load(UT_IStream &is)
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
const UT_StringHolder & getKernelName() const
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
SYS_FORCE_INLINE void append(char character)
bool opinstBindings_bindings_resolution(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
void setBindings(const UT_Array< Bindings > &val)
UT_StringHolder opinstBindings_bindings_name(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
void setUseWriteBackKernel(bool val)
GLuint GLfloat * val
Definition: glcorearb.h:1608
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
const UT_Array< Bindings > & getBindings() const
#define SOP_API
Definition: SOP_API.h:10
int64 opinstBindings_bindings_timescale(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
int64 opIterations(const SOP_NodeVerb::CookParms &cookparms) const
Precision opPrecision(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getGeneratedCode() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:361
UT_StringHolder opKernelCode(const SOP_NodeVerb::CookParms &cookparms) const
bool operator!=(const SOP_OpenCLParms &src) const
int64 opinstBindings_bindings_attribsize(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
static void saveData(std::ostream &os, bool v)
const char * findChar(int c) const
Definition: UT_String.h:1395
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
Definition: core.h:1131
bool opBindings_bindings_resolution(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
GLboolean r
Definition: glcorearb.h:1222
int64 opBindings_bindings_timescale(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
bool opBindings_bindings_readable(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
fpreal64 opBindings_bindings_fval(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
bool getUseCode() const
static void saveData(std::ostream &os, UT_Matrix4D v)
UT_SharedPtr< UT_Ramp > opBindings_bindings_ramp(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
UT_Vector4T< fpreal64 > UT_Vector4D
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
bool getTimeInc() const
type
Definition: core.h:1059
static void loadData(UT_IStream &is, UT_Matrix2D &v)
bool opinstBindings_bindings_forcealign(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
void setKernelOptionAttrib(const UT_StringHolder &val)
UT_StringHolder opKernelOptions(const SOP_NodeVerb::CookParms &cookparms) const
bool opBindings_bindings_optional(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:97
void setTimeInc(bool val)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
SYS_FORCE_INLINE bool isstring() const
static void saveData(std::ostream &os, UT_Matrix2D v)
static void loadData(UT_IStream &is, bool &v)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
int64 opBindings_bindings_attribsize(const SOP_NodeVerb::CookParms &cookparms, int _idx) const
RunOver opRunOver(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_StringHolder &v)
bool opinstBindings_bindings_writeable(const SOP_NodeVerb::CookParms &cookparms, const int *_idx) const
GLenum src
Definition: glcorearb.h:1793
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663