OpenSubdiv
cudaEvaluator.h
Go to the documentation of this file.
1 //
2 // Copyright 2015 Pixar
3 //
4 // Licensed under the Apache License, Version 2.0 (the "Apache License")
5 // with the following modification; you may not use this file except in
6 // compliance with the Apache License and the following modification to it:
7 // Section 6. Trademarks. is deleted and replaced with:
8 //
9 // 6. Trademarks. This License does not grant permission to use the trade
10 // names, trademarks, service marks, or product names of the Licensor
11 // and its affiliates, except as required to comply with Section 4(c) of
12 // the License and to reproduce the content of the NOTICE file.
13 //
14 // You may obtain a copy of the Apache License at
15 //
16 // http://www.apache.org/licenses/LICENSE-2.0
17 //
18 // Unless required by applicable law or agreed to in writing, software
19 // distributed under the Apache License with the above modification is
20 // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21 // KIND, either express or implied. See the Apache License for the specific
22 // language governing permissions and limitations under the Apache License.
23 //
24 
25 #ifndef OPENSUBDIV3_OSD_CUDA_EVALUATOR_H
26 #define OPENSUBDIV3_OSD_CUDA_EVALUATOR_H
27 
28 #include "../version.h"
29 
30 #include <vector>
31 #include "../osd/bufferDescriptor.h"
32 #include "../osd/types.h"
33 
34 namespace OpenSubdiv {
35 namespace OPENSUBDIV_VERSION {
36 
37 namespace Far {
38  class PatchTable;
39  class StencilTable;
40  class LimitStencilTable;
41 }
42 
43 namespace Osd {
44 
53 public:
54  static CudaStencilTable *Create(Far::StencilTable const *stencilTable,
55  void *deviceContext = NULL) {
56  (void)deviceContext; // unused
57  return new CudaStencilTable(stencilTable);
58  }
59  static CudaStencilTable *Create(Far::LimitStencilTable const *limitStencilTable,
60  void *deviceContext = NULL) {
61  (void)deviceContext; // unused
62  return new CudaStencilTable(limitStencilTable);
63  }
64 
65  explicit CudaStencilTable(Far::StencilTable const *stencilTable);
66  explicit CudaStencilTable(Far::LimitStencilTable const *limitStencilTable);
68 
69  // interfaces needed for CudaCompute
70  void *GetSizesBuffer() const { return _sizes; }
71  void *GetOffsetsBuffer() const { return _offsets; }
72  void *GetIndicesBuffer() const { return _indices; }
73  void *GetWeightsBuffer() const { return _weights; }
74  void *GetDuWeightsBuffer() const { return _duWeights; }
75  void *GetDvWeightsBuffer() const { return _dvWeights; }
76  void *GetDuuWeightsBuffer() const { return _duuWeights; }
77  void *GetDuvWeightsBuffer() const { return _duvWeights; }
78  void *GetDvvWeightsBuffer() const { return _dvvWeights; }
79  int GetNumStencils() const { return _numStencils; }
80 
81 private:
82  void * _sizes,
83  * _offsets,
84  * _indices,
85  * _weights,
86  * _duWeights,
87  * _dvWeights,
88  * _duuWeights,
89  * _duvWeights,
90  * _dvvWeights;
91  int _numStencils;
92 };
93 
95 public:
101 
125  template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
126  static bool EvalStencils(
127  SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
128  DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
129  STENCIL_TABLE const *stencilTable,
130  const void *instance = NULL,
131  void * deviceContext = NULL) {
132 
133  (void)instance; // unused
134  (void)deviceContext; // unused
135  return EvalStencils(srcBuffer->BindCudaBuffer(), srcDesc,
136  dstBuffer->BindCudaBuffer(), dstDesc,
137  (int const *)stencilTable->GetSizesBuffer(),
138  (int const *)stencilTable->GetOffsetsBuffer(),
139  (int const *)stencilTable->GetIndicesBuffer(),
140  (float const *)stencilTable->GetWeightsBuffer(),
141  /*start = */ 0,
142  /*end = */ stencilTable->GetNumStencils());
143  }
144 
171  static bool EvalStencils(
172  const float *src, BufferDescriptor const &srcDesc,
173  float *dst, BufferDescriptor const &dstDesc,
174  const int * sizes,
175  const int * offsets,
176  const int * indices,
177  const float * weights,
178  int start, int end);
179 
217  template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
218  static bool EvalStencils(
219  SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
220  DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
221  DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
222  DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
223  STENCIL_TABLE const *stencilTable,
224  const CudaEvaluator *instance = NULL,
225  void * deviceContext = NULL) {
226 
227  (void)instance; // unused
228  (void)deviceContext; // unused
229 
230  return EvalStencils(srcBuffer->BindCudaBuffer(), srcDesc,
231  dstBuffer->BindCudaBuffer(), dstDesc,
232  duBuffer->BindCudaBuffer(), duDesc,
233  dvBuffer->BindCudaBuffer(), dvDesc,
234  (int const *)stencilTable->GetSizesBuffer(),
235  (int const *)stencilTable->GetOffsetsBuffer(),
236  (int const *)stencilTable->GetIndicesBuffer(),
237  (float const *)stencilTable->GetWeightsBuffer(),
238  (float const *)stencilTable->GetDuWeightsBuffer(),
239  (float const *)stencilTable->GetDvWeightsBuffer(),
240  /*start = */ 0,
241  /*end = */ stencilTable->GetNumStencils());
242  }
243 
284  static bool EvalStencils(
285  const float *src, BufferDescriptor const &srcDesc,
286  float *dst, BufferDescriptor const &dstDesc,
287  float *du, BufferDescriptor const &duDesc,
288  float *dv, BufferDescriptor const &dvDesc,
289  const int * sizes,
290  const int * offsets,
291  const int * indices,
292  const float * weights,
293  const float * duWeights,
294  const float * dvWeights,
295  int start, int end);
296 
352  template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
353  static bool EvalStencils(
354  SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
355  DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
356  DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
357  DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
358  DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
359  DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
360  DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
361  STENCIL_TABLE const *stencilTable,
362  const CudaEvaluator *instance = NULL,
363  void * deviceContext = NULL) {
364 
365  (void)instance; // unused
366  (void)deviceContext; // unused
367 
368  return EvalStencils(srcBuffer->BindCudaBuffer(), srcDesc,
369  dstBuffer->BindCudaBuffer(), dstDesc,
370  duBuffer->BindCudaBuffer(), duDesc,
371  dvBuffer->BindCudaBuffer(), dvDesc,
372  duuBuffer->BindCudaBuffer(), duuDesc,
373  duvBuffer->BindCudaBuffer(), duvDesc,
374  dvvBuffer->BindCudaBuffer(), dvvDesc,
375  (int const *)stencilTable->GetSizesBuffer(),
376  (int const *)stencilTable->GetOffsetsBuffer(),
377  (int const *)stencilTable->GetIndicesBuffer(),
378  (float const *)stencilTable->GetWeightsBuffer(),
379  (float const *)stencilTable->GetDuWeightsBuffer(),
380  (float const *)stencilTable->GetDvWeightsBuffer(),
381  (float const *)stencilTable->GetDuuWeightsBuffer(),
382  (float const *)stencilTable->GetDuvWeightsBuffer(),
383  (float const *)stencilTable->GetDvvWeightsBuffer(),
384  /*start = */ 0,
385  /*end = */ stencilTable->GetNumStencils());
386  }
387 
449  static bool EvalStencils(
450  const float *src, BufferDescriptor const &srcDesc,
451  float *dst, BufferDescriptor const &dstDesc,
452  float *du, BufferDescriptor const &duDesc,
453  float *dv, BufferDescriptor const &dvDesc,
454  float *duu, BufferDescriptor const &duuDesc,
455  float *duv, BufferDescriptor const &duvDesc,
456  float *dvv, BufferDescriptor const &dvvDesc,
457  const int * sizes,
458  const int * offsets,
459  const int * indices,
460  const float * weights,
461  const float * duWeights,
462  const float * dvWeights,
463  const float * duuWeights,
464  const float * duvWeights,
465  const float * dvvWeights,
466  int start, int end);
467 
473 
502  template <typename SRC_BUFFER, typename DST_BUFFER,
503  typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
504  static bool EvalPatches(
505  SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
506  DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
507  int numPatchCoords,
508  PATCHCOORD_BUFFER *patchCoords,
509  PATCH_TABLE *patchTable,
510  CudaEvaluator const *instance,
511  void * deviceContext = NULL) {
512 
513  (void)instance; // unused
514  (void)deviceContext; // unused
515 
516  return EvalPatches(srcBuffer->BindCudaBuffer(), srcDesc,
517  dstBuffer->BindCudaBuffer(), dstDesc,
518  numPatchCoords,
519  (const PatchCoord *)patchCoords->BindCudaBuffer(),
520  (const PatchArray *)patchTable->GetPatchArrayBuffer(),
521  (const int *)patchTable->GetPatchIndexBuffer(),
522  (const PatchParam *)patchTable->GetPatchParamBuffer());
523  }
524 
563  template <typename SRC_BUFFER, typename DST_BUFFER,
564  typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
565  static bool EvalPatches(
566  SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
567  DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
568  DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
569  DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
570  int numPatchCoords,
571  PATCHCOORD_BUFFER *patchCoords,
572  PATCH_TABLE *patchTable,
573  CudaEvaluator const *instance,
574  void * deviceContext = NULL) {
575 
576  (void)instance; // unused
577  (void)deviceContext; // unused
578 
579  return EvalPatches(srcBuffer->BindCudaBuffer(), srcDesc,
580  dstBuffer->BindCudaBuffer(), dstDesc,
581  duBuffer->BindCudaBuffer(), duDesc,
582  dvBuffer->BindCudaBuffer(), dvDesc,
583  numPatchCoords,
584  (const PatchCoord *)patchCoords->BindCudaBuffer(),
585  (const PatchArray *)patchTable->GetPatchArrayBuffer(),
586  (const int *)patchTable->GetPatchIndexBuffer(),
587  (const PatchParam *)patchTable->GetPatchParamBuffer());
588  }
589 
646  template <typename SRC_BUFFER, typename DST_BUFFER,
647  typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
648  static bool EvalPatches(
649  SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
650  DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
651  DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
652  DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
653  DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
654  DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
655  DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
656  int numPatchCoords,
657  PATCHCOORD_BUFFER *patchCoords,
658  PATCH_TABLE *patchTable,
659  CudaEvaluator const *instance,
660  void * deviceContext = NULL) {
661 
662  (void)instance; // unused
663  (void)deviceContext; // unused
664 
665  return EvalPatches(srcBuffer->BindCudaBuffer(), srcDesc,
666  dstBuffer->BindCudaBuffer(), dstDesc,
667  duBuffer->BindCudaBuffer(), duDesc,
668  dvBuffer->BindCudaBuffer(), dvDesc,
669  duuBuffer->BindCudaBuffer(), duuDesc,
670  duvBuffer->BindCudaBuffer(), duvDesc,
671  dvvBuffer->BindCudaBuffer(), dvvDesc,
672  numPatchCoords,
673  (const PatchCoord *)patchCoords->BindCudaBuffer(),
674  (const PatchArray *)patchTable->GetPatchArrayBuffer(),
675  (const int *)patchTable->GetPatchIndexBuffer(),
676  (const PatchParam *)patchTable->GetPatchParamBuffer());
677  }
678 
706  static bool EvalPatches(
707  const float *src, BufferDescriptor const &srcDesc,
708  float *dst, BufferDescriptor const &dstDesc,
709  int numPatchCoords,
710  const PatchCoord *patchCoords,
711  const PatchArray *patchArrays,
712  const int *patchIndices,
713  const PatchParam *patchParams);
714 
752  static bool EvalPatches(
753  const float *src, BufferDescriptor const &srcDesc,
754  float *dst, BufferDescriptor const &dstDesc,
755  float *du, BufferDescriptor const &duDesc,
756  float *dv, BufferDescriptor const &dvDesc,
757  int numPatchCoords,
758  PatchCoord const *patchCoords,
759  PatchArray const *patchArrays,
760  const int *patchIndices,
761  PatchParam const *patchParams);
762 
815  static bool EvalPatches(
816  const float *src, BufferDescriptor const &srcDesc,
817  float *dst, BufferDescriptor const &dstDesc,
818  float *du, BufferDescriptor const &duDesc,
819  float *dv, BufferDescriptor const &dvDesc,
820  float *duu, BufferDescriptor const &duuDesc,
821  float *duv, BufferDescriptor const &duvDesc,
822  float *dvv, BufferDescriptor const &dvvDesc,
823  int numPatchCoords,
824  PatchCoord const *patchCoords,
825  PatchArray const *patchArrays,
826  const int *patchIndices,
827  PatchParam const *patchParams);
828 
857  template <typename SRC_BUFFER, typename DST_BUFFER,
858  typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
859  static bool EvalPatchesVarying(
860  SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
861  DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
862  int numPatchCoords,
863  PATCHCOORD_BUFFER *patchCoords,
864  PATCH_TABLE *patchTable,
865  CudaEvaluator const *instance,
866  void * deviceContext = NULL) {
867 
868  (void)instance; // unused
869  (void)deviceContext; // unused
870 
871  return EvalPatches(srcBuffer->BindCudaBuffer(), srcDesc,
872  dstBuffer->BindCudaBuffer(), dstDesc,
873  numPatchCoords,
874  (const PatchCoord *)patchCoords->BindCudaBuffer(),
875  (const PatchArray *)patchTable->GetVaryingPatchArrayBuffer(),
876  (const int *)patchTable->GetVaryingPatchIndexBuffer(),
877  (const PatchParam *)patchTable->GetPatchParamBuffer());
878  }
879 
920  template <typename SRC_BUFFER, typename DST_BUFFER,
921  typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
922  static bool EvalPatchesVarying(
923  SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
924  DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
925  DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
926  DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
927  int numPatchCoords,
928  PATCHCOORD_BUFFER *patchCoords,
929  PATCH_TABLE *patchTable,
930  CudaEvaluator const *instance,
931  void * deviceContext = NULL) {
932 
933  (void)instance; // unused
934  (void)deviceContext; // unused
935 
936  return EvalPatches(srcBuffer->BindCudaBuffer(), srcDesc,
937  dstBuffer->BindCudaBuffer(), dstDesc,
938  duBuffer->BindCudaBuffer(), duDesc,
939  dvBuffer->BindCudaBuffer(), dvDesc,
940  numPatchCoords,
941  (const PatchCoord *)patchCoords->BindCudaBuffer(),
942  (const PatchArray *)patchTable->GetVaryingPatchArrayBuffer(),
943  (const int *)patchTable->GetVaryingPatchIndexBuffer(),
944  (const PatchParam *)patchTable->GetPatchParamBuffer());
945  }
946 
1005  template <typename SRC_BUFFER, typename DST_BUFFER,
1006  typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
1007  static bool EvalPatchesVarying(
1008  SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
1009  DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
1010  DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
1011  DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
1012  DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
1013  DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
1014  DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
1015  int numPatchCoords,
1016  PATCHCOORD_BUFFER *patchCoords,
1017  PATCH_TABLE *patchTable,
1018  CudaEvaluator const *instance,
1019  void * deviceContext = NULL) {
1020 
1021  (void)instance; // unused
1022  (void)deviceContext; // unused
1023 
1024  return EvalPatches(srcBuffer->BindCudaBuffer(), srcDesc,
1025  dstBuffer->BindCudaBuffer(), dstDesc,
1026  duBuffer->BindCudaBuffer(), duDesc,
1027  dvBuffer->BindCudaBuffer(), dvDesc,
1028  duuBuffer->BindCudaBuffer(), duuDesc,
1029  duvBuffer->BindCudaBuffer(), duvDesc,
1030  dvvBuffer->BindCudaBuffer(), dvvDesc,
1031  numPatchCoords,
1032  (const PatchCoord *)patchCoords->BindCudaBuffer(),
1033  (const PatchArray *)patchTable->GetVaryingPatchArrayBuffer(),
1034  (const int *)patchTable->GetVaryingPatchIndexBuffer(),
1035  (const PatchParam *)patchTable->GetPatchParamBuffer());
1036  }
1037 
1068  template <typename SRC_BUFFER, typename DST_BUFFER,
1069  typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
1071  SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
1072  DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
1073  int numPatchCoords,
1074  PATCHCOORD_BUFFER *patchCoords,
1075  PATCH_TABLE *patchTable,
1076  int fvarChannel,
1077  CudaEvaluator const *instance,
1078  void * deviceContext = NULL) {
1079 
1080  (void)instance; // unused
1081  (void)deviceContext; // unused
1082 
1083  return EvalPatches(srcBuffer->BindCudaBuffer(), srcDesc,
1084  dstBuffer->BindCudaBuffer(), dstDesc,
1085  numPatchCoords,
1086  (const PatchCoord *)patchCoords->BindCudaBuffer(),
1087  (const PatchArray *)patchTable->GetFVarPatchArrayBuffer(fvarChannel),
1088  (const int *)patchTable->GetFVarPatchIndexBuffer(fvarChannel),
1089  (const PatchParam *)patchTable->GetFVarPatchParamBuffer(fvarChannel));
1090  }
1091 
1134  template <typename SRC_BUFFER, typename DST_BUFFER,
1135  typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
1137  SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
1138  DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
1139  DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
1140  DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
1141  int numPatchCoords,
1142  PATCHCOORD_BUFFER *patchCoords,
1143  PATCH_TABLE *patchTable,
1144  int fvarChannel,
1145  CudaEvaluator const *instance,
1146  void * deviceContext = NULL) {
1147 
1148  (void)instance; // unused
1149  (void)deviceContext; // unused
1150 
1151  return EvalPatches(srcBuffer->BindCudaBuffer(), srcDesc,
1152  dstBuffer->BindCudaBuffer(), dstDesc,
1153  duBuffer->BindCudaBuffer(), duDesc,
1154  dvBuffer->BindCudaBuffer(), dvDesc,
1155  numPatchCoords,
1156  (const PatchCoord *)patchCoords->BindCudaBuffer(),
1157  (const PatchArray *)patchTable->GetFVarPatchArrayBuffer(fvarChannel),
1158  (const int *)patchTable->GetFVarPatchIndexBuffer(fvarChannel),
1159  (const PatchParam *)patchTable->GetFVarPatchParamBuffer(fvarChannel));
1160  }
1161 
1222  template <typename SRC_BUFFER, typename DST_BUFFER,
1223  typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
1225  SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
1226  DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
1227  DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
1228  DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
1229  DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
1230  DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
1231  DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
1232  int numPatchCoords,
1233  PATCHCOORD_BUFFER *patchCoords,
1234  PATCH_TABLE *patchTable,
1235  int fvarChannel,
1236  CudaEvaluator const *instance,
1237  void * deviceContext = NULL) {
1238 
1239  (void)instance; // unused
1240  (void)deviceContext; // unused
1241 
1242  return EvalPatches(srcBuffer->BindCudaBuffer(), srcDesc,
1243  dstBuffer->BindCudaBuffer(), dstDesc,
1244  duBuffer->BindCudaBuffer(), duDesc,
1245  dvBuffer->BindCudaBuffer(), dvDesc,
1246  duuBuffer->BindCudaBuffer(), duuDesc,
1247  duvBuffer->BindCudaBuffer(), duvDesc,
1248  dvvBuffer->BindCudaBuffer(), dvvDesc,
1249  numPatchCoords,
1250  (const PatchCoord *)patchCoords->BindCudaBuffer(),
1251  (const PatchArray *)patchTable->GetFVarPatchArrayBuffer(fvarChannel),
1252  (const int *)patchTable->GetFVarPatchIndexBuffer(fvarChannel),
1253  (const PatchParam *)patchTable->GetFVarPatchParamBuffer(fvarChannel));
1254  }
1255 
1261  static void Synchronize(void *deviceContext = NULL);
1262 };
1263 
1264 
1265 } // end namespace Osd
1266 
1267 } // end namespace OPENSUBDIV_VERSION
1268 using namespace OPENSUBDIV_VERSION;
1269 
1270 } // end namespace OpenSubdiv
1271 
1272 
1273 #endif // OPENSUBDIV3_OSD_CUDA_EVALUATOR_H
static bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel, CudaEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
Limit stencil table class wrapping the template for compatibility.
Definition: stencilTable.h:583
static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, STENCIL_TABLE const *stencilTable, const CudaEvaluator *instance=NULL, void *deviceContext=NULL)
Generic static eval stencils function with derivatives. This function has a same signature as other d...
static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, CudaEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
static void Synchronize(void *deviceContext=NULL)
static CudaStencilTable * Create(Far::LimitStencilTable const *limitStencilTable, void *deviceContext=NULL)
Definition: cudaEvaluator.h:59
CudaStencilTable(Far::StencilTable const *stencilTable)
static bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel, CudaEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
static CudaStencilTable * Create(Far::StencilTable const *stencilTable, void *deviceContext=NULL)
Definition: cudaEvaluator.h:54
static bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, CudaEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function with derivatives. This function has a same signature as other device kern...
static bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, CudaEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
static bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel, CudaEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, STENCIL_TABLE const *stencilTable, const CudaEvaluator *instance=NULL, void *deviceContext=NULL)
Generic static eval stencils function with derivatives. This function has a same signature as other d...
Coordinates set on a patch table.
Definition: types.h:42
Stencil table class wrapping the template for compatibility.
Definition: stencilTable.h:273
static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, CudaEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, STENCIL_TABLE const *stencilTable, const void *instance=NULL, void *deviceContext=NULL)
Generic static compute function. This function has a same signature as other device kernels have so t...
BufferDescriptor is a struct which describes buffer elements in interleaved data buffers....
static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, CudaEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
static bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, CudaEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function with derivatives. This function has a same signature as other device kern...