HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GAS_OpenCLParms.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 
7 #include <OP/OP_Utils.h>
8 #include <PRM/PRM_Parm.h>
9 #include <UT/UT_IStream.h>
10 #include <UT/UT_NTStreamUtil.h>
11 #include <UT/UT_Ramp.h>
12 #include <UT/UT_SharedPtr.h>
13 #include <UT/UT_StringHolder.h>
14 #include <UT/UT_StringStream.h>
15 #include <UT/UT_VectorTypes.h>
16 #include <SYS/SYS_Types.h>
17 
18 using namespace UT::Literal;
19 
20 class DEP_MicroNode;
21 
23 {
24 public:
25  static int version() { return 3; }
26  struct Bindings
27  {
44  bool readable;
45  bool writeable;
46  bool optional;
47 
48 
50  {
51  name = ""_sh;
52  type = 0;
53  intval = 0;
54  fval = 0;
55  v3val = 0;
56  v4val = 0;
57  timescale = 0;
58  fieldname = ""_sh;
59  fieldoffsets = false;
60  ramp = UT_SharedPtr<UT_Ramp>(0);
61  rampsize = 0;
62  geometry = ""_sh;
63  attribute = ""_sh;
64  attribclass = 0;
65  attribtype = 0;
66  attribsize = 0;
67  readable = false;
68  writeable = false;
69  optional = false;
70 
71  }
72 
73  bool operator==(const Bindings &src) const
74  {
75  if (name != src.name) return false;
76  if (type != src.type) return false;
77  if (intval != src.intval) return false;
78  if (fval != src.fval) return false;
79  if (v3val != src.v3val) return false;
80  if (v4val != src.v4val) return false;
81  if (timescale != src.timescale) return false;
82  if (fieldname != src.fieldname) return false;
83  if (fieldoffsets != src.fieldoffsets) return false;
84  if (ramp != src.ramp)
85  { if (!ramp || !src.ramp || !(*ramp == *src.ramp)) return false; }
86  if (rampsize != src.rampsize) return false;
87  if (geometry != src.geometry) return false;
88  if (attribute != src.attribute) return false;
89  if (attribclass != src.attribclass) return false;
90  if (attribtype != src.attribtype) return false;
91  if (attribsize != src.attribsize) return false;
92  if (readable != src.readable) return false;
93  if (writeable != src.writeable) return false;
94  if (optional != src.optional) return false;
95 
96  return true;
97  }
98  bool operator!=(const Bindings &src) const
99  {
100  return !operator==(src);
101  }
102 
103  };
104 
106  {
108 
109  buf.strcat("[ ");
110  for (int i = 0; i < list.entries(); i++)
111  {
112  if (i)
113  buf.strcat(", ");
114  buf.strcat("( ");
115  buf.append("");
116  { UT_String tmp; tmp = UT_StringWrap(list(i).name).makeQuotedString('"'); buf.strcat(tmp); }
117  buf.append(", ");
118  buf.appendSprintf("%d", (int) list(i).type);
119  buf.append(", ");
120  buf.appendSprintf("%d", (int) list(i).intval);
121  buf.append(", ");
122  buf.appendSprintf("%f", (list(i).fval));
123  buf.append(", ");
124  buf.appendSprintf("(%f, %f, %f)", list(i).v3val.x(), list(i).v3val.y(), list(i).v3val.z());
125  buf.append(", ");
126  buf.appendSprintf("(%f, %f, %f, %f)", list(i).v4val.x(), list(i).v4val.y(), list(i).v4val.z(), list(i).v4val.w());
127  buf.append(", ");
128  buf.appendSprintf("%d", (int) list(i).timescale);
129  buf.append(", ");
130  { UT_String tmp; tmp = UT_StringWrap(list(i).fieldname).makeQuotedString('"'); buf.strcat(tmp); }
131  buf.append(", ");
132  buf.appendSprintf("%s", (list(i).fieldoffsets) ? "true" : "false");
133  buf.append(", ");
134  if (list(i).ramp)
135  {
136  UT_OStringStream os;
137  UT_String tmp;
138  list(i).ramp->save(os);
139  tmp = UT_StringWrap(os.str().buffer()).makeQuotedString('"');
140  buf.strcat(tmp);
141  }
142  else buf.strcat("""");
143  buf.append(", ");
144  buf.appendSprintf("%d", (int) list(i).rampsize);
145  buf.append(", ");
146  { UT_String tmp; tmp = UT_StringWrap(list(i).geometry).makeQuotedString('"'); buf.strcat(tmp); }
147  buf.append(", ");
148  { UT_String tmp; tmp = UT_StringWrap(list(i).attribute).makeQuotedString('"'); buf.strcat(tmp); }
149  buf.append(", ");
150  buf.appendSprintf("%d", (int) list(i).attribclass);
151  buf.append(", ");
152  buf.appendSprintf("%d", (int) list(i).attribtype);
153  buf.append(", ");
154  buf.appendSprintf("%d", (int) list(i).attribsize);
155  buf.append(", ");
156  buf.appendSprintf("%s", (list(i).readable) ? "true" : "false");
157  buf.append(", ");
158  buf.appendSprintf("%s", (list(i).writeable) ? "true" : "false");
159  buf.append(", ");
160  buf.appendSprintf("%s", (list(i).optional) ? "true" : "false");
161 
162  buf.strcat(" )");
163  }
164  buf.strcat(" ]");
165 
166  UT_StringHolder result = buf;
167  return result;
168  }
169 
171  {
172  myRunOver = 0;
173  myAlign = false;
174  myUseCode = false;
175  myKernelName = ""_sh;
176  myKernelFile = ""_sh;
177  myKernelCode = ""_sh;
178  myKernelOptions = ""_sh;
179  myRecompile = false;
180  myOrigin = false;
181  mySize = false;
182  myVoxelSize = false;
183  myTime = false;
184  myTimeInc = false;
185  myFlushAttributes = false;
186  myFinish = false;
187  myTimeScale = 0;
188  myTimeMethod = 0;
189  myXNoise = false;
190  myWorksetsGeometry = ""_sh;
191  myWorksetsBeginAttr = ""_sh;
192  myWorksetsLengthAttr = ""_sh;
193  myWarnMissing = false;
194  mySingleWorkgroup = false;
195 
196  }
197 
198  explicit GAS_OpenCLParms(const GAS_OpenCLParms &) = default;
199 
201 
202  bool operator==(const GAS_OpenCLParms &src) const
203  {
204  if (myRunOver != src.myRunOver) return false;
205  if (myAlign != src.myAlign) return false;
206  if (myUseCode != src.myUseCode) return false;
207  if (myKernelName != src.myKernelName) return false;
208  if (myKernelFile != src.myKernelFile) return false;
209  if (myKernelCode != src.myKernelCode) return false;
210  if (myKernelOptions != src.myKernelOptions) return false;
211  if (myRecompile != src.myRecompile) return false;
212  if (myOrigin != src.myOrigin) return false;
213  if (mySize != src.mySize) return false;
214  if (myVoxelSize != src.myVoxelSize) return false;
215  if (myTime != src.myTime) return false;
216  if (myTimeInc != src.myTimeInc) return false;
217  if (myFlushAttributes != src.myFlushAttributes) return false;
218  if (myFinish != src.myFinish) return false;
219  if (myTimeScale != src.myTimeScale) return false;
220  if (myTimeMethod != src.myTimeMethod) return false;
221  if (myXNoise != src.myXNoise) return false;
222  if (myWorksetsGeometry != src.myWorksetsGeometry) return false;
223  if (myWorksetsBeginAttr != src.myWorksetsBeginAttr) return false;
224  if (myWorksetsLengthAttr != src.myWorksetsLengthAttr) return false;
225  if (myWarnMissing != src.myWarnMissing) return false;
226  if (mySingleWorkgroup != src.mySingleWorkgroup) return false;
227  if (myBindings != src.myBindings) return false;
228 
229  return true;
230  }
231  bool operator!=(const GAS_OpenCLParms &src) const
232  {
233  return !operator==(src);
234  }
235 
236 
237  class Query : public SIM_Query
238  {
239  public:
240  explicit Query(const SIM_Data *owner, const GAS_OpenCLParms &parms)
241  : SIM_Query(owner)
242  , myParms(parms)
243  { }
244  virtual ~Query() {}
245 
246  protected:
247  bool isMyRecord(const char *recordtype) const
248  { return !strcmp(recordtype, "Params"); }
249 
250  virtual int getNumRecordTypesSubclass() const { return 1; }
251  virtual const char *getRecordTypeNameSubclass(int recordtypenum) const
252  {
253  if (recordtypenum == 0) return "Params";
254  return 0;
255  }
256  virtual int getNumRecordsSubclass(const char *recordtype) const
257  {
258  if (isMyRecord(recordtype)) return 1;
259  return 0;
260  }
261  virtual int getNumFieldsSubclass(const char *recordtype) const
262  {
263  if (isMyRecord(recordtype))
264  return 24;
265  return 0;
266  }
267 
268  virtual const char *getFieldNameSubclass(const char *recordtype,
269  int fieldnum) const
270  {
271  if (!isMyRecord(recordtype))
272  return 0;
273 
274  switch (fieldnum)
275  {
276  case 0:
277  return "runover";
278  case 1:
279  return "align";
280  case 2:
281  return "usecode";
282  case 3:
283  return "kernelname";
284  case 4:
285  return "kernelfile";
286  case 5:
287  return "kernelcode";
288  case 6:
289  return "kerneloptions";
290  case 7:
291  return "recompile";
292  case 8:
293  return "origin";
294  case 9:
295  return "size";
296  case 10:
297  return "voxelsize";
298  case 11:
299  return "time";
300  case 12:
301  return "timeinc";
302  case 13:
303  return "flushattrib";
304  case 14:
305  return "finish";
306  case 15:
307  return "timescale";
308  case 16:
309  return "timemethod";
310  case 17:
311  return "xnoise";
312  case 18:
313  return "worksets_geo";
314  case 19:
315  return "worksets_begin";
316  case 20:
317  return "worksets_length";
318  case 21:
319  return "warnmissing";
320  case 22:
321  return "singleworkgroup";
322  case 23:
323  return "bindings";
324 
325  }
326  return 0;
327  }
328  virtual UT_OptionType getFieldTypeSubclass(const char *recordtype,
329  int fieldnum) const
330  {
331  if (!isMyRecord(recordtype))
332  return UT_OPTION_INVALID;
333 
334  switch (fieldnum)
335  {
336  case 0:
337  return UT_OPTION_INT;
338  case 1:
339  return UT_OPTION_BOOL;
340  case 2:
341  return UT_OPTION_BOOL;
342  case 3:
343  return UT_OPTION_STRING;
344  case 4:
345  return UT_OPTION_STRING;
346  case 5:
347  return UT_OPTION_STRING;
348  case 6:
349  return UT_OPTION_STRING;
350  case 7:
351  return UT_OPTION_BOOL;
352  case 8:
353  return UT_OPTION_BOOL;
354  case 9:
355  return UT_OPTION_BOOL;
356  case 10:
357  return UT_OPTION_BOOL;
358  case 11:
359  return UT_OPTION_BOOL;
360  case 12:
361  return UT_OPTION_BOOL;
362  case 13:
363  return UT_OPTION_BOOL;
364  case 14:
365  return UT_OPTION_BOOL;
366  case 15:
367  return UT_OPTION_FPREAL;
368  case 16:
369  return UT_OPTION_INT;
370  case 17:
371  return UT_OPTION_BOOL;
372  case 18:
373  return UT_OPTION_STRING;
374  case 19:
375  return UT_OPTION_STRING;
376  case 20:
377  return UT_OPTION_STRING;
378  case 21:
379  return UT_OPTION_BOOL;
380  case 22:
381  return UT_OPTION_BOOL;
382  case 23:
383  return UT_OPTION_STRING;
384 
385  }
386  return UT_OPTION_INVALID;
387  }
388 
389  virtual bool getFieldRawSubclass(const char *recordtype,
390  int recordnum,
391  const char *fieldname,
392  UT_OptionEntry *&result) const
393  {
394  if (!isMyRecord(recordtype))
395  return false;
396  if (recordnum != 0)
397  return false;
398  // This is less optimal, but if we are in SIM_Query
399  // land we have already given up on performance.
400  if (!strcmp(fieldname, "runover"))
401  {
402  result = new UT_OptionInt(myParms.myRunOver);
403  return true;
404  }
405  if (!strcmp(fieldname, "align"))
406  {
407  result = new UT_OptionBool(myParms.myAlign);
408  return true;
409  }
410  if (!strcmp(fieldname, "usecode"))
411  {
412  result = new UT_OptionBool(myParms.myUseCode);
413  return true;
414  }
415  if (!strcmp(fieldname, "kernelname"))
416  {
417  result = new UT_OptionString(myParms.myKernelName);
418  return true;
419  }
420  if (!strcmp(fieldname, "kernelfile"))
421  {
422  result = new UT_OptionString(myParms.myKernelFile);
423  return true;
424  }
425  if (!strcmp(fieldname, "kernelcode"))
426  {
427  result = new UT_OptionString(myParms.myKernelCode);
428  return true;
429  }
430  if (!strcmp(fieldname, "kerneloptions"))
431  {
432  result = new UT_OptionString(myParms.myKernelOptions);
433  return true;
434  }
435  if (!strcmp(fieldname, "recompile"))
436  {
437  result = new UT_OptionBool(myParms.myRecompile);
438  return true;
439  }
440  if (!strcmp(fieldname, "origin"))
441  {
442  result = new UT_OptionBool(myParms.myOrigin);
443  return true;
444  }
445  if (!strcmp(fieldname, "size"))
446  {
447  result = new UT_OptionBool(myParms.mySize);
448  return true;
449  }
450  if (!strcmp(fieldname, "voxelsize"))
451  {
452  result = new UT_OptionBool(myParms.myVoxelSize);
453  return true;
454  }
455  if (!strcmp(fieldname, "time"))
456  {
457  result = new UT_OptionBool(myParms.myTime);
458  return true;
459  }
460  if (!strcmp(fieldname, "timeinc"))
461  {
462  result = new UT_OptionBool(myParms.myTimeInc);
463  return true;
464  }
465  if (!strcmp(fieldname, "flushattrib"))
466  {
467  result = new UT_OptionBool(myParms.myFlushAttributes);
468  return true;
469  }
470  if (!strcmp(fieldname, "finish"))
471  {
472  result = new UT_OptionBool(myParms.myFinish);
473  return true;
474  }
475  if (!strcmp(fieldname, "timescale"))
476  {
477  result = new UT_OptionFpreal(myParms.myTimeScale);
478  return true;
479  }
480  if (!strcmp(fieldname, "timemethod"))
481  {
482  result = new UT_OptionInt(myParms.myTimeMethod);
483  return true;
484  }
485  if (!strcmp(fieldname, "xnoise"))
486  {
487  result = new UT_OptionBool(myParms.myXNoise);
488  return true;
489  }
490  if (!strcmp(fieldname, "worksets_geo"))
491  {
492  result = new UT_OptionString(myParms.myWorksetsGeometry);
493  return true;
494  }
495  if (!strcmp(fieldname, "worksets_begin"))
496  {
497  result = new UT_OptionString(myParms.myWorksetsBeginAttr);
498  return true;
499  }
500  if (!strcmp(fieldname, "worksets_length"))
501  {
502  result = new UT_OptionString(myParms.myWorksetsLengthAttr);
503  return true;
504  }
505  if (!strcmp(fieldname, "warnmissing"))
506  {
507  result = new UT_OptionBool(myParms.myWarnMissing);
508  return true;
509  }
510  if (!strcmp(fieldname, "singleworkgroup"))
511  {
512  result = new UT_OptionBool(myParms.mySingleWorkgroup);
513  return true;
514  }
515  if (!strcmp(fieldname, "bindings"))
516  {
517  result = new UT_OptionString(myParms.createString(myParms.myBindings));
518  return true;
519  }
520 
521  // Failed to find
522  return false;
523  }
524 
526  };
527 
528  SIM_Query *createQueryObject(const SIM_Data *owner) const
529  { return new Query(owner, *this); }
530 
531 
532 
533 
534  // Boiler plate to load individual types.
535  static void loadData(UT_IStream &is, int64 &v)
536  { is.bread(&v, 1); }
537  static void loadData(UT_IStream &is, bool &v)
538  { int64 iv; is.bread(&iv, 1); v = iv; }
539  static void loadData(UT_IStream &is, fpreal64 &v)
540  { is.bread<fpreal64>(&v, 1); }
541  static void loadData(UT_IStream &is, UT_Vector2D &v)
542  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
543  static void loadData(UT_IStream &is, UT_Vector3D &v)
544  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
545  is.bread<fpreal64>(&v.z(), 1); }
546  static void loadData(UT_IStream &is, UT_Vector4D &v)
547  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
548  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
549  static void loadData(UT_IStream &is, UT_Matrix2D &v)
550  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
551  static void loadData(UT_IStream &is, UT_Matrix3D &v)
552  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
553  static void loadData(UT_IStream &is, UT_Matrix4D &v)
554  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
555  static void loadData(UT_IStream &is, UT_Vector2I &v)
556  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
557  static void loadData(UT_IStream &is, UT_Vector3I &v)
558  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
559  is.bread<int64>(&v.z(), 1); }
560  static void loadData(UT_IStream &is, UT_Vector4I &v)
561  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
562  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
564  { is.bread(v); }
566  { UT_StringHolder rampdata;
567  loadData(is, rampdata);
568  if (rampdata.isstring())
569  {
570  v.reset(new UT_Ramp());
571  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
572  v->load(istr);
573  }
574  else v.reset();
575  }
578  loadData(is, data);
579  if (data.isstring())
580  {
581  // Find the data type.
582  char *colon = UT_StringWrap(data).findChar(':');
583  if (colon)
584  {
585  int typelen = colon - data.buffer();
587  type.strncpy(data.buffer(), typelen);
588  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
589 
590  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
591  }
592  }
593  else v.reset();
594  }
595 
596  static void saveData(std::ostream &os, int64 v)
597  { UTwrite(os, &v); }
598  static void saveData(std::ostream &os, bool v)
599  { int64 iv = v; UTwrite(os, &iv); }
600  static void saveData(std::ostream &os, fpreal64 v)
601  { UTwrite<fpreal64>(os, &v); }
602  static void saveData(std::ostream &os, UT_Vector2D v)
603  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
604  static void saveData(std::ostream &os, UT_Vector3D v)
605  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
606  UTwrite<fpreal64>(os, &v.z()); }
607  static void saveData(std::ostream &os, UT_Vector4D v)
608  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
609  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
610  static void saveData(std::ostream &os, UT_Matrix2D v)
612  static void saveData(std::ostream &os, UT_Matrix3D v)
614  static void saveData(std::ostream &os, UT_Matrix4D v)
616  static void saveData(std::ostream &os, UT_StringHolder s)
617  { UT_StringWrap(s).saveBinary(os); }
618  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
619  { UT_StringHolder result;
620  UT_OStringStream ostr;
621  if (s) s->save(ostr);
622  result = ostr.str();
623  saveData(os, result);
624  }
625  static void saveData(std::ostream &os, PRM_DataItemHandle s)
626  { UT_StringHolder result;
627  UT_OStringStream ostr;
628  if (s)
629  {
630  ostr << s->getDataTypeToken();
631  ostr << ":";
632  s->saveBinary(ostr);
633  }
634  result = ostr.str();
635  saveData(os, result);
636  }
637 
638 
639  void save(std::ostream &os) const
640  {
641  int32 v = version();
642  UTwrite(os, &v);
643  saveData(os, myRunOver);
644  saveData(os, myAlign);
645  saveData(os, myUseCode);
646  saveData(os, myKernelName);
647  saveData(os, myKernelFile);
648  saveData(os, myKernelCode);
649  saveData(os, myKernelOptions);
650  saveData(os, myRecompile);
651  saveData(os, myOrigin);
652  saveData(os, mySize);
653  saveData(os, myVoxelSize);
654  saveData(os, myTime);
655  saveData(os, myTimeInc);
656  saveData(os, myFlushAttributes);
657  saveData(os, myFinish);
658  saveData(os, myTimeScale);
659  saveData(os, myTimeMethod);
660  saveData(os, myXNoise);
661  saveData(os, myWorksetsGeometry);
662  saveData(os, myWorksetsBeginAttr);
663  saveData(os, myWorksetsLengthAttr);
664  saveData(os, myWarnMissing);
665  saveData(os, mySingleWorkgroup);
666  {
667  int64 length = myBindings.entries();
668  UTwrite(os, &length);
669  for (exint i = 0; i < length; i++)
670  {
671  saveData(os, myBindings(i).name);
672  saveData(os, myBindings(i).type);
673  saveData(os, myBindings(i).intval);
674  saveData(os, myBindings(i).fval);
675  saveData(os, myBindings(i).v3val);
676  saveData(os, myBindings(i).v4val);
677  saveData(os, myBindings(i).timescale);
678  saveData(os, myBindings(i).fieldname);
679  saveData(os, myBindings(i).fieldoffsets);
680  saveData(os, myBindings(i).ramp);
681  saveData(os, myBindings(i).rampsize);
682  saveData(os, myBindings(i).geometry);
683  saveData(os, myBindings(i).attribute);
684  saveData(os, myBindings(i).attribclass);
685  saveData(os, myBindings(i).attribtype);
686  saveData(os, myBindings(i).attribsize);
687  saveData(os, myBindings(i).readable);
688  saveData(os, myBindings(i).writeable);
689  saveData(os, myBindings(i).optional);
690 
691  }
692  }
693 
694  }
695 
696  bool load(UT_IStream &is)
697  {
698  int32 v;
699  is.bread(&v, 1);
700  if (version() != v)
701  {
702  // Fail incompatible versions
703  return false;
704  }
705  loadData(is, myRunOver);
706  loadData(is, myAlign);
707  loadData(is, myUseCode);
708  loadData(is, myKernelName);
709  loadData(is, myKernelFile);
710  loadData(is, myKernelCode);
711  loadData(is, myKernelOptions);
712  loadData(is, myRecompile);
713  loadData(is, myOrigin);
714  loadData(is, mySize);
715  loadData(is, myVoxelSize);
716  loadData(is, myTime);
717  loadData(is, myTimeInc);
718  loadData(is, myFlushAttributes);
719  loadData(is, myFinish);
720  loadData(is, myTimeScale);
721  loadData(is, myTimeMethod);
722  loadData(is, myXNoise);
723  loadData(is, myWorksetsGeometry);
724  loadData(is, myWorksetsBeginAttr);
725  loadData(is, myWorksetsLengthAttr);
726  loadData(is, myWarnMissing);
727  loadData(is, mySingleWorkgroup);
728  {
729  int64 length;
730  is.read(&length, 1);
731  myBindings.entries(length);
732  for (exint i = 0; i < length; i++)
733  {
734  loadData(is, myBindings(i).name);
735  loadData(is, myBindings(i).type);
736  loadData(is, myBindings(i).intval);
737  loadData(is, myBindings(i).fval);
738  loadData(is, myBindings(i).v3val);
739  loadData(is, myBindings(i).v4val);
740  loadData(is, myBindings(i).timescale);
741  loadData(is, myBindings(i).fieldname);
742  loadData(is, myBindings(i).fieldoffsets);
743  loadData(is, myBindings(i).ramp);
744  loadData(is, myBindings(i).rampsize);
745  loadData(is, myBindings(i).geometry);
746  loadData(is, myBindings(i).attribute);
747  loadData(is, myBindings(i).attribclass);
748  loadData(is, myBindings(i).attribtype);
749  loadData(is, myBindings(i).attribsize);
750  loadData(is, myBindings(i).readable);
751  loadData(is, myBindings(i).writeable);
752  loadData(is, myBindings(i).optional);
753 
754  }
755  }
756 
757  return true;
758  }
759 
760  int64 getRunOver() const { return myRunOver; }
761  void setRunOver(int64 val) { myRunOver = val; }
762  bool getAlign() const { return myAlign; }
763  void setAlign(bool val) { myAlign = val; }
764  bool getUseCode() const { return myUseCode; }
765  void setUseCode(bool val) { myUseCode = val; }
766  const UT_StringHolder & getKernelName() const { return myKernelName; }
767  void setKernelName(const UT_StringHolder & val) { myKernelName = val; }
768  const UT_StringHolder & getKernelFile() const { return myKernelFile; }
769  void setKernelFile(const UT_StringHolder & val) { myKernelFile = val; }
770  const UT_StringHolder & getKernelCode() const { return myKernelCode; }
771  void setKernelCode(const UT_StringHolder & val) { myKernelCode = val; }
772  const UT_StringHolder & getKernelOptions() const { return myKernelOptions; }
773  void setKernelOptions(const UT_StringHolder & val) { myKernelOptions = val; }
774  bool getRecompile() const { return myRecompile; }
775  void setRecompile(bool val) { myRecompile = val; }
776  bool getOrigin() const { return myOrigin; }
777  void setOrigin(bool val) { myOrigin = val; }
778  bool getSize() const { return mySize; }
779  void setSize(bool val) { mySize = val; }
780  bool getVoxelSize() const { return myVoxelSize; }
781  void setVoxelSize(bool val) { myVoxelSize = val; }
782  bool getTime() const { return myTime; }
783  void setTime(bool val) { myTime = val; }
784  bool getTimeInc() const { return myTimeInc; }
785  void setTimeInc(bool val) { myTimeInc = val; }
786  bool getFlushAttributes() const { return myFlushAttributes; }
787  void setFlushAttributes(bool val) { myFlushAttributes = val; }
788  bool getFinish() const { return myFinish; }
789  void setFinish(bool val) { myFinish = val; }
790  fpreal64 getTimeScale() const { return myTimeScale; }
791  void setTimeScale(fpreal64 val) { myTimeScale = val; }
792  int64 getTimeMethod() const { return myTimeMethod; }
793  void setTimeMethod(int64 val) { myTimeMethod = val; }
794  bool getXNoise() const { return myXNoise; }
795  void setXNoise(bool val) { myXNoise = val; }
796  const UT_StringHolder & getWorksetsGeometry() const { return myWorksetsGeometry; }
797  void setWorksetsGeometry(const UT_StringHolder & val) { myWorksetsGeometry = val; }
798  const UT_StringHolder & getWorksetsBeginAttr() const { return myWorksetsBeginAttr; }
799  void setWorksetsBeginAttr(const UT_StringHolder & val) { myWorksetsBeginAttr = val; }
800  const UT_StringHolder & getWorksetsLengthAttr() const { return myWorksetsLengthAttr; }
801  void setWorksetsLengthAttr(const UT_StringHolder & val) { myWorksetsLengthAttr = val; }
802  bool getWarnMissing() const { return myWarnMissing; }
803  void setWarnMissing(bool val) { myWarnMissing = val; }
804  bool getSingleWorkgroup() const { return mySingleWorkgroup; }
805  void setSingleWorkgroup(bool val) { mySingleWorkgroup = val; }
806  const UT_Array<Bindings> &getBindings() const { return myBindings; }
807  void setBindings(const UT_Array<Bindings> &val) { myBindings = val; }
808 
809 private:
810  int64 myRunOver;
811  bool myAlign;
812  bool myUseCode;
813  UT_StringHolder myKernelName;
814  UT_StringHolder myKernelFile;
815  UT_StringHolder myKernelCode;
816  UT_StringHolder myKernelOptions;
817  bool myRecompile;
818  bool myOrigin;
819  bool mySize;
820  bool myVoxelSize;
821  bool myTime;
822  bool myTimeInc;
823  bool myFlushAttributes;
824  bool myFinish;
825  fpreal64 myTimeScale;
826  int64 myTimeMethod;
827  bool myXNoise;
828  UT_StringHolder myWorksetsGeometry;
829  UT_StringHolder myWorksetsBeginAttr;
830  UT_StringHolder myWorksetsLengthAttr;
831  bool myWarnMissing;
832  bool mySingleWorkgroup;
833  UT_Array<Bindings> myBindings;
834 
835 };
bool operator!=(const Bindings &src) const
virtual const char * getRecordTypeNameSubclass(int recordtypenum) const
static void saveData(std::ostream &os, UT_Vector3D v)
const UT_StringHolder & getKernelName() const
static void loadData(UT_IStream &is, UT_Vector2D &v)
static void saveData(std::ostream &os, UT_Matrix3D v)
bool operator==(const GAS_OpenCLParms &src) const
static void loadData(UT_IStream &is, fpreal64 &v)
static void loadData(UT_IStream &is, UT_Matrix2D &v)
static void saveData(std::ostream &os, UT_Matrix4D v)
T & z(void)
Definition: UT_Vector4.h:379
void setTimeMethod(int64 val)
void setRunOver(int64 val)
bool getFlushAttributes() const
void setSize(bool val)
exint bread(int32 *buffer, exint asize=1)
const GLdouble * v
Definition: glcorearb.h:836
#define GAS_API
Definition: GAS_API.h:10
UT_StringHolder createString(const UT_Array< Bindings > &list) const
void setFinish(bool val)
bool isMyRecord(const char *recordtype) const
bool getWarnMissing() const
static void loadData(UT_IStream &is, UT_Vector2I &v)
void setWorksetsGeometry(const UT_StringHolder &val)
void setOrigin(bool val)
UT_String makeQuotedString(char delimiter='\'', bool escape_nonprinting=false) const
virtual int getNumRecordsSubclass(const char *recordtype) const
const UT_StringHolder & getWorksetsGeometry() const
static void saveData(std::ostream &os, fpreal64 v)
SYS_FORCE_INLINE const char * buffer() const
T & x(void)
Definition: UT_Vector2.h:285
UT_OptionType
An output stream object that owns its own string buffer storage.
virtual int getNumRecordTypesSubclass() const
Query(const SIM_Data *owner, const GAS_OpenCLParms &parms)
const GAS_OpenCLParms & myParms
const UT_WorkBuffer & str() const
Returns a read-only reference to the underlying UT_WorkBuffer.
void setXNoise(bool val)
bool getRecompile() const
SYS_FORCE_INLINE T & x(void)
Definition: UT_Vector3.h:498
static void saveData(std::ostream &os, UT_Vector4D v)
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
void setUseCode(bool val)
png_uint_32 i
Definition: png.h:2877
void setTimeInc(bool val)
bool getUseCode() const
SYS_FORCE_INLINE T & z(void)
Definition: UT_Vector3.h:502
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
long long int64
Definition: SYS_Types.h:107
static void saveData(std::ostream &os, int64 v)
void setBindings(const UT_Array< Bindings > &val)
exint length() const
bool load(UT_IStream &is)
char * findChar(int c) const
Find first occurrance of character. Returns NULL upon failure.
Definition: UT_String.h:550
SIM_Query * createQueryObject(const SIM_Data *owner) const
bool getSingleWorkgroup() const
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:28
void save(std::ostream &os) const
int64 exint
Definition: SYS_Types.h:116
UT_OptionEntryImpl< int64, UT_OPTION_INT > UT_OptionInt
int64 getTimeMethod() const
double fpreal64
Definition: SYS_Types.h:192
UT_SharedPtr< UT_Ramp > ramp
exint read(bool *array, exint sz=1)
Definition: UT_IStream.h:284
static void loadData(UT_IStream &is, bool &v)
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void setVoxelSize(bool val)
UT_OptionEntryImpl< bool, UT_OPTION_BOOL > UT_OptionBool
static void loadData(UT_IStream &is, UT_Vector4D &v)
static void saveData(std::ostream &os, UT_Vector2D v)
GLboolean * data
Definition: glcorearb.h:130
GLuint const GLchar * name
Definition: glcorearb.h:785
int int32
Definition: SYS_Types.h:35
T & y(void)
Definition: UT_Vector4.h:377
const UT_Array< Bindings > & getBindings() const
static void saveData(std::ostream &os, UT_Matrix2D 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
void setRecompile(bool val)
GT_API const UT_StringHolder version
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glcorearb.h:2539
exint entries() const
Alias of size(). size() is preferred.
Definition: UT_Array.h:453
const UT_StringHolder & getKernelFile() const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
void setWorksetsLengthAttr(const UT_StringHolder &val)
SYS_FORCE_INLINE T & y(void)
Definition: UT_Vector3.h:500
void setSingleWorkgroup(bool val)
bool getTimeInc() const
int int appendSprintf(const char *fmt,...) SYS_PRINTF_CHECK_ATTRIBUTE(2
void setTimeScale(fpreal64 val)
UT_OptionEntryImpl< fpreal64, UT_OPTION_FPREAL > UT_OptionFpreal
const UT_StringHolder & getKernelCode() const
Utility class for containing a color ramp.
Definition: UT_Ramp.h:84
void setWorksetsBeginAttr(const UT_StringHolder &val)
SYS_FORCE_INLINE void append(char character)
virtual UT_OptionType getFieldTypeSubclass(const char *recordtype, int fieldnum) const
void setAlign(bool val)
GLuint GLfloat * val
Definition: glcorearb.h:1607
static void loadData(UT_IStream &is, UT_Vector3D &v)
static void saveData(std::ostream &os, UT_StringHolder s)
bool operator!=(const GAS_OpenCLParms &src) const
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:107
T & x(void)
Definition: UT_Vector4.h:375
bool operator==(const Bindings &src) const
void setWarnMissing(bool val)
const UT_StringHolder & getKernelOptions() const
static void loadData(UT_IStream &is, UT_StringHolder &v)
T & y(void)
Definition: UT_Vector2.h:287
void setKernelName(const UT_StringHolder &val)
void setKernelCode(const UT_StringHolder &val)
static void loadData(UT_IStream &is, UT_Vector4I &v)
GLboolean r
Definition: glcorearb.h:1221
fpreal64 getTimeScale() const
int64 getRunOver() const
static void loadData(UT_IStream &is, int64 &v)
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
T & w(void)
Definition: UT_Vector4.h:381
bool getVoxelSize() const
void setKernelOptions(const UT_StringHolder &val)
const UT_StringHolder & getWorksetsLengthAttr() const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
static void loadData(UT_IStream &is, UT_Matrix3D &v)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:88
static void loadData(UT_IStream &is, UT_Vector3I &v)
void setKernelFile(const UT_StringHolder &val)
void setFlushAttributes(bool val)
SYS_FORCE_INLINE bool isstring() const
virtual const char * getFieldNameSubclass(const char *recordtype, int fieldnum) const
static void saveData(std::ostream &os, bool v)
void setTime(bool val)
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
GLuint GLsizei GLsizei * length
Definition: glcorearb.h:794
const UT_StringHolder & getWorksetsBeginAttr() const
virtual int getNumFieldsSubclass(const char *recordtype) const
GLenum src
Definition: glcorearb.h:1792
virtual bool getFieldRawSubclass(const char *recordtype, int recordnum, const char *fieldname, UT_OptionEntry *&result) const