HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_LinearSolver.proto.h
Go to the documentation of this file.
1 /* Automagically Generated by generate_proto.py
2  * Do not Edit
3  */
4 #pragma once
5 
6 #include <SOP/SOP_API.h>
7 #include <SOP/SOP_NodeVerb.h>
8 #include <OP/OP_GraphProxy.h>
9 
10 #include <OP/OP_Utils.h>
11 #include <PRM/PRM_Parm.h>
12 #include <UT/UT_IStream.h>
13 #include <UT/UT_NTStreamUtil.h>
14 #include <UT/UT_Ramp.h>
15 #include <UT/UT_SharedPtr.h>
16 #include <UT/UT_StringHolder.h>
17 #include <UT/UT_StringStream.h>
18 #include <UT/UT_VectorTypes.h>
19 #include <UT/UT_EnvControl.h>
20 #include <SYS/SYS_Types.h>
21 
22 class DEP_MicroNode;
23 namespace SOP_LinearSolverEnums
24 {
25  enum class Mode
26  {
28  DECOMPOSE,
30  MULTIPLY
31  };
32 
34  getToken(Mode enum_value)
35  {
36  using namespace UT::Literal;
37  switch (enum_value) {
38  case Mode::LINEARSYSTEMSOLVE: return "linearsystemsolve"_sh;
39  case Mode::DECOMPOSE: return "decompose"_sh;
40  case Mode::SOLVEWITHDECOMPOSITION: return "solvewithdecomposition"_sh;
41  case Mode::MULTIPLY: return "multiply"_sh;
42  default: UT_ASSERT(false); return ""_sh;
43  }
44  }
45 
46  enum class Precision
47  {
48  AUTO = 0,
49  _32,
50  _64
51  };
52 
54  getToken(Precision enum_value)
55  {
56  using namespace UT::Literal;
57  switch (enum_value) {
58  case Precision::AUTO: return "auto"_sh;
59  case Precision::_32: return "32"_sh;
60  case Precision::_64: return "64"_sh;
61  default: UT_ASSERT(false); return ""_sh;
62  }
63  }
64 
65  enum class DenseDirectSolver
66  {
67  PARTIALPIVLU = 0,
68  FULLPIVLU,
73  LLT,
74  LDLT,
75  BDCSVD,
76  JACOBISVD,
79  };
80 
83  {
84  using namespace UT::Literal;
85  switch (enum_value) {
86  case DenseDirectSolver::PARTIALPIVLU: return "partialpivlu"_sh;
87  case DenseDirectSolver::FULLPIVLU: return "fullpivlu"_sh;
88  case DenseDirectSolver::HOUSEHOLDERQR: return "householderqr"_sh;
89  case DenseDirectSolver::COLPIVHOUSEHOLDERQR: return "colpivhouseholderqr"_sh;
90  case DenseDirectSolver::FULLPIVHOUSEHOLDERQR: return "fullpivhouseholderqr"_sh;
91  case DenseDirectSolver::COMPLETEORTHOGONALDECOMPOSITION: return "completeorthogonaldecomposition"_sh;
92  case DenseDirectSolver::LLT: return "llt"_sh;
93  case DenseDirectSolver::LDLT: return "ldlt"_sh;
94  case DenseDirectSolver::BDCSVD: return "bdcsvd"_sh;
95  case DenseDirectSolver::JACOBISVD: return "jacobisvd"_sh;
96  case DenseDirectSolver::EIGENSOLVER: return "eigensolver"_sh;
97  case DenseDirectSolver::SELFADJOINTEIGENSOLVER: return "selfadjointeigensolver"_sh;
98  default: UT_ASSERT(false); return ""_sh;
99  }
100  }
101 
103  {
104  LLT = 0,
105  LDLT,
106  LU,
107  QR
108  };
109 
112  {
113  using namespace UT::Literal;
114  switch (enum_value) {
115  case SparseDirectSolver::LLT: return "llt"_sh;
116  case SparseDirectSolver::LDLT: return "ldlt"_sh;
117  case SparseDirectSolver::LU: return "lu"_sh;
118  case SparseDirectSolver::QR: return "qr"_sh;
119  default: UT_ASSERT(false); return ""_sh;
120  }
121  }
122 
124  {
125  PARDISOACCELERATE = 0,
126  EIGEN
127  };
128 
131  {
132  using namespace UT::Literal;
133  switch (enum_value) {
134  case SparseDirectSolverBackend::PARDISOACCELERATE: return "pardisoaccelerate"_sh;
135  case SparseDirectSolverBackend::EIGEN: return "eigen"_sh;
136  default: UT_ASSERT(false); return ""_sh;
137  }
138  }
139 
140  enum class IterativeSolver
141  {
142  GMRES = 0,
143  DGMRES,
144  MINRES,
147  BICGSTAB,
148  IDRS
149  };
150 
153  {
154  using namespace UT::Literal;
155  switch (enum_value) {
156  case IterativeSolver::GMRES: return "gmres"_sh;
157  case IterativeSolver::DGMRES: return "dgmres"_sh;
158  case IterativeSolver::MINRES: return "minres"_sh;
159  case IterativeSolver::CONJUGATEGRADIENT: return "conjugategradient"_sh;
160  case IterativeSolver::LEASTSQUARESCONJUGATEGRADIENT: return "leastsquaresconjugategradient"_sh;
161  case IterativeSolver::BICGSTAB: return "bicgstab"_sh;
162  case IterativeSolver::IDRS: return "idrs"_sh;
163  default: UT_ASSERT(false); return ""_sh;
164  }
165  }
166 
168  {
169  IDENTITY = 0,
170  DIAGONAL
171  };
172 
175  {
176  using namespace UT::Literal;
177  switch (enum_value) {
178  case DensePreconditioner::IDENTITY: return "identity"_sh;
179  case DensePreconditioner::DIAGONAL: return "diagonal"_sh;
180  default: UT_ASSERT(false); return ""_sh;
181  }
182  }
183 
185  {
186  IDENTITY = 0,
187  DIAGONAL,
190  };
191 
194  {
195  using namespace UT::Literal;
196  switch (enum_value) {
197  case SparsePreconditioner::IDENTITY: return "identity"_sh;
198  case SparsePreconditioner::DIAGONAL: return "diagonal"_sh;
199  case SparsePreconditioner::INCOMPLETELUT: return "incompletelut"_sh;
200  case SparsePreconditioner::INCOMPLETECHOLESKY: return "incompletecholesky"_sh;
201  default: UT_ASSERT(false); return ""_sh;
202  }
203  }
204 
206  {
207  GENEIGSSOLVER = 0,
211  };
212 
215  {
216  using namespace UT::Literal;
217  switch (enum_value) {
218  case SpectraEigensolver::GENEIGSSOLVER: return "geneigssolver"_sh;
219  case SpectraEigensolver::SYMEIGSSOLVER: return "symeigssolver"_sh;
220  case SpectraEigensolver::GENEIGSREALSHIFTSOLVER: return "geneigsrealshiftsolver"_sh;
221  case SpectraEigensolver::SYMEIGSSHIFTSOLVER: return "symeigsshiftsolver"_sh;
222  default: UT_ASSERT(false); return ""_sh;
223  }
224  }
225 
226  enum class MatrixStorage
227  {
228  VOLUME = 0,
229  POINTS,
230  PRIMITIVES,
231  DETAIL
232  };
233 
235  getToken(MatrixStorage enum_value)
236  {
237  using namespace UT::Literal;
238  switch (enum_value) {
239  case MatrixStorage::VOLUME: return "volume"_sh;
240  case MatrixStorage::POINTS: return "points"_sh;
241  case MatrixStorage::PRIMITIVES: return "primitives"_sh;
242  case MatrixStorage::DETAIL: return "detail"_sh;
243  default: UT_ASSERT(false); return ""_sh;
244  }
245  }
246 
247  enum class VolumeEncoding
248  {
249  DENSECOL = 0,
250  DENSEROW
251  };
252 
255  {
256  using namespace UT::Literal;
257  switch (enum_value) {
258  case VolumeEncoding::DENSECOL: return "densecol"_sh;
259  case VolumeEncoding::DENSEROW: return "denserow"_sh;
260  default: UT_ASSERT(false); return ""_sh;
261  }
262  }
263 
265  {
266  DENSECOL = 0,
267  DENSEROW,
268  COO,
269  LILCOL,
270  LILROW
271  };
272 
275  {
276  using namespace UT::Literal;
277  switch (enum_value) {
278  case PointsPrimsEncoding::DENSECOL: return "densecol"_sh;
279  case PointsPrimsEncoding::DENSEROW: return "denserow"_sh;
280  case PointsPrimsEncoding::COO: return "coo"_sh;
281  case PointsPrimsEncoding::LILCOL: return "lilcol"_sh;
282  case PointsPrimsEncoding::LILROW: return "lilrow"_sh;
283  default: UT_ASSERT(false); return ""_sh;
284  }
285  }
286 
287  enum class DetailEncoding
288  {
289  DENSECOL = 0,
290  DENSEROW,
291  COO
292  };
293 
296  {
297  using namespace UT::Literal;
298  switch (enum_value) {
299  case DetailEncoding::DENSECOL: return "densecol"_sh;
300  case DetailEncoding::DENSEROW: return "denserow"_sh;
301  case DetailEncoding::COO: return "coo"_sh;
302  default: UT_ASSERT(false); return ""_sh;
303  }
304  }
305 
306  enum class VectorSrcStorage
307  {
308  POINTS = 0,
309  PRIMITIVES,
310  DETAIL
311  };
312 
315  {
316  using namespace UT::Literal;
317  switch (enum_value) {
318  case VectorSrcStorage::POINTS: return "points"_sh;
319  case VectorSrcStorage::PRIMITIVES: return "primitives"_sh;
320  case VectorSrcStorage::DETAIL: return "detail"_sh;
321  default: UT_ASSERT(false); return ""_sh;
322  }
323  }
324 
325  enum class VectorDstStorage
326  {
327  POINTS = 0,
328  PRIMITIVES,
329  DETAIL
330  };
331 
334  {
335  using namespace UT::Literal;
336  switch (enum_value) {
337  case VectorDstStorage::POINTS: return "points"_sh;
338  case VectorDstStorage::PRIMITIVES: return "primitives"_sh;
339  case VectorDstStorage::DETAIL: return "detail"_sh;
340  default: UT_ASSERT(false); return ""_sh;
341  }
342  }
343 
344 }
345 
346 
348 {
349 public:
350  static int version() { return 1; }
351 
353  {
354  myMode = 0;
355  myCookInplace = false;
356  myPrecision = 0;
357  myUseIterativeSolver = false;
358  myIterativeSolver = 5;
359  mySolveWithGuess = false;
360  myUseEigensolver = false;
361  mySpectraEigensolver = 0;
362  myNumEigenpairs = 0;
363  myShift = -0.001;
364  mySolverTolerance = 1e-4;
365  mySolverMaxIterations = 3;
366  myMatrixStorage = 0;
367  myVolumeEncoding = 0;
368  myPointsPrimsEncoding = 0;
369  myDetailEncoding = 0;
370  mySquareMatrix = false;
371  myRows = 512;
372  myCols = 512;
373  myRowAttribute = "row"_UTsh;
374  myColAttribute = "col"_UTsh;
375  myMatrixValueAttribute = "value"_UTsh;
376  myVectorSrcStorage = 0;
377  myVectorSrcAttribute = "known"_UTsh;
378  myVectorDstStorage = 0;
379  myVectorDstAttribute = "unknown"_UTsh;
380  myPinnedGroup = ""_UTsh;
381  myReduceRows = true;
382  myScale = 1;
383  myAccumulateResult = false;
384  myDenseDirectSolver = 0;
385  mySparseDirectSolver = 1;
386  mySparseDirectSolverBackend = 0;
387  myDensePreconditioner = 1;
388  mySparsePreconditioner = 1;
389 
390  }
391 
392  explicit SOP_LinearSolverParms(const SOP_LinearSolverParms &) = default;
394  SOP_LinearSolverParms(SOP_LinearSolverParms &&) noexcept = default;
395  SOP_LinearSolverParms &operator=(SOP_LinearSolverParms &&) noexcept = default;
396 
397  ~SOP_LinearSolverParms() override {}
398 
400  {
401  if (myMode != src.myMode) return false;
402  if (myCookInplace != src.myCookInplace) return false;
403  if (myPrecision != src.myPrecision) return false;
404  if (myUseIterativeSolver != src.myUseIterativeSolver) return false;
405  if (myIterativeSolver != src.myIterativeSolver) return false;
406  if (mySolveWithGuess != src.mySolveWithGuess) return false;
407  if (myUseEigensolver != src.myUseEigensolver) return false;
408  if (mySpectraEigensolver != src.mySpectraEigensolver) return false;
409  if (myNumEigenpairs != src.myNumEigenpairs) return false;
410  if (myShift != src.myShift) return false;
411  if (mySolverTolerance != src.mySolverTolerance) return false;
412  if (mySolverMaxIterations != src.mySolverMaxIterations) return false;
413  if (myMatrixStorage != src.myMatrixStorage) return false;
414  if (myVolumeEncoding != src.myVolumeEncoding) return false;
415  if (myPointsPrimsEncoding != src.myPointsPrimsEncoding) return false;
416  if (myDetailEncoding != src.myDetailEncoding) return false;
417  if (mySquareMatrix != src.mySquareMatrix) return false;
418  if (myRows != src.myRows) return false;
419  if (myCols != src.myCols) return false;
420  if (myRowAttribute != src.myRowAttribute) return false;
421  if (myColAttribute != src.myColAttribute) return false;
422  if (myMatrixValueAttribute != src.myMatrixValueAttribute) return false;
423  if (myVectorSrcStorage != src.myVectorSrcStorage) return false;
424  if (myVectorSrcAttribute != src.myVectorSrcAttribute) return false;
425  if (myVectorDstStorage != src.myVectorDstStorage) return false;
426  if (myVectorDstAttribute != src.myVectorDstAttribute) return false;
427  if (myPinnedGroup != src.myPinnedGroup) return false;
428  if (myReduceRows != src.myReduceRows) return false;
429  if (myScale != src.myScale) return false;
430  if (myAccumulateResult != src.myAccumulateResult) return false;
431  if (myDenseDirectSolver != src.myDenseDirectSolver) return false;
432  if (mySparseDirectSolver != src.mySparseDirectSolver) return false;
433  if (mySparseDirectSolverBackend != src.mySparseDirectSolverBackend) return false;
434  if (myDensePreconditioner != src.myDensePreconditioner) return false;
435  if (mySparsePreconditioner != src.mySparsePreconditioner) return false;
436 
437 
438  if (baseGetSignature() != src.baseGetSignature()) return false;
439 
440  return true;
441  }
443  {
444  return !operator==(src);
445  }
461 
462 
463 
464  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
465  {
466  myMode = 0;
467  if (true)
468  graph->evalOpParm(myMode, nodeidx, "mode", time, graph->isDirect()?nullptr:depnode);
469  myCookInplace = false;
470  if (true)
471  graph->evalOpParm(myCookInplace, nodeidx, "cookinplace", time, graph->isDirect()?nullptr:depnode);
472  myPrecision = 0;
473  if (true)
474  graph->evalOpParm(myPrecision, nodeidx, "precision", time, graph->isDirect()?nullptr:depnode);
475  myUseIterativeSolver = false;
476  if (true && ( (true&&!(((int64(getMode())==3))||((int64(getMode())==2))||((int64(getMode())==1)))) ) )
477  graph->evalOpParm(myUseIterativeSolver, nodeidx, "useiterativesolver", time, graph->isDirect()?nullptr:depnode);
478  myIterativeSolver = 5;
479  if (true && ( (true&&!(((int64(getMode())==3))||((int64(getMode())==2))||((getUseIterativeSolver()==0))||((int64(getMode())!=0)))) ) )
480  graph->evalOpParm(myIterativeSolver, nodeidx, "iterativesolver", time, graph->isDirect()?nullptr:depnode);
481  mySolveWithGuess = false;
482  if (true && ( (true&&!(((int64(getMode())==3))||((int64(getMode())==2))||((getUseIterativeSolver()==0))||((int64(getMode())!=0)))) ) )
483  graph->evalOpParm(mySolveWithGuess, nodeidx, "solvewithguess", time, graph->isDirect()?nullptr:depnode);
484  myUseEigensolver = false;
485  if (true && ( (true&&!(((int64(getMode())==3))||((int64(getMode())==2))||((int64(getMode())!=1)))) ) )
486  graph->evalOpParm(myUseEigensolver, nodeidx, "useeigensolver", time, graph->isDirect()?nullptr:depnode);
487  mySpectraEigensolver = 0;
488  if (true && ( (true&&!(((int64(getMode())==3))||((int64(getMode())==2))||((getUseEigensolver()==0))||((int64(getMode())!=1)))) ) )
489  graph->evalOpParm(mySpectraEigensolver, nodeidx, "spectraeigensolver", time, graph->isDirect()?nullptr:depnode);
490  myNumEigenpairs = 0;
491  if (true && ( (true&&!(((int64(getMode())==3))||((int64(getMode())==2))||((getUseEigensolver()==0))||((int64(getMode())!=1)))) ) )
492  graph->evalOpParm(myNumEigenpairs, nodeidx, "numeigenpairs", time, graph->isDirect()?nullptr:depnode);
493  myShift = -0.001;
494  if (true && ( (true&&!(((int64(getMode())==3))||((int64(getMode())==2))||((getUseEigensolver()==0))||((int64(getSpectraEigensolver())!=2)&&(int64(getSpectraEigensolver())!=3))||((int64(getMode())!=1)))) ) )
495  graph->evalOpParm(myShift, nodeidx, "shift", time, graph->isDirect()?nullptr:depnode);
496  mySolverTolerance = 1e-4;
497  if (true && ( (true&&!(((int64(getMode())==3))||((int64(getMode())==2))||((getUseIterativeSolver()==0)&&(getUseEigensolver()==0)))) ) )
498  graph->evalOpParm(mySolverTolerance, nodeidx, "solvertolerance", time, graph->isDirect()?nullptr:depnode);
499  mySolverMaxIterations = 3;
500  if (true && ( (true&&!(((int64(getMode())==3))||((int64(getMode())==2))||((getUseIterativeSolver()==0)&&(getUseEigensolver()==0)))) ) )
501  graph->evalOpParm(mySolverMaxIterations, nodeidx, "solvermaxiter", time, graph->isDirect()?nullptr:depnode);
502  myMatrixStorage = 0;
503  if (true && ( (true&&!(((int64(getMode())==2)))) ) )
504  graph->evalOpParm(myMatrixStorage, nodeidx, "matrixstorage", time, graph->isDirect()?nullptr:depnode);
505  myVolumeEncoding = 0;
506  if (true && ( (true&&!(((int64(getMode())==2))||((int64(getMatrixStorage())!=0)))) ) )
507  graph->evalOpParm(myVolumeEncoding, nodeidx, "volumeencoding", time, graph->isDirect()?nullptr:depnode);
508  myPointsPrimsEncoding = 0;
509  if (true && ( (true&&!(((int64(getMode())==2))||((int64(getMatrixStorage())!=1)&&(int64(getMatrixStorage())!=2)))) ) )
510  graph->evalOpParm(myPointsPrimsEncoding, nodeidx, "pointsprimsencoding", time, graph->isDirect()?nullptr:depnode);
511  myDetailEncoding = 0;
512  if (true && ( (true&&!(((int64(getMode())==2))||((int64(getMatrixStorage())!=3)))) ) )
513  graph->evalOpParm(myDetailEncoding, nodeidx, "detailencoding", time, graph->isDirect()?nullptr:depnode);
514  mySquareMatrix = false;
515  if (true && ( (true&&!(((int64(getMode())==2))||((int64(getMatrixStorage())==0))||((int64(getMatrixStorage())==1)&&(int64(getPointsPrimsEncoding())==0))||((int64(getMatrixStorage())==2)&&(int64(getPointsPrimsEncoding())==0))||((int64(getMatrixStorage())==1)&&(int64(getPointsPrimsEncoding())==1))||((int64(getMatrixStorage())==2)&&(int64(getPointsPrimsEncoding())==1)))) ) )
516  graph->evalOpParm(mySquareMatrix, nodeidx, "squarematrix", time, graph->isDirect()?nullptr:depnode);
517  myRows = 512;
518  if (true && ( (true&&!(((int64(getMode())==2))||((int64(getMatrixStorage())==0))||((int64(getMatrixStorage())==1)&&(int64(getPointsPrimsEncoding())!=3)&&(int64(getPointsPrimsEncoding())!=2))||((int64(getMatrixStorage())==2)&&(int64(getPointsPrimsEncoding())!=3)&&(int64(getPointsPrimsEncoding())!=2))||((getSquareMatrix()==1)&&(int64(getMatrixStorage())==1)&&(int64(getPointsPrimsEncoding())!=2))||((getSquareMatrix()==1)&&(int64(getMatrixStorage())==2)&&(int64(getPointsPrimsEncoding())!=2))||((getSquareMatrix()==1)&&(int64(getMatrixStorage())==3)&&(int64(getDetailEncoding())!=2)))) ) )
519  graph->evalOpParm(myRows, nodeidx, "rows", time, graph->isDirect()?nullptr:depnode);
520  myCols = 512;
521  if (true && ( (true&&!(((int64(getMode())==2))||((int64(getMatrixStorage())==0))||((int64(getMatrixStorage())==1)&&(int64(getPointsPrimsEncoding())!=4)&&(int64(getPointsPrimsEncoding())!=2))||((int64(getMatrixStorage())==2)&&(int64(getPointsPrimsEncoding())!=4)&&(int64(getPointsPrimsEncoding())!=2))||((getSquareMatrix()==1)&&(int64(getMatrixStorage())==1))||((getSquareMatrix()==1)&&(int64(getMatrixStorage())==2))||((getSquareMatrix()==1)&&(int64(getMatrixStorage())==3)))) ) )
522  graph->evalOpParm(myCols, nodeidx, "cols", time, graph->isDirect()?nullptr:depnode);
523  myRowAttribute = "row"_UTsh;
524  if (true && ( (true&&!(((int64(getMode())==2))||((int64(getMatrixStorage())==0))||((int64(getMatrixStorage())==1)&&(int64(getPointsPrimsEncoding())==4))||((int64(getMatrixStorage())==2)&&(int64(getPointsPrimsEncoding())==4))||((int64(getMatrixStorage())==3))||((int64(getMatrixStorage())==1)&&(int64(getPointsPrimsEncoding())==1))||((int64(getMatrixStorage())==2)&&(int64(getPointsPrimsEncoding())==1))||((int64(getMatrixStorage())==1)&&(int64(getPointsPrimsEncoding())==0))||((int64(getMatrixStorage())==2)&&(int64(getPointsPrimsEncoding())==0)))) ) )
525  graph->evalOpParm(myRowAttribute, nodeidx, "rowattr", time, graph->isDirect()?nullptr:depnode);
526  myColAttribute = "col"_UTsh;
527  if (true && ( (true&&!(((int64(getMode())==2))||((int64(getMatrixStorage())==0))||((int64(getMatrixStorage())==1)&&(int64(getPointsPrimsEncoding())==3))||((int64(getMatrixStorage())==2)&&(int64(getPointsPrimsEncoding())==3))||((int64(getMatrixStorage())==3))||((int64(getMatrixStorage())==1)&&(int64(getPointsPrimsEncoding())==1))||((int64(getMatrixStorage())==2)&&(int64(getPointsPrimsEncoding())==1))||((int64(getMatrixStorage())==1)&&(int64(getPointsPrimsEncoding())==0))||((int64(getMatrixStorage())==2)&&(int64(getPointsPrimsEncoding())==0)))) ) )
528  graph->evalOpParm(myColAttribute, nodeidx, "colattr", time, graph->isDirect()?nullptr:depnode);
529  myMatrixValueAttribute = "value"_UTsh;
530  if (true && ( (true&&!(((int64(getMode())==2)))) ) )
531  graph->evalOpParm(myMatrixValueAttribute, nodeidx, "matrixvalueattr", time, graph->isDirect()?nullptr:depnode);
532  myVectorSrcStorage = 0;
533  if (true && ( (true&&!(((int64(getMode())==1)))) ) )
534  graph->evalOpParm(myVectorSrcStorage, nodeidx, "vectorsrcstorage", time, graph->isDirect()?nullptr:depnode);
535  myVectorSrcAttribute = "known"_UTsh;
536  if (true && ( (true&&!(((int64(getMode())==1)))) ) )
537  graph->evalOpParm(myVectorSrcAttribute, nodeidx, "vectorsrcattr", time, graph->isDirect()?nullptr:depnode);
538  myVectorDstStorage = 0;
539  if (true)
540  graph->evalOpParm(myVectorDstStorage, nodeidx, "vectordststorage", time, graph->isDirect()?nullptr:depnode);
541  myVectorDstAttribute = "unknown"_UTsh;
542  if (true && ( (true&&!(((int64(getMode())==1)))) ) )
543  graph->evalOpParm(myVectorDstAttribute, nodeidx, "vectordstattr", time, graph->isDirect()?nullptr:depnode);
544  myPinnedGroup = ""_UTsh;
545  if (true && ( (true&&!(((int64(getVectorDstStorage())==2))||((int64(getMode())==3)))) ) )
546  graph->evalOpParm(myPinnedGroup, nodeidx, "pinnedgroup", time, graph->isDirect()?nullptr:depnode);
547  myReduceRows = true;
548  if (true && ( (true&&!(((int64(getVectorDstStorage())==2))||((int64(getMode())==3))||((getPinnedGroup()=="")))) ) )
549  graph->evalOpParm(myReduceRows, nodeidx, "reducerows", time, graph->isDirect()?nullptr:depnode);
550  myScale = 1;
551  if (true && ( (true&&!(((int64(getMode())==1)))) ) )
552  graph->evalOpParm(myScale, nodeidx, "scale", time, graph->isDirect()?nullptr:depnode);
553  myAccumulateResult = false;
554  if (true && ( (true&&!(((int64(getMode())==1)))) ) )
555  graph->evalOpParm(myAccumulateResult, nodeidx, "accumulateresult", time, graph->isDirect()?nullptr:depnode);
556  myDenseDirectSolver = 0;
557  if (true && ( (true&&!(((int64(getMode())==3))||((int64(getMode())==2))||((int64(getMode())==0)&&(getUseIterativeSolver()==1))||((int64(getMode())==1)&&(getUseEigensolver()==1))||((int64(getMatrixStorage())==3)&&(int64(getDetailEncoding())!=0)&&(int64(getDetailEncoding())!=1))||((int64(getMatrixStorage())==1)&&(int64(getPointsPrimsEncoding())!=0)&&(int64(getPointsPrimsEncoding())!=1))||((int64(getMatrixStorage())==2)&&(int64(getPointsPrimsEncoding())!=0)&&(int64(getPointsPrimsEncoding())!=1)))) ) )
558  graph->evalOpParm(myDenseDirectSolver, nodeidx, "densedirectsolver", time, graph->isDirect()?nullptr:depnode);
559  mySparseDirectSolver = 1;
560  if (true && ( (true&&!(((int64(getMode())==3))||((int64(getMode())==2))||((getUseIterativeSolver()==1))||((getUseEigensolver()==1))||((int64(getMatrixStorage())==0))||((int64(getMatrixStorage())==3)&&(int64(getDetailEncoding())==0))||((int64(getMatrixStorage())==3)&&(int64(getDetailEncoding())==1))||((int64(getMatrixStorage())==1)&&(int64(getPointsPrimsEncoding())==1))||((int64(getMatrixStorage())==2)&&(int64(getPointsPrimsEncoding())==1))||((int64(getMatrixStorage())==1)&&(int64(getPointsPrimsEncoding())==0))||((int64(getMatrixStorage())==2)&&(int64(getPointsPrimsEncoding())==0)))) ) )
561  graph->evalOpParm(mySparseDirectSolver, nodeidx, "sparsedirectsolver", time, graph->isDirect()?nullptr:depnode);
562  mySparseDirectSolverBackend = 0;
563  if (true && ( (true&&!(((int64(getMode())==3))||((int64(getMode())==2))||((int64(getMode())==0)&&(getUseIterativeSolver()==1))||((int64(getMatrixStorage())==0))||((int64(getMatrixStorage())==3)&&(int64(getDetailEncoding())==0))||((int64(getMatrixStorage())==3)&&(int64(getDetailEncoding())==1))||((int64(getMatrixStorage())==1)&&(int64(getPointsPrimsEncoding())==1))||((int64(getMatrixStorage())==2)&&(int64(getPointsPrimsEncoding())==1))||((int64(getMatrixStorage())==1)&&(int64(getPointsPrimsEncoding())==0))||((int64(getMatrixStorage())==2)&&(int64(getPointsPrimsEncoding())==0))||((int64(getMode())==1)))) ) )
564  graph->evalOpParm(mySparseDirectSolverBackend, nodeidx, "sparsedirectsolverbackend", time, graph->isDirect()?nullptr:depnode);
565  myDensePreconditioner = 1;
566  if (true && ( (true&&!(((int64(getMode())==3))||((int64(getMode())==2))||((getUseIterativeSolver()==0))||((int64(getMode())!=0))||((int64(getMatrixStorage())==3)&&(int64(getDetailEncoding())!=0)&&(int64(getDetailEncoding())!=1))||((int64(getMatrixStorage())==1)&&(int64(getPointsPrimsEncoding())!=0)&&(int64(getPointsPrimsEncoding())!=1))||((int64(getMatrixStorage())==2)&&(int64(getPointsPrimsEncoding())!=0)&&(int64(getPointsPrimsEncoding())!=1)))) ) )
567  graph->evalOpParm(myDensePreconditioner, nodeidx, "densepreconditioner", time, graph->isDirect()?nullptr:depnode);
568  mySparsePreconditioner = 1;
569  if (true && ( (true&&!(((int64(getMode())==3))||((int64(getMode())==2))||((getUseIterativeSolver()==0))||((int64(getMode())!=0))||((int64(getMatrixStorage())==0))||((int64(getMatrixStorage())==3)&&(int64(getDetailEncoding())==0))||((int64(getMatrixStorage())==3)&&(int64(getDetailEncoding())==1))||((int64(getMatrixStorage())==1)&&(int64(getPointsPrimsEncoding())==1))||((int64(getMatrixStorage())==2)&&(int64(getPointsPrimsEncoding())==1))||((int64(getMatrixStorage())==1)&&(int64(getPointsPrimsEncoding())==0))||((int64(getMatrixStorage())==2)&&(int64(getPointsPrimsEncoding())==0)))) ) )
570  graph->evalOpParm(mySparsePreconditioner, nodeidx, "sparsepreconditioner", time, graph->isDirect()?nullptr:depnode);
571 
572  }
573 
574 
575  void loadFromOpSubclass(const LoadParms &loadparms) override
576  {
577  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
578  }
579 
580 
581  void copyFrom(const OP_NodeParms *src) override
582  {
583  *this = *((const SOP_LinearSolverParms *)src);
584  }
585 
586  template <typename T>
587  void
588  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
589  {
590  if (idx.size() < 1)
591  return;
592  UT_ASSERT(idx.size() == instance.size()+1);
593  if (idx.size() != instance.size()+1)
594  return;
595  switch (idx[0])
596  {
597  case 0:
598  coerceValue(value, myMode);
599  break;
600  case 1:
601  coerceValue(value, myCookInplace);
602  break;
603  case 2:
604  coerceValue(value, myPrecision);
605  break;
606  case 3:
607  coerceValue(value, myUseIterativeSolver);
608  break;
609  case 4:
610  coerceValue(value, myIterativeSolver);
611  break;
612  case 5:
613  coerceValue(value, mySolveWithGuess);
614  break;
615  case 6:
616  coerceValue(value, myUseEigensolver);
617  break;
618  case 7:
619  coerceValue(value, mySpectraEigensolver);
620  break;
621  case 8:
622  coerceValue(value, myNumEigenpairs);
623  break;
624  case 9:
625  coerceValue(value, myShift);
626  break;
627  case 10:
628  coerceValue(value, mySolverTolerance);
629  break;
630  case 11:
631  coerceValue(value, mySolverMaxIterations);
632  break;
633  case 12:
634  coerceValue(value, myMatrixStorage);
635  break;
636  case 13:
637  coerceValue(value, myVolumeEncoding);
638  break;
639  case 14:
640  coerceValue(value, myPointsPrimsEncoding);
641  break;
642  case 15:
643  coerceValue(value, myDetailEncoding);
644  break;
645  case 16:
646  coerceValue(value, mySquareMatrix);
647  break;
648  case 17:
649  coerceValue(value, myRows);
650  break;
651  case 18:
652  coerceValue(value, myCols);
653  break;
654  case 19:
655  coerceValue(value, myRowAttribute);
656  break;
657  case 20:
658  coerceValue(value, myColAttribute);
659  break;
660  case 21:
661  coerceValue(value, myMatrixValueAttribute);
662  break;
663  case 22:
664  coerceValue(value, myVectorSrcStorage);
665  break;
666  case 23:
667  coerceValue(value, myVectorSrcAttribute);
668  break;
669  case 24:
670  coerceValue(value, myVectorDstStorage);
671  break;
672  case 25:
673  coerceValue(value, myVectorDstAttribute);
674  break;
675  case 26:
676  coerceValue(value, myPinnedGroup);
677  break;
678  case 27:
679  coerceValue(value, myReduceRows);
680  break;
681  case 28:
682  coerceValue(value, myScale);
683  break;
684  case 29:
685  coerceValue(value, myAccumulateResult);
686  break;
687  case 30:
688  coerceValue(value, myDenseDirectSolver);
689  break;
690  case 31:
691  coerceValue(value, mySparseDirectSolver);
692  break;
693  case 32:
694  coerceValue(value, mySparseDirectSolverBackend);
695  break;
696  case 33:
697  coerceValue(value, myDensePreconditioner);
698  break;
699  case 34:
700  coerceValue(value, mySparsePreconditioner);
701  break;
702 
703  }
704  }
705 
706  bool isParmColorRamp(exint idx) const override
707  {
708  switch (idx)
709  {
710 
711  }
712  return false;
713  }
714 
715  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
716  { doGetParmValue(idx, instance, value); }
717  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
718  { doGetParmValue(idx, instance, value); }
719  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
720  { doGetParmValue(idx, instance, value); }
721  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
722  { doGetParmValue(idx, instance, value); }
723  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
724  { doGetParmValue(idx, instance, value); }
725  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
726  { doGetParmValue(idx, instance, value); }
727  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
728  { doGetParmValue(idx, instance, value); }
729  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
730  { doGetParmValue(idx, instance, value); }
731  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
732  { doGetParmValue(idx, instance, value); }
733  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
734  { doGetParmValue(idx, instance, value); }
735  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
736  { doGetParmValue(idx, instance, value); }
737 
738  template <typename T>
739  void
740  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
741  {
742  if (idx.size() < 1)
743  return;
744  UT_ASSERT(idx.size() == instance.size()+1);
745  if (idx.size() != instance.size()+1)
746  return;
747  switch (idx[0])
748  {
749  case 0:
750  coerceValue(myMode, clampMinValue(0, clampMaxValue(3, value ) ));
751  break;
752  case 1:
753  coerceValue(myCookInplace, ( ( value ) ));
754  break;
755  case 2:
756  coerceValue(myPrecision, clampMinValue(0, clampMaxValue(2, value ) ));
757  break;
758  case 3:
759  coerceValue(myUseIterativeSolver, ( ( value ) ));
760  break;
761  case 4:
762  coerceValue(myIterativeSolver, clampMinValue(0, clampMaxValue(6, value ) ));
763  break;
764  case 5:
765  coerceValue(mySolveWithGuess, ( ( value ) ));
766  break;
767  case 6:
768  coerceValue(myUseEigensolver, ( ( value ) ));
769  break;
770  case 7:
771  coerceValue(mySpectraEigensolver, clampMinValue(0, clampMaxValue(3, value ) ));
772  break;
773  case 8:
774  coerceValue(myNumEigenpairs, clampMinValue(1, ( value ) ));
775  break;
776  case 9:
777  coerceValue(myShift, ( ( value ) ));
778  break;
779  case 10:
780  coerceValue(mySolverTolerance, clampMinValue(0, ( value ) ));
781  break;
782  case 11:
783  coerceValue(mySolverMaxIterations, clampMinValue(1, ( value ) ));
784  break;
785  case 12:
786  coerceValue(myMatrixStorage, clampMinValue(0, clampMaxValue(3, value ) ));
787  break;
788  case 13:
789  coerceValue(myVolumeEncoding, clampMinValue(0, clampMaxValue(1, value ) ));
790  break;
791  case 14:
792  coerceValue(myPointsPrimsEncoding, clampMinValue(0, clampMaxValue(4, value ) ));
793  break;
794  case 15:
795  coerceValue(myDetailEncoding, clampMinValue(0, clampMaxValue(2, value ) ));
796  break;
797  case 16:
798  coerceValue(mySquareMatrix, ( ( value ) ));
799  break;
800  case 17:
801  coerceValue(myRows, clampMinValue(1, ( value ) ));
802  break;
803  case 18:
804  coerceValue(myCols, clampMinValue(1, ( value ) ));
805  break;
806  case 19:
807  coerceValue(myRowAttribute, ( ( value ) ));
808  break;
809  case 20:
810  coerceValue(myColAttribute, ( ( value ) ));
811  break;
812  case 21:
813  coerceValue(myMatrixValueAttribute, ( ( value ) ));
814  break;
815  case 22:
816  coerceValue(myVectorSrcStorage, clampMinValue(0, clampMaxValue(2, value ) ));
817  break;
818  case 23:
819  coerceValue(myVectorSrcAttribute, ( ( value ) ));
820  break;
821  case 24:
822  coerceValue(myVectorDstStorage, clampMinValue(0, clampMaxValue(2, value ) ));
823  break;
824  case 25:
825  coerceValue(myVectorDstAttribute, ( ( value ) ));
826  break;
827  case 26:
828  coerceValue(myPinnedGroup, ( ( value ) ));
829  break;
830  case 27:
831  coerceValue(myReduceRows, ( ( value ) ));
832  break;
833  case 28:
834  coerceValue(myScale, ( ( value ) ));
835  break;
836  case 29:
837  coerceValue(myAccumulateResult, ( ( value ) ));
838  break;
839  case 30:
840  coerceValue(myDenseDirectSolver, clampMinValue(0, clampMaxValue(11, value ) ));
841  break;
842  case 31:
843  coerceValue(mySparseDirectSolver, clampMinValue(0, clampMaxValue(3, value ) ));
844  break;
845  case 32:
846  coerceValue(mySparseDirectSolverBackend, clampMinValue(0, clampMaxValue(1, value ) ));
847  break;
848  case 33:
849  coerceValue(myDensePreconditioner, clampMinValue(0, clampMaxValue(1, value ) ));
850  break;
851  case 34:
852  coerceValue(mySparsePreconditioner, clampMinValue(0, clampMaxValue(3, value ) ));
853  break;
854 
855  }
856  }
857 
858  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
859  { doSetParmValue(idx, instance, value); }
860  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
861  { doSetParmValue(idx, instance, value); }
862  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
863  { doSetParmValue(idx, instance, value); }
864  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
865  { doSetParmValue(idx, instance, value); }
866  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
867  { doSetParmValue(idx, instance, value); }
868  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
869  { doSetParmValue(idx, instance, value); }
870  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
871  { doSetParmValue(idx, instance, value); }
872  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
873  { doSetParmValue(idx, instance, value); }
874  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
875  { doSetParmValue(idx, instance, value); }
876  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
877  { doSetParmValue(idx, instance, value); }
878  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
879  { doSetParmValue(idx, instance, value); }
880 
881  exint getNestNumParms(TempIndex idx) const override
882  {
883  if (idx.size() == 0)
884  return 35;
885  switch (idx[0])
886  {
887 
888  }
889  // Invalid
890  return 0;
891  }
892 
893  const char *getNestParmName(TempIndex fieldnum) const override
894  {
895  if (fieldnum.size() < 1)
896  return 0;
897  switch (fieldnum[0])
898  {
899  case 0:
900  return "mode";
901  case 1:
902  return "cookinplace";
903  case 2:
904  return "precision";
905  case 3:
906  return "useiterativesolver";
907  case 4:
908  return "iterativesolver";
909  case 5:
910  return "solvewithguess";
911  case 6:
912  return "useeigensolver";
913  case 7:
914  return "spectraeigensolver";
915  case 8:
916  return "numeigenpairs";
917  case 9:
918  return "shift";
919  case 10:
920  return "solvertolerance";
921  case 11:
922  return "solvermaxiter";
923  case 12:
924  return "matrixstorage";
925  case 13:
926  return "volumeencoding";
927  case 14:
928  return "pointsprimsencoding";
929  case 15:
930  return "detailencoding";
931  case 16:
932  return "squarematrix";
933  case 17:
934  return "rows";
935  case 18:
936  return "cols";
937  case 19:
938  return "rowattr";
939  case 20:
940  return "colattr";
941  case 21:
942  return "matrixvalueattr";
943  case 22:
944  return "vectorsrcstorage";
945  case 23:
946  return "vectorsrcattr";
947  case 24:
948  return "vectordststorage";
949  case 25:
950  return "vectordstattr";
951  case 26:
952  return "pinnedgroup";
953  case 27:
954  return "reducerows";
955  case 28:
956  return "scale";
957  case 29:
958  return "accumulateresult";
959  case 30:
960  return "densedirectsolver";
961  case 31:
962  return "sparsedirectsolver";
963  case 32:
964  return "sparsedirectsolverbackend";
965  case 33:
966  return "densepreconditioner";
967  case 34:
968  return "sparsepreconditioner";
969 
970  }
971  return 0;
972  }
973 
974  ParmType getNestParmType(TempIndex fieldnum) const override
975  {
976  if (fieldnum.size() < 1)
977  return PARM_UNSUPPORTED;
978  switch (fieldnum[0])
979  {
980  case 0:
981  return PARM_INTEGER;
982  case 1:
983  return PARM_INTEGER;
984  case 2:
985  return PARM_INTEGER;
986  case 3:
987  return PARM_INTEGER;
988  case 4:
989  return PARM_INTEGER;
990  case 5:
991  return PARM_INTEGER;
992  case 6:
993  return PARM_INTEGER;
994  case 7:
995  return PARM_INTEGER;
996  case 8:
997  return PARM_INTEGER;
998  case 9:
999  return PARM_FLOAT;
1000  case 10:
1001  return PARM_FLOAT;
1002  case 11:
1003  return PARM_INTEGER;
1004  case 12:
1005  return PARM_INTEGER;
1006  case 13:
1007  return PARM_INTEGER;
1008  case 14:
1009  return PARM_INTEGER;
1010  case 15:
1011  return PARM_INTEGER;
1012  case 16:
1013  return PARM_INTEGER;
1014  case 17:
1015  return PARM_INTEGER;
1016  case 18:
1017  return PARM_INTEGER;
1018  case 19:
1019  return PARM_STRING;
1020  case 20:
1021  return PARM_STRING;
1022  case 21:
1023  return PARM_STRING;
1024  case 22:
1025  return PARM_INTEGER;
1026  case 23:
1027  return PARM_STRING;
1028  case 24:
1029  return PARM_INTEGER;
1030  case 25:
1031  return PARM_STRING;
1032  case 26:
1033  return PARM_STRING;
1034  case 27:
1035  return PARM_INTEGER;
1036  case 28:
1037  return PARM_FLOAT;
1038  case 29:
1039  return PARM_INTEGER;
1040  case 30:
1041  return PARM_INTEGER;
1042  case 31:
1043  return PARM_INTEGER;
1044  case 32:
1045  return PARM_INTEGER;
1046  case 33:
1047  return PARM_INTEGER;
1048  case 34:
1049  return PARM_INTEGER;
1050 
1051  }
1052  return PARM_UNSUPPORTED;
1053  }
1054 
1055  // Boiler plate to load individual types.
1056  static void loadData(UT_IStream &is, int64 &v)
1057  { is.bread(&v, 1); }
1058  static void loadData(UT_IStream &is, bool &v)
1059  { int64 iv; is.bread(&iv, 1); v = iv; }
1060  static void loadData(UT_IStream &is, fpreal64 &v)
1061  { is.bread<fpreal64>(&v, 1); }
1062  static void loadData(UT_IStream &is, UT_Vector2D &v)
1063  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
1064  static void loadData(UT_IStream &is, UT_Vector3D &v)
1065  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
1066  is.bread<fpreal64>(&v.z(), 1); }
1067  static void loadData(UT_IStream &is, UT_Vector4D &v)
1068  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
1069  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
1070  static void loadData(UT_IStream &is, UT_Matrix2D &v)
1071  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
1072  static void loadData(UT_IStream &is, UT_Matrix3D &v)
1073  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
1074  static void loadData(UT_IStream &is, UT_Matrix4D &v)
1075  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
1076  static void loadData(UT_IStream &is, UT_Vector2I &v)
1077  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
1078  static void loadData(UT_IStream &is, UT_Vector3I &v)
1079  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
1080  is.bread<int64>(&v.z(), 1); }
1081  static void loadData(UT_IStream &is, UT_Vector4I &v)
1082  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
1083  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
1085  { is.bread(v); }
1087  { UT_StringHolder rampdata;
1088  loadData(is, rampdata);
1089  if (rampdata.isstring())
1090  {
1091  v.reset(new UT_Ramp());
1092  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
1093  v->load(istr);
1094  }
1095  else v.reset();
1096  }
1099  loadData(is, data);
1100  if (data.isstring())
1101  {
1102  // Find the data type.
1103  const char *colon = UT_StringWrap(data).findChar(':');
1104  if (colon)
1105  {
1106  int typelen = colon - data.buffer();
1108  type.strncpy(data.buffer(), typelen);
1109  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
1110 
1111  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
1112  }
1113  }
1114  else v.reset();
1115  }
1116 
1117  static void saveData(std::ostream &os, int64 v)
1118  { UTwrite(os, &v); }
1119  static void saveData(std::ostream &os, bool v)
1120  { int64 iv = v; UTwrite(os, &iv); }
1121  static void saveData(std::ostream &os, fpreal64 v)
1122  { UTwrite<fpreal64>(os, &v); }
1123  static void saveData(std::ostream &os, UT_Vector2D v)
1124  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
1125  static void saveData(std::ostream &os, UT_Vector3D v)
1126  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
1127  UTwrite<fpreal64>(os, &v.z()); }
1128  static void saveData(std::ostream &os, UT_Vector4D v)
1129  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
1130  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
1131  static void saveData(std::ostream &os, UT_Matrix2D v)
1133  static void saveData(std::ostream &os, UT_Matrix3D v)
1135  static void saveData(std::ostream &os, UT_Matrix4D v)
1137  static void saveData(std::ostream &os, UT_StringHolder s)
1138  { UT_StringWrap(s).saveBinary(os); }
1139  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
1141  UT_OStringStream ostr;
1142  if (s) s->save(ostr);
1143  result = ostr.str();
1144  saveData(os, result);
1145  }
1146  static void saveData(std::ostream &os, PRM_DataItemHandle s)
1148  UT_OStringStream ostr;
1149  if (s)
1150  {
1151  ostr << s->getDataTypeToken();
1152  ostr << ":";
1153  s->saveBinary(ostr);
1154  }
1155  result = ostr.str();
1156  saveData(os, result);
1157  }
1158 
1159 
1160  void save(std::ostream &os) const
1161  {
1162  int32 v = version();
1163  UTwrite(os, &v);
1164  saveData(os, myMode);
1165  saveData(os, myCookInplace);
1166  saveData(os, myPrecision);
1167  saveData(os, myUseIterativeSolver);
1168  saveData(os, myIterativeSolver);
1169  saveData(os, mySolveWithGuess);
1170  saveData(os, myUseEigensolver);
1171  saveData(os, mySpectraEigensolver);
1172  saveData(os, myNumEigenpairs);
1173  saveData(os, myShift);
1174  saveData(os, mySolverTolerance);
1175  saveData(os, mySolverMaxIterations);
1176  saveData(os, myMatrixStorage);
1177  saveData(os, myVolumeEncoding);
1178  saveData(os, myPointsPrimsEncoding);
1179  saveData(os, myDetailEncoding);
1180  saveData(os, mySquareMatrix);
1181  saveData(os, myRows);
1182  saveData(os, myCols);
1183  saveData(os, myRowAttribute);
1184  saveData(os, myColAttribute);
1185  saveData(os, myMatrixValueAttribute);
1186  saveData(os, myVectorSrcStorage);
1187  saveData(os, myVectorSrcAttribute);
1188  saveData(os, myVectorDstStorage);
1189  saveData(os, myVectorDstAttribute);
1190  saveData(os, myPinnedGroup);
1191  saveData(os, myReduceRows);
1192  saveData(os, myScale);
1193  saveData(os, myAccumulateResult);
1194  saveData(os, myDenseDirectSolver);
1195  saveData(os, mySparseDirectSolver);
1196  saveData(os, mySparseDirectSolverBackend);
1197  saveData(os, myDensePreconditioner);
1198  saveData(os, mySparsePreconditioner);
1199 
1200  }
1201 
1202  bool load(UT_IStream &is)
1203  {
1204  int32 v;
1205  is.bread(&v, 1);
1206  if (version() != v)
1207  {
1208  // Fail incompatible versions
1209  return false;
1210  }
1211  loadData(is, myMode);
1212  loadData(is, myCookInplace);
1213  loadData(is, myPrecision);
1214  loadData(is, myUseIterativeSolver);
1215  loadData(is, myIterativeSolver);
1216  loadData(is, mySolveWithGuess);
1217  loadData(is, myUseEigensolver);
1218  loadData(is, mySpectraEigensolver);
1219  loadData(is, myNumEigenpairs);
1220  loadData(is, myShift);
1221  loadData(is, mySolverTolerance);
1222  loadData(is, mySolverMaxIterations);
1223  loadData(is, myMatrixStorage);
1224  loadData(is, myVolumeEncoding);
1225  loadData(is, myPointsPrimsEncoding);
1226  loadData(is, myDetailEncoding);
1227  loadData(is, mySquareMatrix);
1228  loadData(is, myRows);
1229  loadData(is, myCols);
1230  loadData(is, myRowAttribute);
1231  loadData(is, myColAttribute);
1232  loadData(is, myMatrixValueAttribute);
1233  loadData(is, myVectorSrcStorage);
1234  loadData(is, myVectorSrcAttribute);
1235  loadData(is, myVectorDstStorage);
1236  loadData(is, myVectorDstAttribute);
1237  loadData(is, myPinnedGroup);
1238  loadData(is, myReduceRows);
1239  loadData(is, myScale);
1240  loadData(is, myAccumulateResult);
1241  loadData(is, myDenseDirectSolver);
1242  loadData(is, mySparseDirectSolver);
1243  loadData(is, mySparseDirectSolverBackend);
1244  loadData(is, myDensePreconditioner);
1245  loadData(is, mySparsePreconditioner);
1246 
1247  return true;
1248  }
1249 
1250  Mode getMode() const { return Mode(myMode); }
1251  void setMode(Mode val) { myMode = int64(val); }
1252  Mode opMode(const SOP_NodeVerb::CookParms &cookparms) const
1253  {
1254  SOP_Node *thissop = cookparms.getNode();
1255  if (!thissop) return getMode();
1256  int64 result;
1257  OP_Utils::evalOpParm(result, thissop, "mode", cookparms.getCookTime(), 0);
1258  return Mode(result);
1259  }
1260  bool getCookInplace() const { return myCookInplace; }
1261  void setCookInplace(bool val) { myCookInplace = val; }
1262  bool opCookInplace(const SOP_NodeVerb::CookParms &cookparms) const
1263  {
1264  SOP_Node *thissop = cookparms.getNode();
1265  if (!thissop) return getCookInplace();
1266  bool result;
1267  OP_Utils::evalOpParm(result, thissop, "cookinplace", cookparms.getCookTime(), 0);
1268  return result;
1269  }
1270  Precision getPrecision() const { return Precision(myPrecision); }
1271  void setPrecision(Precision val) { myPrecision = int64(val); }
1273  {
1274  SOP_Node *thissop = cookparms.getNode();
1275  if (!thissop) return getPrecision();
1276  int64 result;
1277  OP_Utils::evalOpParm(result, thissop, "precision", cookparms.getCookTime(), 0);
1278  return Precision(result);
1279  }
1280  bool getUseIterativeSolver() const { return myUseIterativeSolver; }
1281  void setUseIterativeSolver(bool val) { myUseIterativeSolver = val; }
1282  bool opUseIterativeSolver(const SOP_NodeVerb::CookParms &cookparms) const
1283  {
1284  SOP_Node *thissop = cookparms.getNode();
1285  if (!thissop) return getUseIterativeSolver();
1286  bool result;
1287  OP_Utils::evalOpParm(result, thissop, "useiterativesolver", cookparms.getCookTime(), 0);
1288  return result;
1289  }
1290  IterativeSolver getIterativeSolver() const { return IterativeSolver(myIterativeSolver); }
1291  void setIterativeSolver(IterativeSolver val) { myIterativeSolver = int64(val); }
1293  {
1294  SOP_Node *thissop = cookparms.getNode();
1295  if (!thissop) return getIterativeSolver();
1296  int64 result;
1297  OP_Utils::evalOpParm(result, thissop, "iterativesolver", cookparms.getCookTime(), 0);
1298  return IterativeSolver(result);
1299  }
1300  bool getSolveWithGuess() const { return mySolveWithGuess; }
1301  void setSolveWithGuess(bool val) { mySolveWithGuess = val; }
1302  bool opSolveWithGuess(const SOP_NodeVerb::CookParms &cookparms) const
1303  {
1304  SOP_Node *thissop = cookparms.getNode();
1305  if (!thissop) return getSolveWithGuess();
1306  bool result;
1307  OP_Utils::evalOpParm(result, thissop, "solvewithguess", cookparms.getCookTime(), 0);
1308  return result;
1309  }
1310  bool getUseEigensolver() const { return myUseEigensolver; }
1311  void setUseEigensolver(bool val) { myUseEigensolver = val; }
1312  bool opUseEigensolver(const SOP_NodeVerb::CookParms &cookparms) const
1313  {
1314  SOP_Node *thissop = cookparms.getNode();
1315  if (!thissop) return getUseEigensolver();
1316  bool result;
1317  OP_Utils::evalOpParm(result, thissop, "useeigensolver", cookparms.getCookTime(), 0);
1318  return result;
1319  }
1320  SpectraEigensolver getSpectraEigensolver() const { return SpectraEigensolver(mySpectraEigensolver); }
1321  void setSpectraEigensolver(SpectraEigensolver val) { mySpectraEigensolver = int64(val); }
1323  {
1324  SOP_Node *thissop = cookparms.getNode();
1325  if (!thissop) return getSpectraEigensolver();
1326  int64 result;
1327  OP_Utils::evalOpParm(result, thissop, "spectraeigensolver", cookparms.getCookTime(), 0);
1328  return SpectraEigensolver(result);
1329  }
1330  int64 getNumEigenpairs() const { return myNumEigenpairs; }
1331  void setNumEigenpairs(int64 val) { myNumEigenpairs = val; }
1333  {
1334  SOP_Node *thissop = cookparms.getNode();
1335  if (!thissop) return getNumEigenpairs();
1336  int64 result;
1337  OP_Utils::evalOpParm(result, thissop, "numeigenpairs", cookparms.getCookTime(), 0);
1338  return result;
1339  }
1340  fpreal64 getShift() const { return myShift; }
1341  void setShift(fpreal64 val) { myShift = val; }
1342  fpreal64 opShift(const SOP_NodeVerb::CookParms &cookparms) const
1343  {
1344  SOP_Node *thissop = cookparms.getNode();
1345  if (!thissop) return getShift();
1346  fpreal64 result;
1347  OP_Utils::evalOpParm(result, thissop, "shift", cookparms.getCookTime(), 0);
1348  return result;
1349  }
1350  fpreal64 getSolverTolerance() const { return mySolverTolerance; }
1351  void setSolverTolerance(fpreal64 val) { mySolverTolerance = val; }
1353  {
1354  SOP_Node *thissop = cookparms.getNode();
1355  if (!thissop) return getSolverTolerance();
1356  fpreal64 result;
1357  OP_Utils::evalOpParm(result, thissop, "solvertolerance", cookparms.getCookTime(), 0);
1358  return result;
1359  }
1360  int64 getSolverMaxIterations() const { return mySolverMaxIterations; }
1361  void setSolverMaxIterations(int64 val) { mySolverMaxIterations = val; }
1363  {
1364  SOP_Node *thissop = cookparms.getNode();
1365  if (!thissop) return getSolverMaxIterations();
1366  int64 result;
1367  OP_Utils::evalOpParm(result, thissop, "solvermaxiter", cookparms.getCookTime(), 0);
1368  return result;
1369  }
1370  MatrixStorage getMatrixStorage() const { return MatrixStorage(myMatrixStorage); }
1371  void setMatrixStorage(MatrixStorage val) { myMatrixStorage = int64(val); }
1373  {
1374  SOP_Node *thissop = cookparms.getNode();
1375  if (!thissop) return getMatrixStorage();
1376  int64 result;
1377  OP_Utils::evalOpParm(result, thissop, "matrixstorage", cookparms.getCookTime(), 0);
1378  return MatrixStorage(result);
1379  }
1380  VolumeEncoding getVolumeEncoding() const { return VolumeEncoding(myVolumeEncoding); }
1381  void setVolumeEncoding(VolumeEncoding val) { myVolumeEncoding = int64(val); }
1383  {
1384  SOP_Node *thissop = cookparms.getNode();
1385  if (!thissop) return getVolumeEncoding();
1386  int64 result;
1387  OP_Utils::evalOpParm(result, thissop, "volumeencoding", cookparms.getCookTime(), 0);
1388  return VolumeEncoding(result);
1389  }
1390  PointsPrimsEncoding getPointsPrimsEncoding() const { return PointsPrimsEncoding(myPointsPrimsEncoding); }
1391  void setPointsPrimsEncoding(PointsPrimsEncoding val) { myPointsPrimsEncoding = int64(val); }
1393  {
1394  SOP_Node *thissop = cookparms.getNode();
1395  if (!thissop) return getPointsPrimsEncoding();
1396  int64 result;
1397  OP_Utils::evalOpParm(result, thissop, "pointsprimsencoding", cookparms.getCookTime(), 0);
1398  return PointsPrimsEncoding(result);
1399  }
1400  DetailEncoding getDetailEncoding() const { return DetailEncoding(myDetailEncoding); }
1401  void setDetailEncoding(DetailEncoding val) { myDetailEncoding = int64(val); }
1403  {
1404  SOP_Node *thissop = cookparms.getNode();
1405  if (!thissop) return getDetailEncoding();
1406  int64 result;
1407  OP_Utils::evalOpParm(result, thissop, "detailencoding", cookparms.getCookTime(), 0);
1408  return DetailEncoding(result);
1409  }
1410  bool getSquareMatrix() const { return mySquareMatrix; }
1411  void setSquareMatrix(bool val) { mySquareMatrix = val; }
1412  bool opSquareMatrix(const SOP_NodeVerb::CookParms &cookparms) const
1413  {
1414  SOP_Node *thissop = cookparms.getNode();
1415  if (!thissop) return getSquareMatrix();
1416  bool result;
1417  OP_Utils::evalOpParm(result, thissop, "squarematrix", cookparms.getCookTime(), 0);
1418  return result;
1419  }
1420  int64 getRows() const { return myRows; }
1421  void setRows(int64 val) { myRows = val; }
1422  int64 opRows(const SOP_NodeVerb::CookParms &cookparms) const
1423  {
1424  SOP_Node *thissop = cookparms.getNode();
1425  if (!thissop) return getRows();
1426  int64 result;
1427  OP_Utils::evalOpParm(result, thissop, "rows", cookparms.getCookTime(), 0);
1428  return result;
1429  }
1430  int64 getCols() const { return myCols; }
1431  void setCols(int64 val) { myCols = val; }
1432  int64 opCols(const SOP_NodeVerb::CookParms &cookparms) const
1433  {
1434  SOP_Node *thissop = cookparms.getNode();
1435  if (!thissop) return getCols();
1436  int64 result;
1437  OP_Utils::evalOpParm(result, thissop, "cols", cookparms.getCookTime(), 0);
1438  return result;
1439  }
1440  const UT_StringHolder & getRowAttribute() const { return myRowAttribute; }
1441  void setRowAttribute(const UT_StringHolder & val) { myRowAttribute = val; }
1443  {
1444  SOP_Node *thissop = cookparms.getNode();
1445  if (!thissop) return getRowAttribute();
1447  OP_Utils::evalOpParm(result, thissop, "rowattr", cookparms.getCookTime(), 0);
1448  return result;
1449  }
1450  const UT_StringHolder & getColAttribute() const { return myColAttribute; }
1451  void setColAttribute(const UT_StringHolder & val) { myColAttribute = val; }
1453  {
1454  SOP_Node *thissop = cookparms.getNode();
1455  if (!thissop) return getColAttribute();
1457  OP_Utils::evalOpParm(result, thissop, "colattr", cookparms.getCookTime(), 0);
1458  return result;
1459  }
1460  const UT_StringHolder & getMatrixValueAttribute() const { return myMatrixValueAttribute; }
1461  void setMatrixValueAttribute(const UT_StringHolder & val) { myMatrixValueAttribute = val; }
1463  {
1464  SOP_Node *thissop = cookparms.getNode();
1465  if (!thissop) return getMatrixValueAttribute();
1467  OP_Utils::evalOpParm(result, thissop, "matrixvalueattr", cookparms.getCookTime(), 0);
1468  return result;
1469  }
1470  VectorSrcStorage getVectorSrcStorage() const { return VectorSrcStorage(myVectorSrcStorage); }
1471  void setVectorSrcStorage(VectorSrcStorage val) { myVectorSrcStorage = int64(val); }
1473  {
1474  SOP_Node *thissop = cookparms.getNode();
1475  if (!thissop) return getVectorSrcStorage();
1476  int64 result;
1477  OP_Utils::evalOpParm(result, thissop, "vectorsrcstorage", cookparms.getCookTime(), 0);
1478  return VectorSrcStorage(result);
1479  }
1480  const UT_StringHolder & getVectorSrcAttribute() const { return myVectorSrcAttribute; }
1481  void setVectorSrcAttribute(const UT_StringHolder & val) { myVectorSrcAttribute = val; }
1483  {
1484  SOP_Node *thissop = cookparms.getNode();
1485  if (!thissop) return getVectorSrcAttribute();
1487  OP_Utils::evalOpParm(result, thissop, "vectorsrcattr", cookparms.getCookTime(), 0);
1488  return result;
1489  }
1490  VectorDstStorage getVectorDstStorage() const { return VectorDstStorage(myVectorDstStorage); }
1491  void setVectorDstStorage(VectorDstStorage val) { myVectorDstStorage = int64(val); }
1493  {
1494  SOP_Node *thissop = cookparms.getNode();
1495  if (!thissop) return getVectorDstStorage();
1496  int64 result;
1497  OP_Utils::evalOpParm(result, thissop, "vectordststorage", cookparms.getCookTime(), 0);
1498  return VectorDstStorage(result);
1499  }
1500  const UT_StringHolder & getVectorDstAttribute() const { return myVectorDstAttribute; }
1501  void setVectorDstAttribute(const UT_StringHolder & val) { myVectorDstAttribute = val; }
1503  {
1504  SOP_Node *thissop = cookparms.getNode();
1505  if (!thissop) return getVectorDstAttribute();
1507  OP_Utils::evalOpParm(result, thissop, "vectordstattr", cookparms.getCookTime(), 0);
1508  return result;
1509  }
1510  const UT_StringHolder & getPinnedGroup() const { return myPinnedGroup; }
1511  void setPinnedGroup(const UT_StringHolder & val) { myPinnedGroup = val; }
1513  {
1514  SOP_Node *thissop = cookparms.getNode();
1515  if (!thissop) return getPinnedGroup();
1517  OP_Utils::evalOpParm(result, thissop, "pinnedgroup", cookparms.getCookTime(), 0);
1518  return result;
1519  }
1520  bool getReduceRows() const { return myReduceRows; }
1521  void setReduceRows(bool val) { myReduceRows = val; }
1522  bool opReduceRows(const SOP_NodeVerb::CookParms &cookparms) const
1523  {
1524  SOP_Node *thissop = cookparms.getNode();
1525  if (!thissop) return getReduceRows();
1526  bool result;
1527  OP_Utils::evalOpParm(result, thissop, "reducerows", cookparms.getCookTime(), 0);
1528  return result;
1529  }
1530  fpreal64 getScale() const { return myScale; }
1531  void setScale(fpreal64 val) { myScale = val; }
1532  fpreal64 opScale(const SOP_NodeVerb::CookParms &cookparms) const
1533  {
1534  SOP_Node *thissop = cookparms.getNode();
1535  if (!thissop) return getScale();
1536  fpreal64 result;
1537  OP_Utils::evalOpParm(result, thissop, "scale", cookparms.getCookTime(), 0);
1538  return result;
1539  }
1540  bool getAccumulateResult() const { return myAccumulateResult; }
1541  void setAccumulateResult(bool val) { myAccumulateResult = val; }
1542  bool opAccumulateResult(const SOP_NodeVerb::CookParms &cookparms) const
1543  {
1544  SOP_Node *thissop = cookparms.getNode();
1545  if (!thissop) return getAccumulateResult();
1546  bool result;
1547  OP_Utils::evalOpParm(result, thissop, "accumulateresult", cookparms.getCookTime(), 0);
1548  return result;
1549  }
1550  DenseDirectSolver getDenseDirectSolver() const { return DenseDirectSolver(myDenseDirectSolver); }
1551  void setDenseDirectSolver(DenseDirectSolver val) { myDenseDirectSolver = int64(val); }
1553  {
1554  SOP_Node *thissop = cookparms.getNode();
1555  if (!thissop) return getDenseDirectSolver();
1556  int64 result;
1557  OP_Utils::evalOpParm(result, thissop, "densedirectsolver", cookparms.getCookTime(), 0);
1558  return DenseDirectSolver(result);
1559  }
1560  SparseDirectSolver getSparseDirectSolver() const { return SparseDirectSolver(mySparseDirectSolver); }
1561  void setSparseDirectSolver(SparseDirectSolver val) { mySparseDirectSolver = int64(val); }
1563  {
1564  SOP_Node *thissop = cookparms.getNode();
1565  if (!thissop) return getSparseDirectSolver();
1566  int64 result;
1567  OP_Utils::evalOpParm(result, thissop, "sparsedirectsolver", cookparms.getCookTime(), 0);
1568  return SparseDirectSolver(result);
1569  }
1571  void setSparseDirectSolverBackend(SparseDirectSolverBackend val) { mySparseDirectSolverBackend = int64(val); }
1573  {
1574  SOP_Node *thissop = cookparms.getNode();
1575  if (!thissop) return getSparseDirectSolverBackend();
1576  int64 result;
1577  OP_Utils::evalOpParm(result, thissop, "sparsedirectsolverbackend", cookparms.getCookTime(), 0);
1578  return SparseDirectSolverBackend(result);
1579  }
1580  DensePreconditioner getDensePreconditioner() const { return DensePreconditioner(myDensePreconditioner); }
1581  void setDensePreconditioner(DensePreconditioner val) { myDensePreconditioner = int64(val); }
1583  {
1584  SOP_Node *thissop = cookparms.getNode();
1585  if (!thissop) return getDensePreconditioner();
1586  int64 result;
1587  OP_Utils::evalOpParm(result, thissop, "densepreconditioner", cookparms.getCookTime(), 0);
1588  return DensePreconditioner(result);
1589  }
1590  SparsePreconditioner getSparsePreconditioner() const { return SparsePreconditioner(mySparsePreconditioner); }
1591  void setSparsePreconditioner(SparsePreconditioner val) { mySparsePreconditioner = int64(val); }
1593  {
1594  SOP_Node *thissop = cookparms.getNode();
1595  if (!thissop) return getSparsePreconditioner();
1596  int64 result;
1597  OP_Utils::evalOpParm(result, thissop, "sparsepreconditioner", cookparms.getCookTime(), 0);
1598  return SparsePreconditioner(result);
1599  }
1600 
1601 private:
1602  int64 myMode;
1603  bool myCookInplace;
1604  int64 myPrecision;
1605  bool myUseIterativeSolver;
1606  int64 myIterativeSolver;
1607  bool mySolveWithGuess;
1608  bool myUseEigensolver;
1609  int64 mySpectraEigensolver;
1610  int64 myNumEigenpairs;
1611  fpreal64 myShift;
1612  fpreal64 mySolverTolerance;
1613  int64 mySolverMaxIterations;
1614  int64 myMatrixStorage;
1615  int64 myVolumeEncoding;
1616  int64 myPointsPrimsEncoding;
1617  int64 myDetailEncoding;
1618  bool mySquareMatrix;
1619  int64 myRows;
1620  int64 myCols;
1621  UT_StringHolder myRowAttribute;
1622  UT_StringHolder myColAttribute;
1623  UT_StringHolder myMatrixValueAttribute;
1624  int64 myVectorSrcStorage;
1625  UT_StringHolder myVectorSrcAttribute;
1626  int64 myVectorDstStorage;
1627  UT_StringHolder myVectorDstAttribute;
1628  UT_StringHolder myPinnedGroup;
1629  bool myReduceRows;
1630  fpreal64 myScale;
1631  bool myAccumulateResult;
1632  int64 myDenseDirectSolver;
1633  int64 mySparseDirectSolver;
1634  int64 mySparseDirectSolverBackend;
1635  int64 myDensePreconditioner;
1636  int64 mySparsePreconditioner;
1637 
1638 };
type
Definition: core.h:556
Precision opPrecision(const SOP_NodeVerb::CookParms &cookparms) const
void setPointsPrimsEncoding(PointsPrimsEncoding val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
UT_StringHolder opMatrixValueAttribute(const SOP_NodeVerb::CookParms &cookparms) const
SparseDirectSolverBackend opSparseDirectSolverBackend(const SOP_NodeVerb::CookParms &cookparms) const
VectorDstStorage getVectorDstStorage() const
static void loadData(UT_IStream &is, UT_Vector3I &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
static void loadData(UT_IStream &is, int64 &v)
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
const char * getNestParmName(TempIndex fieldnum) const override
static void saveData(std::ostream &os, UT_Vector3D v)
void setDensePreconditioner(DensePreconditioner val)
SpectraEigensolver getSpectraEigensolver() const
static void loadData(UT_IStream &is, UT_Vector2D &v)
static void loadData(UT_IStream &is, UT_Vector4I &v)
void setIterativeSolver(IterativeSolver val)
fpreal64 getSolverTolerance() const
bool opCookInplace(const SOP_NodeVerb::CookParms &cookparms) const
exint bread(int32 *buffer, exint asize=1)
GLboolean * data
Definition: glcorearb.h:131
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector4.h:493
const GLdouble * v
Definition: glcorearb.h:837
fpreal getTime() const
Definition: OP_Context.h:63
SparseDirectSolver opSparseDirectSolver(const SOP_NodeVerb::CookParms &cookparms) const
int64 opNumEigenpairs(const SOP_NodeVerb::CookParms &cookparms) const
GLsizei const GLfloat * value
Definition: glcorearb.h:824
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
const OP_Context & context() const
Definition: OP_NodeParms.h:97
void setPrecision(Precision val)
DensePreconditioner opDensePreconditioner(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:667
int64 exint
Definition: SYS_Types.h:125
SYS_FORCE_INLINE const char * buffer() const
static void saveData(std::ostream &os, bool v)
DensePreconditioner getDensePreconditioner() const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
static void saveData(std::ostream &os, fpreal64 v)
GLdouble s
Definition: glad.h:3009
void setVectorSrcStorage(VectorSrcStorage val)
VolumeEncoding getVolumeEncoding() const
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
An output stream object that owns its own string buffer storage.
DenseDirectSolver getDenseDirectSolver() const
static void saveData(std::ostream &os, int64 v)
**But if you need a result
Definition: thread.h:622
void setSolverTolerance(fpreal64 val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
const UT_StringHolder & getMatrixValueAttribute() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
SpectraEigensolver opSpectraEigensolver(const SOP_NodeVerb::CookParms &cookparms) const
void setSpectraEigensolver(SpectraEigensolver val)
exint nodeIdx() const
Definition: OP_NodeParms.h:95
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
void setDenseDirectSolver(DenseDirectSolver val)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
IterativeSolver getIterativeSolver() const
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
SYS_FORCE_INLINE UT_StringHolder getToken(Mode enum_value)
IterativeSolver opIterativeSolver(const SOP_NodeVerb::CookParms &cookparms) const
SparseDirectSolver getSparseDirectSolver() const
void setPinnedGroup(const UT_StringHolder &val)
VectorDstStorage opVectorDstStorage(const SOP_NodeVerb::CookParms &cookparms) const
double fpreal64
Definition: SYS_Types.h:201
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: APEX_Include.h:55
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
bool isParmColorRamp(exint idx) const override
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
DenseDirectSolver opDenseDirectSolver(const SOP_NodeVerb::CookParms &cookparms) const
int64 opCols(const SOP_NodeVerb::CookParms &cookparms) const
void loadFromOpSubclass(const LoadParms &loadparms) override
static void loadData(UT_IStream &is, UT_Vector4D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
static void loadData(UT_IStream &is, UT_Vector3D &v)
fpreal64 opSolverTolerance(const SOP_NodeVerb::CookParms &cookparms) const
exint length() const
bool opSolveWithGuess(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getPinnedGroup() const
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:36
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:495
static void saveData(std::ostream &os, UT_Vector4D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
UT_StringHolder opVectorDstAttribute(const SOP_NodeVerb::CookParms &cookparms) const
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
SparsePreconditioner opSparsePreconditioner(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opScale(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
DetailEncoding opDetailEncoding(const SOP_NodeVerb::CookParms &cookparms) const
PointsPrimsEncoding opPointsPrimsEncoding(const SOP_NodeVerb::CookParms &cookparms) const
void save(std::ostream &os) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
exint getNestNumParms(TempIndex idx) const override
MatrixStorage opMatrixStorage(const SOP_NodeVerb::CookParms &cookparms) const
void setVectorSrcAttribute(const UT_StringHolder &val)
int64 opSolverMaxIterations(const SOP_NodeVerb::CookParms &cookparms) const
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
long long int64
Definition: SYS_Types.h:116
UT_StringHolder opVectorSrcAttribute(const SOP_NodeVerb::CookParms &cookparms) const
VectorSrcStorage getVectorSrcStorage() const
static void loadData(UT_IStream &is, UT_StringHolder &v)
Precision getPrecision() const
const UT_StringHolder & getVectorDstAttribute() const
const UT_StringHolder & getColAttribute() const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
SparseDirectSolverBackend getSparseDirectSolverBackend() const
const UT_StringHolder & getRowAttribute() const
bool opReduceRows(const SOP_NodeVerb::CookParms &cookparms) const
void setVectorDstStorage(VectorDstStorage val)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
static void saveData(std::ostream &os, UT_Vector2D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
static void saveData(std::ostream &os, UT_Matrix2D v)
VectorSrcStorage opVectorSrcStorage(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:303
PointsPrimsEncoding getPointsPrimsEncoding() const
void setRowAttribute(const UT_StringHolder &val)
GT_API const UT_StringHolder version
void setVolumeEncoding(VolumeEncoding val)
static void loadData(UT_IStream &is, bool &v)
bool operator!=(const SOP_LinearSolverParms &src) const
bool operator==(const SOP_LinearSolverParms &src) const
bool opUseIterativeSolver(const SOP_NodeVerb::CookParms &cookparms) const
bool opAccumulateResult(const SOP_NodeVerb::CookParms &cookparms) const
void setDetailEncoding(DetailEncoding val)
void setSolverMaxIterations(int64 val)
UT_StringHolder opPinnedGroup(const SOP_NodeVerb::CookParms &cookparms) const
void setSparseDirectSolver(SparseDirectSolver val)
fpreal64 fpreal
Definition: SYS_Types.h:278
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
LeafData & operator=(const LeafData &)=delete
void setSparsePreconditioner(SparsePreconditioner val)
Utility class for containing a color ramp.
Definition: UT_Ramp.h:96
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
void setVectorDstAttribute(const UT_StringHolder &val)
GLuint GLfloat * val
Definition: glcorearb.h:1608
virtual UT_StringHolder baseGetSignature() const
Definition: OP_NodeParms.h:294
Vec3< typename MatType::value_type > getScale(const MatType &mat)
Return a Vec3 representing the lengths of the passed matrix's upper 3×3's rows.
Definition: Mat.h:633
static void saveData(std::ostream &os, UT_StringHolder s)
fpreal64 opShift(const SOP_NodeVerb::CookParms &cookparms) const
#define SOP_API
Definition: SOP_API.h:10
static void loadData(UT_IStream &is, fpreal64 &v)
DetailEncoding getDetailEncoding() const
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:372
bool opUseEigensolver(const SOP_NodeVerb::CookParms &cookparms) const
MatrixStorage getMatrixStorage() const
static void saveData(std::ostream &os, UT_Matrix3D v)
const char * findChar(int c) const
Definition: UT_String.h:1401
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
const UT_StringHolder & getVectorSrcAttribute() const
void setColAttribute(const UT_StringHolder &val)
bool opSquareMatrix(const SOP_NodeVerb::CookParms &cookparms) const
GLboolean r
Definition: glcorearb.h:1222
static void loadData(UT_IStream &is, UT_Matrix2D &v)
UT_StringHolder opColAttribute(const SOP_NodeVerb::CookParms &cookparms) const
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
UT_StringHolder opRowAttribute(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
void copyFrom(const OP_NodeParms *src) override
void setMatrixValueAttribute(const UT_StringHolder &val)
int64 opRows(const SOP_NodeVerb::CookParms &cookparms) const
virtual bool isDirect() const =0
Direct proxies mirror actual nodes:
SparsePreconditioner getSparsePreconditioner() const
ParmType getNestParmType(TempIndex fieldnum) const override
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
Mode opMode(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix3D &v)
static void saveData(std::ostream &os, UT_Matrix4D v)
void setSparseDirectSolverBackend(SparseDirectSolverBackend val)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
SYS_FORCE_INLINE bool isstring() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
GLenum src
Definition: glcorearb.h:1793
VolumeEncoding opVolumeEncoding(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663
static void loadData(UT_IStream &is, UT_Vector2I &v)
void setMatrixStorage(MatrixStorage val)