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_NodeVerb.h>
7 #include <SOP/SOP_GraphProxy.h>
8 
9 #include <OP/OP_Utils.h>
10 #include <PRM/PRM_Parm.h>
11 #include <UT/UT_IStream.h>
12 #include <UT/UT_NTStreamUtil.h>
13 #include <UT/UT_Ramp.h>
14 #include <UT/UT_SharedPtr.h>
15 #include <UT/UT_StringHolder.h>
16 #include <UT/UT_StringStream.h>
17 #include <UT/UT_VectorTypes.h>
18 #include <SYS/SYS_Types.h>
19 
20 using namespace UT::Literal;
21 
22 class DEP_MicroNode;
23 namespace SOP_OpenCLEnums
24 {
25  enum class RunOver
26  {
27  ATTRIBUTE = 0,
28  VOLUME,
29  WORKSETS
30  };
31  enum class Timemethod
32  {
33  INVERT = 0,
34  POW
35  };
36  enum class Precision
37  {
38  AUTO = 0,
39  _16,
40  _32,
41  _64
42  };
43  enum class Bindings_type
44  {
45  INT = 0,
46  FLOAT,
47  FLOAT3,
48  FLOAT4,
49  RAMP,
50  ATTRIBUTE,
51  VOLUME,
52  VDB
53  };
54  enum class Bindings_timescale
55  {
56  NONE = 0,
57  MULT,
58  INVERT,
59  POW
60  };
62  {
63  DETAIL = 0,
64  PRIMITIVE,
65  POINT,
66  VERTEX
67  };
69  {
70  FLOAT = 0,
71  INT,
72  FLOATARRAY,
73  INTARRAY
74  };
75  enum class Bindings_precision
76  {
77  NODE = 0,
78  _16,
79  _32,
80  _64
81  };
82 }
83 
84 
86 {
87 public:
88  static int version() { return 1; }
89  struct Bindings
90  {
114 
115 
117  {
118  bindings_name = ""_sh;
119  bindings_type = 0;
120  bindings_intval = 0;
121  bindings_fval = 0;
122  bindings_v3val = UT_Vector3D(0,0,0);
123  bindings_v4val = UT_Vector4D(0,0,0,0);
124  bindings_timescale = 0;
125  bindings_ramp = UT_SharedPtr<UT_Ramp>(0);
126  bindings_rampsize = 1024;
127  bindings_volume = ""_sh;
128  bindings_forcealign = true;
129  bindings_resolution = false;
130  bindings_voxelsize = false;
131  bindings_xformtoworld = false;
132  bindings_xformtovoxel = false;
133  bindings_attribute = ""_sh;
134  bindings_attribclass = 2;
135  bindings_attribtype = 0;
136  bindings_attribsize = 1;
137  bindings_precision = 2;
138  bindings_readable = true;
139  bindings_writeable = false;
140  bindings_optional = false;
141 
142  }
143 
144  bool operator==(const Bindings &src) const
145  {
146  if (bindings_name != src.bindings_name) return false;
147  if (bindings_type != src.bindings_type) return false;
148  if (bindings_intval != src.bindings_intval) return false;
149  if (bindings_fval != src.bindings_fval) return false;
150  if (bindings_v3val != src.bindings_v3val) return false;
151  if (bindings_v4val != src.bindings_v4val) return false;
152  if (bindings_timescale != src.bindings_timescale) return false;
153  if (bindings_ramp != src.bindings_ramp)
154  { if (!bindings_ramp || !src.bindings_ramp || !(*bindings_ramp == *src.bindings_ramp)) return false; }
155  if (bindings_rampsize != src.bindings_rampsize) return false;
156  if (bindings_volume != src.bindings_volume) return false;
157  if (bindings_forcealign != src.bindings_forcealign) return false;
158  if (bindings_resolution != src.bindings_resolution) return false;
159  if (bindings_voxelsize != src.bindings_voxelsize) return false;
160  if (bindings_xformtoworld != src.bindings_xformtoworld) return false;
161  if (bindings_xformtovoxel != src.bindings_xformtovoxel) return false;
162  if (bindings_attribute != src.bindings_attribute) return false;
163  if (bindings_attribclass != src.bindings_attribclass) return false;
164  if (bindings_attribtype != src.bindings_attribtype) return false;
165  if (bindings_attribsize != src.bindings_attribsize) return false;
166  if (bindings_precision != src.bindings_precision) return false;
167  if (bindings_readable != src.bindings_readable) return false;
168  if (bindings_writeable != src.bindings_writeable) return false;
169  if (bindings_optional != src.bindings_optional) return false;
170 
171  return true;
172  }
173  bool operator!=(const Bindings &src) const
174  {
175  return !operator==(src);
176  }
177 
178  };
179 
181  {
183 
184  buf.strcat("[ ");
185  for (int i = 0; i < list.entries(); i++)
186  {
187  if (i)
188  buf.strcat(", ");
189  buf.strcat("( ");
190  buf.append("");
191  { UT_String tmp; tmp = UT_StringWrap(list(i).bindings_name).makeQuotedString('"'); buf.strcat(tmp); }
192  buf.append(", ");
193  buf.appendSprintf("%d", (int) list(i).bindings_type);
194  buf.append(", ");
195  buf.appendSprintf("%d", (int) list(i).bindings_intval);
196  buf.append(", ");
197  buf.appendSprintf("%f", (list(i).bindings_fval));
198  buf.append(", ");
199  buf.appendSprintf("(%f, %f, %f)", list(i).bindings_v3val.x(), list(i).bindings_v3val.y(), list(i).bindings_v3val.z());
200  buf.append(", ");
201  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());
202  buf.append(", ");
203  buf.appendSprintf("%d", (int) list(i).bindings_timescale);
204  buf.append(", ");
205  if (list(i).bindings_ramp)
206  {
207  UT_OStringStream os;
208  UT_String tmp;
209  list(i).bindings_ramp->save(os);
210  tmp = UT_StringWrap(os.str().buffer()).makeQuotedString('"');
211  buf.strcat(tmp);
212  }
213  else buf.strcat("""");
214  buf.append(", ");
215  buf.appendSprintf("%d", (int) list(i).bindings_rampsize);
216  buf.append(", ");
217  { UT_String tmp; tmp = UT_StringWrap(list(i).bindings_volume).makeQuotedString('"'); buf.strcat(tmp); }
218  buf.append(", ");
219  buf.appendSprintf("%s", (list(i).bindings_forcealign) ? "true" : "false");
220  buf.append(", ");
221  buf.appendSprintf("%s", (list(i).bindings_resolution) ? "true" : "false");
222  buf.append(", ");
223  buf.appendSprintf("%s", (list(i).bindings_voxelsize) ? "true" : "false");
224  buf.append(", ");
225  buf.appendSprintf("%s", (list(i).bindings_xformtoworld) ? "true" : "false");
226  buf.append(", ");
227  buf.appendSprintf("%s", (list(i).bindings_xformtovoxel) ? "true" : "false");
228  buf.append(", ");
229  { UT_String tmp; tmp = UT_StringWrap(list(i).bindings_attribute).makeQuotedString('"'); buf.strcat(tmp); }
230  buf.append(", ");
231  buf.appendSprintf("%d", (int) list(i).bindings_attribclass);
232  buf.append(", ");
233  buf.appendSprintf("%d", (int) list(i).bindings_attribtype);
234  buf.append(", ");
235  buf.appendSprintf("%d", (int) list(i).bindings_attribsize);
236  buf.append(", ");
237  buf.appendSprintf("%d", (int) list(i).bindings_precision);
238  buf.append(", ");
239  buf.appendSprintf("%s", (list(i).bindings_readable) ? "true" : "false");
240  buf.append(", ");
241  buf.appendSprintf("%s", (list(i).bindings_writeable) ? "true" : "false");
242  buf.append(", ");
243  buf.appendSprintf("%s", (list(i).bindings_optional) ? "true" : "false");
244 
245  buf.strcat(" )");
246  }
247  buf.strcat(" ]");
248 
250  return result;
251  }
252 
254  {
255  myKernelname = "kernelName"_sh;
256  myUsecode = false;
257  myKernelfile = ""_sh;
258  myKernelcode = ""_sh;
259  myKerneloptions = ""_sh;
260  myKerneloptionattrib = ""_sh;
261  myUsewritebackkernel = false;
262  myWritebackkernelname = "writeBack"_sh;
263  myRecompile = false;
264  myRunOver = 0;
265  myIterations = 1;
266  myWorksets_begin = ""_sh;
267  myWorksets_length = ""_sh;
268  mySingleworkgroup = false;
269  myFinish = true;
270  myTime = false;
271  myTimeinc = false;
272  myTimescale = 1;
273  myTimemethod = 0;
274  myXnoise = false;
275  myPrecision = 2;
276 
277  }
278 
279  explicit SOP_OpenCLParms(const SOP_OpenCLParms &) = default;
280 
281  ~SOP_OpenCLParms() override {}
282 
283  bool operator==(const SOP_OpenCLParms &src) const
284  {
285  if (myKernelname != src.myKernelname) return false;
286  if (myUsecode != src.myUsecode) return false;
287  if (myKernelfile != src.myKernelfile) return false;
288  if (myKernelcode != src.myKernelcode) return false;
289  if (myKerneloptions != src.myKerneloptions) return false;
290  if (myKerneloptionattrib != src.myKerneloptionattrib) return false;
291  if (myUsewritebackkernel != src.myUsewritebackkernel) return false;
292  if (myWritebackkernelname != src.myWritebackkernelname) return false;
293  if (myRecompile != src.myRecompile) return false;
294  if (myRunOver != src.myRunOver) return false;
295  if (myIterations != src.myIterations) return false;
296  if (myWorksets_begin != src.myWorksets_begin) return false;
297  if (myWorksets_length != src.myWorksets_length) return false;
298  if (mySingleworkgroup != src.mySingleworkgroup) return false;
299  if (myFinish != src.myFinish) return false;
300  if (myTime != src.myTime) return false;
301  if (myTimeinc != src.myTimeinc) return false;
302  if (myTimescale != src.myTimescale) return false;
303  if (myTimemethod != src.myTimemethod) return false;
304  if (myXnoise != src.myXnoise) return false;
305  if (myPrecision != src.myPrecision) return false;
306  if (myBindings != src.myBindings) return false;
307 
308  return true;
309  }
310  bool operator!=(const SOP_OpenCLParms &src) const
311  {
312  return !operator==(src);
313  }
322 
323 
324 
325  void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
326  {
327  myKernelname = "kernelName"_sh;
328  if (true)
329  graph->evalOpParm(myKernelname, nodeidx, "kernelname", time, 0);
330  myUsecode = false;
331  if (true)
332  graph->evalOpParm(myUsecode, nodeidx, "usecode", time, 0);
333  myKernelfile = ""_sh;
334  if (true && ( (!(((getUsecode()!=0)))) ) )
335  graph->evalOpParm(myKernelfile, nodeidx, "kernelfile", time, 0);
336  myKernelcode = ""_sh;
337  if (true && ( (!(((getUsecode()==0)))) ) )
338  graph->evalOpParm(myKernelcode, nodeidx, "kernelcode", time, 0);
339  myKerneloptions = ""_sh;
340  if (true)
341  graph->evalOpParm(myKerneloptions, nodeidx, "kerneloptions", time, 0);
342  myKerneloptionattrib = ""_sh;
343  if (true)
344  graph->evalOpParm(myKerneloptionattrib, nodeidx, "kerneloptionattrib", time, 0);
345  myUsewritebackkernel = false;
346  if (true)
347  graph->evalOpParm(myUsewritebackkernel, nodeidx, "usewritebackkernel", time, 0);
348  myWritebackkernelname = "writeBack"_sh;
349  if (true && ( (!(((getUsewritebackkernel()==0)))) ) )
350  graph->evalOpParm(myWritebackkernelname, nodeidx, "writebackkernelname", time, 0);
351  myRecompile = false;
352  if (true)
353  graph->evalOpParm(myRecompile, nodeidx, "recompile", time, 0);
354  myRunOver = 0;
355  if (true)
356  graph->evalOpParm(myRunOver, nodeidx, "runover", time, 0);
357  myIterations = 1;
358  if (true)
359  graph->evalOpParm(myIterations, nodeidx, "iterations", time, 0);
360  myWorksets_begin = ""_sh;
361  if (true && ( (!(((int64(getRunOver())!=2)))) ) )
362  graph->evalOpParm(myWorksets_begin, nodeidx, "worksets_begin", time, 0);
363  myWorksets_length = ""_sh;
364  if (true && ( (!(((int64(getRunOver())!=2)))) ) )
365  graph->evalOpParm(myWorksets_length, nodeidx, "worksets_length", time, 0);
366  mySingleworkgroup = false;
367  if (true && ( (!(((int64(getRunOver())!=2)))) ) )
368  graph->evalOpParm(mySingleworkgroup, nodeidx, "singleworkgroup", time, 0);
369  myFinish = true;
370  if (true)
371  graph->evalOpParm(myFinish, nodeidx, "finish", time, 0);
372  myTime = false;
373  if (true)
374  graph->evalOpParm(myTime, nodeidx, "time", time, 0);
375  myTimeinc = false;
376  if (true)
377  graph->evalOpParm(myTimeinc, nodeidx, "timeinc", time, 0);
378  myTimescale = 1;
379  if (true && ( (!(((getTimeinc()==0)))) ) )
380  graph->evalOpParm(myTimescale, nodeidx, "timescale", time, 0);
381  myTimemethod = 0;
382  if (true && ( (!(((getTimeinc()==0)))) ) )
383  graph->evalOpParm(myTimemethod, nodeidx, "timemethod", time, 0);
384  myXnoise = false;
385  if (true)
386  graph->evalOpParm(myXnoise, nodeidx, "xnoise", time, 0);
387  myPrecision = 2;
388  if (true)
389  graph->evalOpParm(myPrecision, nodeidx, "precision", time, 0);
390  if (true)
391  {
392  int64 length = 0;
393  graph->evalOpParm(length, nodeidx, "bindings", time, 0);
394  myBindings.entries(length);
395  for (exint i = 0; i < length; i++)
396  {
397  int parmidx = i+1;
398  auto && _curentry = myBindings(i);
399  (void) _curentry;
400  myBindings(i).bindings_name = ""_sh;
401  if (true)
402  graph->evalOpParmInst(myBindings(i).bindings_name, nodeidx, "bindings#_name", &parmidx, time, 0);
403  myBindings(i).bindings_type = 0;
404  if (true)
405  graph->evalOpParmInst(myBindings(i).bindings_type, nodeidx, "bindings#_type", &parmidx, time, 0);
406  myBindings(i).bindings_intval = 0;
407  if (true && ( (!(((_curentry.bindings_type!=0)))) ) )
408  graph->evalOpParmInst(myBindings(i).bindings_intval, nodeidx, "bindings#_intval", &parmidx, time, 0);
409  myBindings(i).bindings_fval = 0;
410  if (true && ( (!(((_curentry.bindings_type!=1)))) ) )
411  graph->evalOpParmInst(myBindings(i).bindings_fval, nodeidx, "bindings#_fval", &parmidx, time, 0);
412  myBindings(i).bindings_v3val = UT_Vector3D(0,0,0);
413  if (true && ( (!(((_curentry.bindings_type!=2)))) ) )
414  graph->evalOpParmInst(myBindings(i).bindings_v3val, nodeidx, "bindings#_v3val", &parmidx, time, 0);
415  myBindings(i).bindings_v4val = UT_Vector4D(0,0,0,0);
416  if (true && ( (!(((_curentry.bindings_type!=3)))) ) )
417  graph->evalOpParmInst(myBindings(i).bindings_v4val, nodeidx, "bindings#_v4val", &parmidx, time, 0);
418  myBindings(i).bindings_timescale = 0;
419  if (true && ( (!(((_curentry.bindings_type!=1)))) ) )
420  graph->evalOpParmInst(myBindings(i).bindings_timescale, nodeidx, "bindings#_timescale", &parmidx, time, 0);
421  myBindings(i).bindings_ramp = UT_SharedPtr<UT_Ramp>(0);
422  if (true && ( (!(((_curentry.bindings_type!=4)))) ) )
423  graph->evalOpParmInst(myBindings(i).bindings_ramp, nodeidx, "bindings#_ramp", &parmidx, time, 0);
424  myBindings(i).bindings_rampsize = 1024;
425  if (true && ( (!(((_curentry.bindings_type!=4)))) ) )
426  graph->evalOpParmInst(myBindings(i).bindings_rampsize, nodeidx, "bindings#_rampsize", &parmidx, time, 0);
427  myBindings(i).bindings_volume = ""_sh;
428  if (true && ( (!(((_curentry.bindings_type!=6)&&(_curentry.bindings_type!=7)))) ) )
429  graph->evalOpParmInst(myBindings(i).bindings_volume, nodeidx, "bindings#_volume", &parmidx, time, 0);
430  myBindings(i).bindings_forcealign = true;
431  if (true && ( (!(((_curentry.bindings_type!=6)))) ) )
432  graph->evalOpParmInst(myBindings(i).bindings_forcealign, nodeidx, "bindings#_forcealign", &parmidx, time, 0);
433  myBindings(i).bindings_resolution = false;
434  if (true && ( (!(((_curentry.bindings_type!=6))||((_curentry.bindings_forcealign==1)))) ) )
435  graph->evalOpParmInst(myBindings(i).bindings_resolution, nodeidx, "bindings#_resolution", &parmidx, time, 0);
436  myBindings(i).bindings_voxelsize = false;
437  if (true && ( (!(((_curentry.bindings_type!=6)&&(_curentry.bindings_type!=7))||((_curentry.bindings_forcealign==1)&&(_curentry.bindings_type==6)))) ) )
438  graph->evalOpParmInst(myBindings(i).bindings_voxelsize, nodeidx, "bindings#_voxelsize", &parmidx, time, 0);
439  myBindings(i).bindings_xformtoworld = false;
440  if (true && ( (!(((_curentry.bindings_type!=6)&&(_curentry.bindings_type!=7))||((_curentry.bindings_forcealign==1)&&(_curentry.bindings_type==6)))) ) )
441  graph->evalOpParmInst(myBindings(i).bindings_xformtoworld, nodeidx, "bindings#_xformtoworld", &parmidx, time, 0);
442  myBindings(i).bindings_xformtovoxel = false;
443  if (true && ( (!(((_curentry.bindings_type!=6)&&(_curentry.bindings_type!=7))||((_curentry.bindings_forcealign==1)&&(_curentry.bindings_type==6)))) ) )
444  graph->evalOpParmInst(myBindings(i).bindings_xformtovoxel, nodeidx, "bindings#_xformtovoxel", &parmidx, time, 0);
445  myBindings(i).bindings_attribute = ""_sh;
446  if (true && ( (!(((_curentry.bindings_type!=5)))) ) )
447  graph->evalOpParmInst(myBindings(i).bindings_attribute, nodeidx, "bindings#_attribute", &parmidx, time, 0);
448  myBindings(i).bindings_attribclass = 2;
449  if (true && ( (!(((_curentry.bindings_type!=5)))) ) )
450  graph->evalOpParmInst(myBindings(i).bindings_attribclass, nodeidx, "bindings#_attribclass", &parmidx, time, 0);
451  myBindings(i).bindings_attribtype = 0;
452  if (true && ( (!(((_curentry.bindings_type!=5)))) ) )
453  graph->evalOpParmInst(myBindings(i).bindings_attribtype, nodeidx, "bindings#_attribtype", &parmidx, time, 0);
454  myBindings(i).bindings_attribsize = 1;
455  if (true && ( (!(((_curentry.bindings_type!=5)))) ) )
456  graph->evalOpParmInst(myBindings(i).bindings_attribsize, nodeidx, "bindings#_attribsize", &parmidx, time, 0);
457  myBindings(i).bindings_precision = 2;
458  if (true)
459  graph->evalOpParmInst(myBindings(i).bindings_precision, nodeidx, "bindings#_precision", &parmidx, time, 0);
460  myBindings(i).bindings_readable = true;
461  if (true && ( (!(((_curentry.bindings_type!=5)&&(_curentry.bindings_type!=6)))) ) )
462  graph->evalOpParmInst(myBindings(i).bindings_readable, nodeidx, "bindings#_readable", &parmidx, time, 0);
463  myBindings(i).bindings_writeable = false;
464  if (true && ( (!(((_curentry.bindings_type!=5)&&(_curentry.bindings_type!=6)))) ) )
465  graph->evalOpParmInst(myBindings(i).bindings_writeable, nodeidx, "bindings#_writeable", &parmidx, time, 0);
466  myBindings(i).bindings_optional = false;
467  if (true && ( (!(((_curentry.bindings_type!=5)&&(_curentry.bindings_type!=6)&&(_curentry.bindings_type!=7)))) ) )
468  graph->evalOpParmInst(myBindings(i).bindings_optional, nodeidx, "bindings#_optional", &parmidx, time, 0);
469 
470  }
471  }
472  else
473  myBindings.clear();
474 
475  }
476 
477 
478  void loadFromOpSubclass(const LoadParms &loadparms) override
479  {
480  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
481  }
482 
483 
484  void copyFrom(const SOP_NodeParms *src) override
485  {
486  *this = *((const SOP_OpenCLParms *)src);
487  }
488 
489  template <typename T>
490  void
491  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
492  {
493  if (idx.size() < 1)
494  return;
495  UT_ASSERT(idx.size() == instance.size()+1);
496  if (idx.size() != instance.size()+1)
497  return;
498  switch (idx[0])
499  {
500  case 0:
501  coerceValue(value, myKernelname);
502  break;
503  case 1:
504  coerceValue(value, myUsecode);
505  break;
506  case 2:
507  coerceValue(value, myKernelfile);
508  break;
509  case 3:
510  coerceValue(value, myKernelcode);
511  break;
512  case 4:
513  coerceValue(value, myKerneloptions);
514  break;
515  case 5:
516  coerceValue(value, myKerneloptionattrib);
517  break;
518  case 6:
519  coerceValue(value, myUsewritebackkernel);
520  break;
521  case 7:
522  coerceValue(value, myWritebackkernelname);
523  break;
524  case 8:
525  coerceValue(value, myRecompile);
526  break;
527  case 9:
528  coerceValue(value, myRunOver);
529  break;
530  case 10:
531  coerceValue(value, myIterations);
532  break;
533  case 11:
534  coerceValue(value, myWorksets_begin);
535  break;
536  case 12:
537  coerceValue(value, myWorksets_length);
538  break;
539  case 13:
540  coerceValue(value, mySingleworkgroup);
541  break;
542  case 14:
543  coerceValue(value, myFinish);
544  break;
545  case 15:
546  coerceValue(value, myTime);
547  break;
548  case 16:
549  coerceValue(value, myTimeinc);
550  break;
551  case 17:
552  coerceValue(value, myTimescale);
553  break;
554  case 18:
555  coerceValue(value, myTimemethod);
556  break;
557  case 19:
558  coerceValue(value, myXnoise);
559  break;
560  case 20:
561  coerceValue(value, myPrecision);
562  break;
563  case 21:
564  if (idx.size() == 1)
565  coerceValue(value, myBindings.entries());
566  else if (instance[0] < myBindings.entries())
567  {
568  auto && _data = myBindings(instance[0]);
569  switch (idx[1])
570  {
571  case 0:
572  coerceValue(value, _data.bindings_name);
573  break;
574  case 1:
575  coerceValue(value, _data.bindings_type);
576  break;
577  case 2:
578  coerceValue(value, _data.bindings_intval);
579  break;
580  case 3:
581  coerceValue(value, _data.bindings_fval);
582  break;
583  case 4:
584  coerceValue(value, _data.bindings_v3val);
585  break;
586  case 5:
587  coerceValue(value, _data.bindings_v4val);
588  break;
589  case 6:
590  coerceValue(value, _data.bindings_timescale);
591  break;
592  case 7:
593  coerceValue(value, _data.bindings_ramp);
594  break;
595  case 8:
596  coerceValue(value, _data.bindings_rampsize);
597  break;
598  case 9:
599  coerceValue(value, _data.bindings_volume);
600  break;
601  case 10:
602  coerceValue(value, _data.bindings_forcealign);
603  break;
604  case 11:
605  coerceValue(value, _data.bindings_resolution);
606  break;
607  case 12:
608  coerceValue(value, _data.bindings_voxelsize);
609  break;
610  case 13:
611  coerceValue(value, _data.bindings_xformtoworld);
612  break;
613  case 14:
614  coerceValue(value, _data.bindings_xformtovoxel);
615  break;
616  case 15:
617  coerceValue(value, _data.bindings_attribute);
618  break;
619  case 16:
620  coerceValue(value, _data.bindings_attribclass);
621  break;
622  case 17:
623  coerceValue(value, _data.bindings_attribtype);
624  break;
625  case 18:
626  coerceValue(value, _data.bindings_attribsize);
627  break;
628  case 19:
629  coerceValue(value, _data.bindings_precision);
630  break;
631  case 20:
632  coerceValue(value, _data.bindings_readable);
633  break;
634  case 21:
635  coerceValue(value, _data.bindings_writeable);
636  break;
637  case 22:
638  coerceValue(value, _data.bindings_optional);
639  break;
640 
641  }
642  }
643  break;
644 
645  }
646  }
647 
648  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
649  { doGetParmValue(idx, instance, value); }
650  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
651  { doGetParmValue(idx, instance, value); }
652  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
653  { doGetParmValue(idx, instance, value); }
654  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
655  { doGetParmValue(idx, instance, value); }
656  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
657  { doGetParmValue(idx, instance, value); }
658  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
659  { doGetParmValue(idx, instance, value); }
660  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
661  { doGetParmValue(idx, instance, value); }
662  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
663  { doGetParmValue(idx, instance, value); }
664  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
665  { doGetParmValue(idx, instance, value); }
666  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
667  { doGetParmValue(idx, instance, value); }
668  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
669  { doGetParmValue(idx, instance, value); }
670 
671  template <typename T>
672  void
673  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
674  {
675  if (idx.size() < 1)
676  return;
677  UT_ASSERT(idx.size() == instance.size()+1);
678  if (idx.size() != instance.size()+1)
679  return;
680  switch (idx[0])
681  {
682  case 0:
683  coerceValue(myKernelname, value);
684  break;
685  case 1:
686  coerceValue(myUsecode, value);
687  break;
688  case 2:
689  coerceValue(myKernelfile, value);
690  break;
691  case 3:
692  coerceValue(myKernelcode, value);
693  break;
694  case 4:
695  coerceValue(myKerneloptions, value);
696  break;
697  case 5:
698  coerceValue(myKerneloptionattrib, value);
699  break;
700  case 6:
701  coerceValue(myUsewritebackkernel, value);
702  break;
703  case 7:
704  coerceValue(myWritebackkernelname, value);
705  break;
706  case 8:
707  coerceValue(myRecompile, value);
708  break;
709  case 9:
710  coerceValue(myRunOver, value);
711  break;
712  case 10:
713  coerceValue(myIterations, value);
714  break;
715  case 11:
716  coerceValue(myWorksets_begin, value);
717  break;
718  case 12:
719  coerceValue(myWorksets_length, value);
720  break;
721  case 13:
722  coerceValue(mySingleworkgroup, value);
723  break;
724  case 14:
725  coerceValue(myFinish, value);
726  break;
727  case 15:
728  coerceValue(myTime, value);
729  break;
730  case 16:
731  coerceValue(myTimeinc, value);
732  break;
733  case 17:
734  coerceValue(myTimescale, value);
735  break;
736  case 18:
737  coerceValue(myTimemethod, value);
738  break;
739  case 19:
740  coerceValue(myXnoise, value);
741  break;
742  case 20:
743  coerceValue(myPrecision, value);
744  break;
745  case 21:
746  if (idx.size() == 1)
747  {
748  exint newsize;
749  coerceValue(newsize, value);
750  myBindings.setSize(newsize);
751  }
752  else
753  {
754  myBindings.setSizeIfNeeded(instance[0]+1);
755  auto && _data = myBindings(instance[0]);
756  switch (idx[1])
757  {
758  case 0:
759  coerceValue(_data.bindings_name, value);
760  break;
761  case 1:
762  coerceValue(_data.bindings_type, value);
763  break;
764  case 2:
765  coerceValue(_data.bindings_intval, value);
766  break;
767  case 3:
768  coerceValue(_data.bindings_fval, value);
769  break;
770  case 4:
771  coerceValue(_data.bindings_v3val, value);
772  break;
773  case 5:
774  coerceValue(_data.bindings_v4val, value);
775  break;
776  case 6:
777  coerceValue(_data.bindings_timescale, value);
778  break;
779  case 7:
780  coerceValue(_data.bindings_ramp, value);
781  break;
782  case 8:
783  coerceValue(_data.bindings_rampsize, value);
784  break;
785  case 9:
786  coerceValue(_data.bindings_volume, value);
787  break;
788  case 10:
789  coerceValue(_data.bindings_forcealign, value);
790  break;
791  case 11:
792  coerceValue(_data.bindings_resolution, value);
793  break;
794  case 12:
795  coerceValue(_data.bindings_voxelsize, value);
796  break;
797  case 13:
798  coerceValue(_data.bindings_xformtoworld, value);
799  break;
800  case 14:
801  coerceValue(_data.bindings_xformtovoxel, value);
802  break;
803  case 15:
804  coerceValue(_data.bindings_attribute, value);
805  break;
806  case 16:
807  coerceValue(_data.bindings_attribclass, value);
808  break;
809  case 17:
810  coerceValue(_data.bindings_attribtype, value);
811  break;
812  case 18:
813  coerceValue(_data.bindings_attribsize, value);
814  break;
815  case 19:
816  coerceValue(_data.bindings_precision, value);
817  break;
818  case 20:
819  coerceValue(_data.bindings_readable, value);
820  break;
821  case 21:
822  coerceValue(_data.bindings_writeable, value);
823  break;
824  case 22:
825  coerceValue(_data.bindings_optional, value);
826  break;
827 
828  }
829  }
830  break;
831 
832  }
833  }
834 
835  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
836  { doSetParmValue(idx, instance, value); }
837  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
838  { doSetParmValue(idx, instance, value); }
839  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
840  { doSetParmValue(idx, instance, value); }
841  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
842  { doSetParmValue(idx, instance, value); }
843  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
844  { doSetParmValue(idx, instance, value); }
845  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
846  { doSetParmValue(idx, instance, value); }
847  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
848  { doSetParmValue(idx, instance, value); }
849  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
850  { doSetParmValue(idx, instance, value); }
851  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
852  { doSetParmValue(idx, instance, value); }
853  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
854  { doSetParmValue(idx, instance, value); }
855  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
856  { doSetParmValue(idx, instance, value); }
857 
858  exint getNestNumParms(TempIndex idx) const override
859  {
860  if (idx.size() == 0)
861  return 22;
862  switch (idx[0])
863  {
864  case 21:
865  return 23;
866 
867  }
868  // Invalid
869  return 0;
870  }
871 
872  const char *getNestParmName(TempIndex fieldnum) const override
873  {
874  if (fieldnum.size() < 1)
875  return 0;
876  switch (fieldnum[0])
877  {
878  case 0:
879  return "kernelname";
880  case 1:
881  return "usecode";
882  case 2:
883  return "kernelfile";
884  case 3:
885  return "kernelcode";
886  case 4:
887  return "kerneloptions";
888  case 5:
889  return "kerneloptionattrib";
890  case 6:
891  return "usewritebackkernel";
892  case 7:
893  return "writebackkernelname";
894  case 8:
895  return "recompile";
896  case 9:
897  return "runover";
898  case 10:
899  return "iterations";
900  case 11:
901  return "worksets_begin";
902  case 12:
903  return "worksets_length";
904  case 13:
905  return "singleworkgroup";
906  case 14:
907  return "finish";
908  case 15:
909  return "time";
910  case 16:
911  return "timeinc";
912  case 17:
913  return "timescale";
914  case 18:
915  return "timemethod";
916  case 19:
917  return "xnoise";
918  case 20:
919  return "precision";
920  case 21:
921  if (fieldnum.size() == 1)
922  return "bindings";
923  switch (fieldnum[1])
924  {
925  case 0:
926  return "bindings#_name";
927  case 1:
928  return "bindings#_type";
929  case 2:
930  return "bindings#_intval";
931  case 3:
932  return "bindings#_fval";
933  case 4:
934  return "bindings#_v3val";
935  case 5:
936  return "bindings#_v4val";
937  case 6:
938  return "bindings#_timescale";
939  case 7:
940  return "bindings#_ramp";
941  case 8:
942  return "bindings#_rampsize";
943  case 9:
944  return "bindings#_volume";
945  case 10:
946  return "bindings#_forcealign";
947  case 11:
948  return "bindings#_resolution";
949  case 12:
950  return "bindings#_voxelsize";
951  case 13:
952  return "bindings#_xformtoworld";
953  case 14:
954  return "bindings#_xformtovoxel";
955  case 15:
956  return "bindings#_attribute";
957  case 16:
958  return "bindings#_attribclass";
959  case 17:
960  return "bindings#_attribtype";
961  case 18:
962  return "bindings#_attribsize";
963  case 19:
964  return "bindings#_precision";
965  case 20:
966  return "bindings#_readable";
967  case 21:
968  return "bindings#_writeable";
969  case 22:
970  return "bindings#_optional";
971 
972  }
973  return 0;
974 
975  }
976  return 0;
977  }
978 
979  ParmType getNestParmType(TempIndex fieldnum) const override
980  {
981  if (fieldnum.size() < 1)
982  return PARM_UNSUPPORTED;
983  switch (fieldnum[0])
984  {
985  case 0:
986  return PARM_STRING;
987  case 1:
988  return PARM_INTEGER;
989  case 2:
990  return PARM_STRING;
991  case 3:
992  return PARM_STRING;
993  case 4:
994  return PARM_STRING;
995  case 5:
996  return PARM_STRING;
997  case 6:
998  return PARM_INTEGER;
999  case 7:
1000  return PARM_STRING;
1001  case 8:
1002  return PARM_INTEGER;
1003  case 9:
1004  return PARM_INTEGER;
1005  case 10:
1006  return PARM_INTEGER;
1007  case 11:
1008  return PARM_STRING;
1009  case 12:
1010  return PARM_STRING;
1011  case 13:
1012  return PARM_INTEGER;
1013  case 14:
1014  return PARM_INTEGER;
1015  case 15:
1016  return PARM_INTEGER;
1017  case 16:
1018  return PARM_INTEGER;
1019  case 17:
1020  return PARM_FLOAT;
1021  case 18:
1022  return PARM_INTEGER;
1023  case 19:
1024  return PARM_INTEGER;
1025  case 20:
1026  return PARM_INTEGER;
1027  case 21:
1028  if (fieldnum.size() == 1)
1029  return PARM_MULTIPARM;
1030  switch (fieldnum[1])
1031  {
1032  case 0:
1033  return PARM_STRING;
1034  case 1:
1035  return PARM_INTEGER;
1036  case 2:
1037  return PARM_INTEGER;
1038  case 3:
1039  return PARM_FLOAT;
1040  case 4:
1041  return PARM_VECTOR3;
1042  case 5:
1043  return PARM_VECTOR4;
1044  case 6:
1045  return PARM_INTEGER;
1046  case 7:
1047  return PARM_RAMP;
1048  case 8:
1049  return PARM_INTEGER;
1050  case 9:
1051  return PARM_STRING;
1052  case 10:
1053  return PARM_INTEGER;
1054  case 11:
1055  return PARM_INTEGER;
1056  case 12:
1057  return PARM_INTEGER;
1058  case 13:
1059  return PARM_INTEGER;
1060  case 14:
1061  return PARM_INTEGER;
1062  case 15:
1063  return PARM_STRING;
1064  case 16:
1065  return PARM_INTEGER;
1066  case 17:
1067  return PARM_INTEGER;
1068  case 18:
1069  return PARM_INTEGER;
1070  case 19:
1071  return PARM_INTEGER;
1072  case 20:
1073  return PARM_INTEGER;
1074  case 21:
1075  return PARM_INTEGER;
1076  case 22:
1077  return PARM_INTEGER;
1078 
1079  }
1080  return PARM_UNSUPPORTED;
1081 
1082  }
1083  return PARM_UNSUPPORTED;
1084  }
1085 
1086  // Boiler plate to load individual types.
1087  static void loadData(UT_IStream &is, int64 &v)
1088  { is.bread(&v, 1); }
1089  static void loadData(UT_IStream &is, bool &v)
1090  { int64 iv; is.bread(&iv, 1); v = iv; }
1091  static void loadData(UT_IStream &is, fpreal64 &v)
1092  { is.bread<fpreal64>(&v, 1); }
1093  static void loadData(UT_IStream &is, UT_Vector2D &v)
1094  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
1095  static void loadData(UT_IStream &is, UT_Vector3D &v)
1096  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
1097  is.bread<fpreal64>(&v.z(), 1); }
1098  static void loadData(UT_IStream &is, UT_Vector4D &v)
1099  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
1100  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
1101  static void loadData(UT_IStream &is, UT_Matrix2D &v)
1102  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
1103  static void loadData(UT_IStream &is, UT_Matrix3D &v)
1104  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
1105  static void loadData(UT_IStream &is, UT_Matrix4D &v)
1106  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
1107  static void loadData(UT_IStream &is, UT_Vector2I &v)
1108  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
1109  static void loadData(UT_IStream &is, UT_Vector3I &v)
1110  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
1111  is.bread<int64>(&v.z(), 1); }
1112  static void loadData(UT_IStream &is, UT_Vector4I &v)
1113  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
1114  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
1116  { is.bread(v); }
1118  { UT_StringHolder rampdata;
1119  loadData(is, rampdata);
1120  if (rampdata.isstring())
1121  {
1122  v.reset(new UT_Ramp());
1123  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
1124  v->load(istr);
1125  }
1126  else v.reset();
1127  }
1130  loadData(is, data);
1131  if (data.isstring())
1132  {
1133  // Find the data type.
1134  const char *colon = UT_StringWrap(data).findChar(':');
1135  if (colon)
1136  {
1137  int typelen = colon - data.buffer();
1139  type.strncpy(data.buffer(), typelen);
1140  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
1141 
1142  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
1143  }
1144  }
1145  else v.reset();
1146  }
1147 
1148  static void saveData(std::ostream &os, int64 v)
1149  { UTwrite(os, &v); }
1150  static void saveData(std::ostream &os, bool v)
1151  { int64 iv = v; UTwrite(os, &iv); }
1152  static void saveData(std::ostream &os, fpreal64 v)
1153  { UTwrite<fpreal64>(os, &v); }
1154  static void saveData(std::ostream &os, UT_Vector2D v)
1155  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
1156  static void saveData(std::ostream &os, UT_Vector3D v)
1157  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
1158  UTwrite<fpreal64>(os, &v.z()); }
1159  static void saveData(std::ostream &os, UT_Vector4D v)
1160  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
1161  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
1162  static void saveData(std::ostream &os, UT_Matrix2D v)
1164  static void saveData(std::ostream &os, UT_Matrix3D v)
1166  static void saveData(std::ostream &os, UT_Matrix4D v)
1168  static void saveData(std::ostream &os, UT_StringHolder s)
1169  { UT_StringWrap(s).saveBinary(os); }
1170  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
1172  UT_OStringStream ostr;
1173  if (s) s->save(ostr);
1174  result = ostr.str();
1175  saveData(os, result);
1176  }
1177  static void saveData(std::ostream &os, PRM_DataItemHandle s)
1179  UT_OStringStream ostr;
1180  if (s)
1181  {
1182  ostr << s->getDataTypeToken();
1183  ostr << ":";
1184  s->saveBinary(ostr);
1185  }
1186  result = ostr.str();
1187  saveData(os, result);
1188  }
1189 
1190 
1191  void save(std::ostream &os) const
1192  {
1193  int32 v = version();
1194  UTwrite(os, &v);
1195  saveData(os, myKernelname);
1196  saveData(os, myUsecode);
1197  saveData(os, myKernelfile);
1198  saveData(os, myKernelcode);
1199  saveData(os, myKerneloptions);
1200  saveData(os, myKerneloptionattrib);
1201  saveData(os, myUsewritebackkernel);
1202  saveData(os, myWritebackkernelname);
1203  saveData(os, myRecompile);
1204  saveData(os, myRunOver);
1205  saveData(os, myIterations);
1206  saveData(os, myWorksets_begin);
1207  saveData(os, myWorksets_length);
1208  saveData(os, mySingleworkgroup);
1209  saveData(os, myFinish);
1210  saveData(os, myTime);
1211  saveData(os, myTimeinc);
1212  saveData(os, myTimescale);
1213  saveData(os, myTimemethod);
1214  saveData(os, myXnoise);
1215  saveData(os, myPrecision);
1216  {
1217  int64 length = myBindings.entries();
1218  UTwrite(os, &length);
1219  for (exint i = 0; i < length; i++)
1220  {
1221  saveData(os, myBindings(i).bindings_name);
1222  saveData(os, myBindings(i).bindings_type);
1223  saveData(os, myBindings(i).bindings_intval);
1224  saveData(os, myBindings(i).bindings_fval);
1225  saveData(os, myBindings(i).bindings_v3val);
1226  saveData(os, myBindings(i).bindings_v4val);
1227  saveData(os, myBindings(i).bindings_timescale);
1228  saveData(os, myBindings(i).bindings_ramp);
1229  saveData(os, myBindings(i).bindings_rampsize);
1230  saveData(os, myBindings(i).bindings_volume);
1231  saveData(os, myBindings(i).bindings_forcealign);
1232  saveData(os, myBindings(i).bindings_resolution);
1233  saveData(os, myBindings(i).bindings_voxelsize);
1234  saveData(os, myBindings(i).bindings_xformtoworld);
1235  saveData(os, myBindings(i).bindings_xformtovoxel);
1236  saveData(os, myBindings(i).bindings_attribute);
1237  saveData(os, myBindings(i).bindings_attribclass);
1238  saveData(os, myBindings(i).bindings_attribtype);
1239  saveData(os, myBindings(i).bindings_attribsize);
1240  saveData(os, myBindings(i).bindings_precision);
1241  saveData(os, myBindings(i).bindings_readable);
1242  saveData(os, myBindings(i).bindings_writeable);
1243  saveData(os, myBindings(i).bindings_optional);
1244 
1245  }
1246  }
1247 
1248  }
1249 
1250  bool load(UT_IStream &is)
1251  {
1252  int32 v;
1253  is.bread(&v, 1);
1254  if (version() != v)
1255  {
1256  // Fail incompatible versions
1257  return false;
1258  }
1259  loadData(is, myKernelname);
1260  loadData(is, myUsecode);
1261  loadData(is, myKernelfile);
1262  loadData(is, myKernelcode);
1263  loadData(is, myKerneloptions);
1264  loadData(is, myKerneloptionattrib);
1265  loadData(is, myUsewritebackkernel);
1266  loadData(is, myWritebackkernelname);
1267  loadData(is, myRecompile);
1268  loadData(is, myRunOver);
1269  loadData(is, myIterations);
1270  loadData(is, myWorksets_begin);
1271  loadData(is, myWorksets_length);
1272  loadData(is, mySingleworkgroup);
1273  loadData(is, myFinish);
1274  loadData(is, myTime);
1275  loadData(is, myTimeinc);
1276  loadData(is, myTimescale);
1277  loadData(is, myTimemethod);
1278  loadData(is, myXnoise);
1279  loadData(is, myPrecision);
1280  {
1281  int64 length;
1282  is.read(&length, 1);
1283  myBindings.entries(length);
1284  for (exint i = 0; i < length; i++)
1285  {
1286  loadData(is, myBindings(i).bindings_name);
1287  loadData(is, myBindings(i).bindings_type);
1288  loadData(is, myBindings(i).bindings_intval);
1289  loadData(is, myBindings(i).bindings_fval);
1290  loadData(is, myBindings(i).bindings_v3val);
1291  loadData(is, myBindings(i).bindings_v4val);
1292  loadData(is, myBindings(i).bindings_timescale);
1293  loadData(is, myBindings(i).bindings_ramp);
1294  loadData(is, myBindings(i).bindings_rampsize);
1295  loadData(is, myBindings(i).bindings_volume);
1296  loadData(is, myBindings(i).bindings_forcealign);
1297  loadData(is, myBindings(i).bindings_resolution);
1298  loadData(is, myBindings(i).bindings_voxelsize);
1299  loadData(is, myBindings(i).bindings_xformtoworld);
1300  loadData(is, myBindings(i).bindings_xformtovoxel);
1301  loadData(is, myBindings(i).bindings_attribute);
1302  loadData(is, myBindings(i).bindings_attribclass);
1303  loadData(is, myBindings(i).bindings_attribtype);
1304  loadData(is, myBindings(i).bindings_attribsize);
1305  loadData(is, myBindings(i).bindings_precision);
1306  loadData(is, myBindings(i).bindings_readable);
1307  loadData(is, myBindings(i).bindings_writeable);
1308  loadData(is, myBindings(i).bindings_optional);
1309 
1310  }
1311  }
1312 
1313  return true;
1314  }
1315 
1316  const UT_StringHolder & getKernelname() const { return myKernelname; }
1317  void setKernelname(const UT_StringHolder & val) { myKernelname = val; }
1319  {
1320  SOP_Node *thissop = cookparms.getNode();
1321  if (!thissop) return getKernelname();
1323  OP_Utils::evalOpParm(result, thissop, "kernelname", cookparms.getCookTime(), 0);
1324  return result;
1325  }
1326  bool getUsecode() const { return myUsecode; }
1327  void setUsecode(bool val) { myUsecode = val; }
1328  bool opUsecode(const SOP_NodeVerb::CookParms &cookparms) const
1329  {
1330  SOP_Node *thissop = cookparms.getNode();
1331  if (!thissop) return getUsecode();
1332  bool result;
1333  OP_Utils::evalOpParm(result, thissop, "usecode", cookparms.getCookTime(), 0);
1334  return result;
1335  }
1336  const UT_StringHolder & getKernelfile() const { return myKernelfile; }
1337  void setKernelfile(const UT_StringHolder & val) { myKernelfile = val; }
1339  {
1340  SOP_Node *thissop = cookparms.getNode();
1341  if (!thissop) return getKernelfile();
1343  OP_Utils::evalOpParm(result, thissop, "kernelfile", cookparms.getCookTime(), 0);
1344  return result;
1345  }
1346  const UT_StringHolder & getKernelcode() const { return myKernelcode; }
1347  void setKernelcode(const UT_StringHolder & val) { myKernelcode = val; }
1349  {
1350  SOP_Node *thissop = cookparms.getNode();
1351  if (!thissop) return getKernelcode();
1353  OP_Utils::evalOpParm(result, thissop, "kernelcode", cookparms.getCookTime(), 0);
1354  return result;
1355  }
1356  const UT_StringHolder & getKerneloptions() const { return myKerneloptions; }
1357  void setKerneloptions(const UT_StringHolder & val) { myKerneloptions = val; }
1359  {
1360  SOP_Node *thissop = cookparms.getNode();
1361  if (!thissop) return getKerneloptions();
1363  OP_Utils::evalOpParm(result, thissop, "kerneloptions", cookparms.getCookTime(), 0);
1364  return result;
1365  }
1366  const UT_StringHolder & getKerneloptionattrib() const { return myKerneloptionattrib; }
1367  void setKerneloptionattrib(const UT_StringHolder & val) { myKerneloptionattrib = val; }
1369  {
1370  SOP_Node *thissop = cookparms.getNode();
1371  if (!thissop) return getKerneloptionattrib();
1373  OP_Utils::evalOpParm(result, thissop, "kerneloptionattrib", cookparms.getCookTime(), 0);
1374  return result;
1375  }
1376  bool getUsewritebackkernel() const { return myUsewritebackkernel; }
1377  void setUsewritebackkernel(bool val) { myUsewritebackkernel = val; }
1378  bool opUsewritebackkernel(const SOP_NodeVerb::CookParms &cookparms) const
1379  {
1380  SOP_Node *thissop = cookparms.getNode();
1381  if (!thissop) return getUsewritebackkernel();
1382  bool result;
1383  OP_Utils::evalOpParm(result, thissop, "usewritebackkernel", cookparms.getCookTime(), 0);
1384  return result;
1385  }
1386  const UT_StringHolder & getWritebackkernelname() const { return myWritebackkernelname; }
1387  void setWritebackkernelname(const UT_StringHolder & val) { myWritebackkernelname = val; }
1389  {
1390  SOP_Node *thissop = cookparms.getNode();
1391  if (!thissop) return getWritebackkernelname();
1393  OP_Utils::evalOpParm(result, thissop, "writebackkernelname", cookparms.getCookTime(), 0);
1394  return result;
1395  }
1396  bool getRecompile() const { return myRecompile; }
1397  void setRecompile(bool val) { myRecompile = val; }
1398  bool opRecompile(const SOP_NodeVerb::CookParms &cookparms) const
1399  {
1400  SOP_Node *thissop = cookparms.getNode();
1401  if (!thissop) return getRecompile();
1402  bool result;
1403  OP_Utils::evalOpParm(result, thissop, "recompile", cookparms.getCookTime(), 0);
1404  return result;
1405  }
1406  RunOver getRunOver() const { return RunOver(myRunOver); }
1407  void setRunOver(RunOver val) { myRunOver = int64(val); }
1409  {
1410  SOP_Node *thissop = cookparms.getNode();
1411  if (!thissop) return getRunOver();
1412  int64 result;
1413  OP_Utils::evalOpParm(result, thissop, "runover", cookparms.getCookTime(), 0);
1414  return RunOver(result);
1415  }
1416  int64 getIterations() const { return myIterations; }
1417  void setIterations(int64 val) { myIterations = val; }
1419  {
1420  SOP_Node *thissop = cookparms.getNode();
1421  if (!thissop) return getIterations();
1422  int64 result;
1423  OP_Utils::evalOpParm(result, thissop, "iterations", cookparms.getCookTime(), 0);
1424  return result;
1425  }
1426  const UT_StringHolder & getWorksets_begin() const { return myWorksets_begin; }
1427  void setWorksets_begin(const UT_StringHolder & val) { myWorksets_begin = val; }
1429  {
1430  SOP_Node *thissop = cookparms.getNode();
1431  if (!thissop) return getWorksets_begin();
1433  OP_Utils::evalOpParm(result, thissop, "worksets_begin", cookparms.getCookTime(), 0);
1434  return result;
1435  }
1436  const UT_StringHolder & getWorksets_length() const { return myWorksets_length; }
1437  void setWorksets_length(const UT_StringHolder & val) { myWorksets_length = val; }
1439  {
1440  SOP_Node *thissop = cookparms.getNode();
1441  if (!thissop) return getWorksets_length();
1443  OP_Utils::evalOpParm(result, thissop, "worksets_length", cookparms.getCookTime(), 0);
1444  return result;
1445  }
1446  bool getSingleworkgroup() const { return mySingleworkgroup; }
1447  void setSingleworkgroup(bool val) { mySingleworkgroup = val; }
1448  bool opSingleworkgroup(const SOP_NodeVerb::CookParms &cookparms) const
1449  {
1450  SOP_Node *thissop = cookparms.getNode();
1451  if (!thissop) return getSingleworkgroup();
1452  bool result;
1453  OP_Utils::evalOpParm(result, thissop, "singleworkgroup", cookparms.getCookTime(), 0);
1454  return result;
1455  }
1456  bool getFinish() const { return myFinish; }
1457  void setFinish(bool val) { myFinish = val; }
1458  bool opFinish(const SOP_NodeVerb::CookParms &cookparms) const
1459  {
1460  SOP_Node *thissop = cookparms.getNode();
1461  if (!thissop) return getFinish();
1462  bool result;
1463  OP_Utils::evalOpParm(result, thissop, "finish", cookparms.getCookTime(), 0);
1464  return result;
1465  }
1466  bool getTime() const { return myTime; }
1467  void setTime(bool val) { myTime = val; }
1468  bool opTime(const SOP_NodeVerb::CookParms &cookparms) const
1469  {
1470  SOP_Node *thissop = cookparms.getNode();
1471  if (!thissop) return getTime();
1472  bool result;
1473  OP_Utils::evalOpParm(result, thissop, "time", cookparms.getCookTime(), 0);
1474  return result;
1475  }
1476  bool getTimeinc() const { return myTimeinc; }
1477  void setTimeinc(bool val) { myTimeinc = val; }
1478  bool opTimeinc(const SOP_NodeVerb::CookParms &cookparms) const
1479  {
1480  SOP_Node *thissop = cookparms.getNode();
1481  if (!thissop) return getTimeinc();
1482  bool result;
1483  OP_Utils::evalOpParm(result, thissop, "timeinc", cookparms.getCookTime(), 0);
1484  return result;
1485  }
1486  fpreal64 getTimescale() const { return myTimescale; }
1487  void setTimescale(fpreal64 val) { myTimescale = val; }
1489  {
1490  SOP_Node *thissop = cookparms.getNode();
1491  if (!thissop) return getTimescale();
1492  fpreal64 result;
1493  OP_Utils::evalOpParm(result, thissop, "timescale", cookparms.getCookTime(), 0);
1494  return result;
1495  }
1496  Timemethod getTimemethod() const { return Timemethod(myTimemethod); }
1497  void setTimemethod(Timemethod val) { myTimemethod = int64(val); }
1499  {
1500  SOP_Node *thissop = cookparms.getNode();
1501  if (!thissop) return getTimemethod();
1502  int64 result;
1503  OP_Utils::evalOpParm(result, thissop, "timemethod", cookparms.getCookTime(), 0);
1504  return Timemethod(result);
1505  }
1506  bool getXnoise() const { return myXnoise; }
1507  void setXnoise(bool val) { myXnoise = val; }
1508  bool opXnoise(const SOP_NodeVerb::CookParms &cookparms) const
1509  {
1510  SOP_Node *thissop = cookparms.getNode();
1511  if (!thissop) return getXnoise();
1512  bool result;
1513  OP_Utils::evalOpParm(result, thissop, "xnoise", cookparms.getCookTime(), 0);
1514  return result;
1515  }
1516  Precision getPrecision() const { return Precision(myPrecision); }
1517  void setPrecision(Precision val) { myPrecision = int64(val); }
1519  {
1520  SOP_Node *thissop = cookparms.getNode();
1521  if (!thissop) return getPrecision();
1522  int64 result;
1523  OP_Utils::evalOpParm(result, thissop, "precision", cookparms.getCookTime(), 0);
1524  return Precision(result);
1525  }
1526  const UT_Array<Bindings> &getBindings() const { return myBindings; }
1527  void setBindings(const UT_Array<Bindings> &val) { myBindings = val; }
1528  exint opBindings(const SOP_NodeVerb::CookParms &cookparms) const
1529  {
1530  SOP_Node *thissop = cookparms.getNode();
1531  if (!thissop) return getBindings().entries();
1532  exint result;
1533  OP_Utils::evalOpParm(result, thissop, "bindings", cookparms.getCookTime(), 0);
1534  return result;
1535  }
1537  {
1538  SOP_Node *thissop = cookparms.getNode();
1539  if (!thissop) return (myBindings(_idx).bindings_name);
1540  int _parmidx = _idx + 1;
1542  OP_Utils::evalOpParmInst(result, thissop, "bindings#_name", &_parmidx, cookparms.getCookTime(), 0);
1543  return (result);
1544  }
1546  {
1547  SOP_Node *thissop = cookparms.getNode();
1548  if (!thissop) return (myBindings(_idx).bindings_type);
1549  int _parmidx = _idx + 1;
1550  int64 result;
1551  OP_Utils::evalOpParmInst(result, thissop, "bindings#_type", &_parmidx, cookparms.getCookTime(), 0);
1552  return (result);
1553  }
1555  {
1556  SOP_Node *thissop = cookparms.getNode();
1557  if (!thissop) return (myBindings(_idx).bindings_intval);
1558  int _parmidx = _idx + 1;
1559  int64 result;
1560  OP_Utils::evalOpParmInst(result, thissop, "bindings#_intval", &_parmidx, cookparms.getCookTime(), 0);
1561  return (result);
1562  }
1564  {
1565  SOP_Node *thissop = cookparms.getNode();
1566  if (!thissop) return (myBindings(_idx).bindings_fval);
1567  int _parmidx = _idx + 1;
1568  fpreal64 result;
1569  OP_Utils::evalOpParmInst(result, thissop, "bindings#_fval", &_parmidx, cookparms.getCookTime(), 0);
1570  return (result);
1571  }
1573  {
1574  SOP_Node *thissop = cookparms.getNode();
1575  if (!thissop) return (myBindings(_idx).bindings_v3val);
1576  int _parmidx = _idx + 1;
1578  OP_Utils::evalOpParmInst(result, thissop, "bindings#_v3val", &_parmidx, cookparms.getCookTime(), 0);
1579  return (result);
1580  }
1582  {
1583  SOP_Node *thissop = cookparms.getNode();
1584  if (!thissop) return (myBindings(_idx).bindings_v4val);
1585  int _parmidx = _idx + 1;
1587  OP_Utils::evalOpParmInst(result, thissop, "bindings#_v4val", &_parmidx, cookparms.getCookTime(), 0);
1588  return (result);
1589  }
1591  {
1592  SOP_Node *thissop = cookparms.getNode();
1593  if (!thissop) return (myBindings(_idx).bindings_timescale);
1594  int _parmidx = _idx + 1;
1595  int64 result;
1596  OP_Utils::evalOpParmInst(result, thissop, "bindings#_timescale", &_parmidx, cookparms.getCookTime(), 0);
1597  return (result);
1598  }
1600  {
1601  SOP_Node *thissop = cookparms.getNode();
1602  if (!thissop) return (myBindings(_idx).bindings_ramp);
1603  int _parmidx = _idx + 1;
1605  OP_Utils::evalOpParmInst(result, thissop, "bindings#_ramp", &_parmidx, cookparms.getCookTime(), 0);
1606  return (result);
1607  }
1609  {
1610  SOP_Node *thissop = cookparms.getNode();
1611  if (!thissop) return (myBindings(_idx).bindings_rampsize);
1612  int _parmidx = _idx + 1;
1613  int64 result;
1614  OP_Utils::evalOpParmInst(result, thissop, "bindings#_rampsize", &_parmidx, cookparms.getCookTime(), 0);
1615  return (result);
1616  }
1618  {
1619  SOP_Node *thissop = cookparms.getNode();
1620  if (!thissop) return (myBindings(_idx).bindings_volume);
1621  int _parmidx = _idx + 1;
1623  OP_Utils::evalOpParmInst(result, thissop, "bindings#_volume", &_parmidx, cookparms.getCookTime(), 0);
1624  return (result);
1625  }
1627  {
1628  SOP_Node *thissop = cookparms.getNode();
1629  if (!thissop) return (myBindings(_idx).bindings_forcealign);
1630  int _parmidx = _idx + 1;
1631  bool result;
1632  OP_Utils::evalOpParmInst(result, thissop, "bindings#_forcealign", &_parmidx, cookparms.getCookTime(), 0);
1633  return (result);
1634  }
1636  {
1637  SOP_Node *thissop = cookparms.getNode();
1638  if (!thissop) return (myBindings(_idx).bindings_resolution);
1639  int _parmidx = _idx + 1;
1640  bool result;
1641  OP_Utils::evalOpParmInst(result, thissop, "bindings#_resolution", &_parmidx, cookparms.getCookTime(), 0);
1642  return (result);
1643  }
1645  {
1646  SOP_Node *thissop = cookparms.getNode();
1647  if (!thissop) return (myBindings(_idx).bindings_voxelsize);
1648  int _parmidx = _idx + 1;
1649  bool result;
1650  OP_Utils::evalOpParmInst(result, thissop, "bindings#_voxelsize", &_parmidx, cookparms.getCookTime(), 0);
1651  return (result);
1652  }
1654  {
1655  SOP_Node *thissop = cookparms.getNode();
1656  if (!thissop) return (myBindings(_idx).bindings_xformtoworld);
1657  int _parmidx = _idx + 1;
1658  bool result;
1659  OP_Utils::evalOpParmInst(result, thissop, "bindings#_xformtoworld", &_parmidx, cookparms.getCookTime(), 0);
1660  return (result);
1661  }
1663  {
1664  SOP_Node *thissop = cookparms.getNode();
1665  if (!thissop) return (myBindings(_idx).bindings_xformtovoxel);
1666  int _parmidx = _idx + 1;
1667  bool result;
1668  OP_Utils::evalOpParmInst(result, thissop, "bindings#_xformtovoxel", &_parmidx, cookparms.getCookTime(), 0);
1669  return (result);
1670  }
1672  {
1673  SOP_Node *thissop = cookparms.getNode();
1674  if (!thissop) return (myBindings(_idx).bindings_attribute);
1675  int _parmidx = _idx + 1;
1677  OP_Utils::evalOpParmInst(result, thissop, "bindings#_attribute", &_parmidx, cookparms.getCookTime(), 0);
1678  return (result);
1679  }
1681  {
1682  SOP_Node *thissop = cookparms.getNode();
1683  if (!thissop) return (myBindings(_idx).bindings_attribclass);
1684  int _parmidx = _idx + 1;
1685  int64 result;
1686  OP_Utils::evalOpParmInst(result, thissop, "bindings#_attribclass", &_parmidx, cookparms.getCookTime(), 0);
1687  return (result);
1688  }
1690  {
1691  SOP_Node *thissop = cookparms.getNode();
1692  if (!thissop) return (myBindings(_idx).bindings_attribtype);
1693  int _parmidx = _idx + 1;
1694  int64 result;
1695  OP_Utils::evalOpParmInst(result, thissop, "bindings#_attribtype", &_parmidx, cookparms.getCookTime(), 0);
1696  return (result);
1697  }
1699  {
1700  SOP_Node *thissop = cookparms.getNode();
1701  if (!thissop) return (myBindings(_idx).bindings_attribsize);
1702  int _parmidx = _idx + 1;
1703  int64 result;
1704  OP_Utils::evalOpParmInst(result, thissop, "bindings#_attribsize", &_parmidx, cookparms.getCookTime(), 0);
1705  return (result);
1706  }
1708  {
1709  SOP_Node *thissop = cookparms.getNode();
1710  if (!thissop) return (myBindings(_idx).bindings_precision);
1711  int _parmidx = _idx + 1;
1712  int64 result;
1713  OP_Utils::evalOpParmInst(result, thissop, "bindings#_precision", &_parmidx, cookparms.getCookTime(), 0);
1714  return (result);
1715  }
1717  {
1718  SOP_Node *thissop = cookparms.getNode();
1719  if (!thissop) return (myBindings(_idx).bindings_readable);
1720  int _parmidx = _idx + 1;
1721  bool result;
1722  OP_Utils::evalOpParmInst(result, thissop, "bindings#_readable", &_parmidx, cookparms.getCookTime(), 0);
1723  return (result);
1724  }
1726  {
1727  SOP_Node *thissop = cookparms.getNode();
1728  if (!thissop) return (myBindings(_idx).bindings_writeable);
1729  int _parmidx = _idx + 1;
1730  bool result;
1731  OP_Utils::evalOpParmInst(result, thissop, "bindings#_writeable", &_parmidx, cookparms.getCookTime(), 0);
1732  return (result);
1733  }
1735  {
1736  SOP_Node *thissop = cookparms.getNode();
1737  if (!thissop) return (myBindings(_idx).bindings_optional);
1738  int _parmidx = _idx + 1;
1739  bool result;
1740  OP_Utils::evalOpParmInst(result, thissop, "bindings#_optional", &_parmidx, cookparms.getCookTime(), 0);
1741  return (result);
1742  }
1743 
1744 
1745 private:
1746  UT_StringHolder myKernelname;
1747  bool myUsecode;
1748  UT_StringHolder myKernelfile;
1749  UT_StringHolder myKernelcode;
1750  UT_StringHolder myKerneloptions;
1751  UT_StringHolder myKerneloptionattrib;
1752  bool myUsewritebackkernel;
1753  UT_StringHolder myWritebackkernelname;
1754  bool myRecompile;
1755  int64 myRunOver;
1756  int64 myIterations;
1757  UT_StringHolder myWorksets_begin;
1758  UT_StringHolder myWorksets_length;
1759  bool mySingleworkgroup;
1760  bool myFinish;
1761  bool myTime;
1762  bool myTimeinc;
1763  fpreal64 myTimescale;
1764  int64 myTimemethod;
1765  bool myXnoise;
1766  int64 myPrecision;
1767  UT_Array<Bindings> myBindings;
1768 
1769 };
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)
GLdouble s
Definition: glew.h:1390
bool getRecompile() const
UT_StringHolder opKerneloptionattrib(const SOP_NodeVerb::CookParms &cookparms) const
bool opXnoise(const SOP_NodeVerb::CookParms &cookparms) const
int64 opBindings_bindings_type(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
bool opBindings_bindings_forcealign(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
static void loadData(UT_IStream &is, UT_Vector3D &v)
UT_StringHolder opKernelname(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
exint nodeIdx() const
Definition: SOP_NodeVerb.h:114
bool opBindings_bindings_readable(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
void buildFromOp(const SOP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
GLenum src
Definition: glew.h:2410
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:640
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
bool opBindings_bindings_xformtoworld(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
int64 opBindings_bindings_intval(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
void setKernelname(const UT_StringHolder &val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
UT_StringHolder opKerneloptions(const SOP_NodeVerb::CookParms &cookparms) const
void setWorksets_begin(const UT_StringHolder &val)
virtual void evalOpParmInst(int64 &v, NodeIdx node, const char *parmname, int *inst, fpreal time, DEP_MicroNode *depnode) const =0
Timemethod opTimemethod(const SOP_NodeVerb::CookParms &cookparms) const
exint bread(int32 *buffer, exint asize=1)
GT_API const UT_StringHolder time
fpreal getTime() const
Definition: OP_Context.h:60
static void saveData(std::ostream &os, int64 v)
bool opBindings_bindings_writeable(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
void setTimemethod(Timemethod val)
UT_StringHolder opKernelcode(const SOP_NodeVerb::CookParms &cookparms) const
GLuint const GLfloat * val
Definition: glew.h:2794
static void loadData(UT_IStream &is, UT_Vector4D &v)
ParmType getNestParmType(TempIndex fieldnum) const override
const UT_StringHolder & getKernelname() const
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_precision(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
UT_String makeQuotedString(char delimiter='\'', bool escape_nonprinting=false) const
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
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
const SOP_GraphProxy * graph() const
Definition: SOP_NodeVerb.h:113
bool opFinish(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix4D &v)
int64 opBindings_bindings_timescale(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
fpreal64 opTimescale(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opWorksets_length(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getKernelfile() 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 GLdouble * v
Definition: glew.h:1391
int64 getIterations() const
static void saveData(std::ostream &os, UT_Vector2D v)
void setUsewritebackkernel(bool val)
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
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)
const UT_StringHolder & getKerneloptionattrib() const
void save(std::ostream &os) const
bool opUsewritebackkernel(const SOP_NodeVerb::CookParms &cookparms) const
UT_Vector4D opBindings_bindings_v4val(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
void setTimescale(fpreal64 val)
const UT_StringHolder & getWorksets_begin() const
double fpreal64
Definition: SYS_Types.h:201
bool opBindings_bindings_optional(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
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
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
void setXnoise(bool val)
bool opTimeinc(const SOP_NodeVerb::CookParms &cookparms) const
exint opBindings(const SOP_NodeVerb::CookParms &cookparms) const
typedef INT(WINAPI *PFNWGLGETGPUINFOAMDPROC)(UINT id
bool opTime(const SOP_NodeVerb::CookParms &cookparms) const
void setUsecode(bool val)
static void saveData(std::ostream &os, PRM_DataItemHandle s)
void setKerneloptions(const UT_StringHolder &val)
SYS_FORCE_INLINE T & y()
Definition: UT_Vector3.h:513
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
exint length() const
static void saveData(std::ostream &os, UT_Vector4D v)
UT_SharedPtr< UT_Ramp > bindings_ramp
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:28
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
GLint GLenum GLsizei GLint GLsizei const void * data
Definition: glew.h:1379
UT_StringHolder opKernelfile(const SOP_NodeVerb::CookParms &cookparms) const
Precision getPrecision() const
bool getTime() const
fpreal64 opBindings_bindings_fval(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
void setWorksets_length(const UT_StringHolder &val)
exint read(bool *array, exint sz=1)
Definition: UT_IStream.h:284
bool opUsecode(const SOP_NodeVerb::CookParms &cookparms) const
int64 opBindings_bindings_attribclass(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
int64 opBindings_bindings_attribsize(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
bool getUsecode() const
SYS_FORCE_INLINE T & z()
Definition: UT_Vector3.h:515
bool opBindings_bindings_resolution(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
void setPrecision(Precision val)
static void saveData(std::ostream &os, UT_StringHolder s)
static void loadData(UT_IStream &is, UT_Vector2I &v)
void loadFromOpSubclass(const LoadParms &loadparms) override
const UT_StringHolder & getKerneloptions() const
void
Definition: png.h:1083
UT_StringHolder bindings_name
const GLfloat * c
Definition: glew.h:16296
GLuint GLsizei GLsizei * length
Definition: glew.h:1825
static void saveData(std::ostream &os, UT_Vector3D v)
bool getSingleworkgroup() const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
void setKerneloptionattrib(const UT_StringHolder &val)
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
static void loadData(UT_IStream &is, int64 &v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
bool opSingleworkgroup(const SOP_NodeVerb::CookParms &cookparms) const
void setKernelcode(const UT_StringHolder &val)
const UT_StringHolder & getKernelcode() const
exint getNestNumParms(TempIndex idx) const override
void setTimeinc(bool val)
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:294
UT_StringHolder createString(const UT_Array< Bindings > &list) const
GT_API const UT_StringHolder version
DEP_MicroNode * depnode() const
Definition: SOP_NodeVerb.h:121
exint entries() const
Alias of size(). size() is preferred.
Definition: UT_Array.h:460
UT_StringHolder bindings_attribute
UT_StringHolder opWritebackkernelname(const SOP_NodeVerb::CookParms &cookparms) const
bool getXnoise() const
bool operator==(const SOP_OpenCLParms &src) const
bool operator==(const Bindings &src) const
bool getTimeinc() const
const UT_StringHolder & getWritebackkernelname() 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
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
void setKernelfile(const UT_StringHolder &val)
void setFinish(bool val)
static void loadData(UT_IStream &is, fpreal64 &v)
void setRunOver(RunOver val)
static int version()
UT_StringHolder opBindings_bindings_attribute(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
void setSingleworkgroup(bool val)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
bool getFinish() const
bool opRecompile(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 fpreal
Definition: SYS_Types.h:277
Timemethod getTimemethod() const
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
int64 opBindings_bindings_rampsize(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
bool load(UT_IStream &is)
bool opBindings_bindings_voxelsize(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
SYS_FORCE_INLINE void append(char character)
GLdouble GLdouble GLdouble r
Definition: glew.h:1406
void setBindings(const UT_Array< Bindings > &val)
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 opIterations(const SOP_NodeVerb::CookParms &cookparms) const
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
Precision opPrecision(const SOP_NodeVerb::CookParms &cookparms) const
UT_SharedPtr< UT_Ramp > opBindings_bindings_ramp(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
SYS_FORCE_INLINE T & x()
Definition: UT_Vector3.h:511
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:654
void copyFrom(const SOP_NodeParms *src) override
GLuint64EXT * result
Definition: glew.h:14007
bool operator!=(const SOP_OpenCLParms &src) const
bool getUsewritebackkernel() const
static void saveData(std::ostream &os, bool v)
const char * findChar(int c) const
Definition: UT_String.h:1367
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:135
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
UT_Vector3D opBindings_bindings_v3val(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
UT_StringHolder opBindings_bindings_volume(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
static void saveData(std::ostream &os, UT_Matrix4D v)
UT_Vector4T< fpreal64 > UT_Vector4D
void setWritebackkernelname(const UT_StringHolder &val)
GLenum GLuint GLsizei const GLchar * buf
Definition: glew.h:2580
~SOP_OpenCLParms() override
static void loadData(UT_IStream &is, UT_Matrix2D &v)
int64 opBindings_bindings_attribtype(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
GLsizei const GLfloat * value
Definition: glew.h:1849
const OP_Context & context() const
Definition: SOP_NodeVerb.h:119
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:89
bool opBindings_bindings_xformtovoxel(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
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)
type
Definition: core.h:528
RunOver opRunOver(const SOP_NodeVerb::CookParms &cookparms) const
UT_StringHolder opBindings_bindings_name(const SOP_NodeVerb::CookParms &cookparms, exint _idx) const
static void loadData(UT_IStream &is, UT_StringHolder &v)