OpenSubdiv: opensubdiv/osd/cudaEvaluator.h Source File

| OpenSubdiv

Loading...
Searching...
No Matches
cudaEvaluator.h
Go to the documentation of this file.
1//
2// Copyright 2015 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://opensubdiv.org/license.
6//
7
8#ifndef OPENSUBDIV3_OSD_CUDA_EVALUATOR_H
9#define OPENSUBDIV3_OSD_CUDA_EVALUATOR_H
10
11#include "../version.h"
12
13#include <vector>
14#include "../osd/bufferDescriptor.h"
15#include "../osd/types.h"
16
17namespace OpenSubdiv {
18namespace OPENSUBDIV_VERSION {
19
20namespace Far {
21 class PatchTable;
22 class StencilTable;
23 class LimitStencilTable;
24}
25
26namespace Osd {
27
35 class CudaStencilTable {
36public:
37 static CudaStencilTable *Create(Far::StencilTable const *stencilTable,
38 void *deviceContext = NULL) {
39 (void)deviceContext; // unused
40 return new CudaStencilTable(stencilTable);
41 }
42 static CudaStencilTable *Create(Far::LimitStencilTable const *limitStencilTable,
43 void *deviceContext = NULL) {
44 (void)deviceContext; // unused
45 return new CudaStencilTable(limitStencilTable);
46 }
47
48 explicit CudaStencilTable(Far::StencilTable const *stencilTable);
49 explicit CudaStencilTable(Far::LimitStencilTable const *limitStencilTable);
50 ~CudaStencilTable();
51
52 // interfaces needed for CudaCompute
53 void *GetSizesBuffer() const { return _sizes; }
54 void *GetOffsetsBuffer() const { return _offsets; }
55 void *GetIndicesBuffer() const { return _indices; }
56 void *GetWeightsBuffer() const { return _weights; }
57 void *GetDuWeightsBuffer() const { return _duWeights; }
58 void *GetDvWeightsBuffer() const { return _dvWeights; }
59 void *GetDuuWeightsBuffer() const { return _duuWeights; }
60 void *GetDuvWeightsBuffer() const { return _duvWeights; }
61 void *GetDvvWeightsBuffer() const { return _dvvWeights; }
62 int GetNumStencils() const { return _numStencils; }
63
64private:
65 void * _sizes,
66 * _offsets,
67 * _indices,
68 * _weights,
69 * _duWeights,
70 * _dvWeights,
71 * _duuWeights,
72 * _duvWeights,
73 * _dvvWeights;
74 int _numStencils;
75};
76
77 class CudaEvaluator {
78public:
84
108 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
109 static bool EvalStencils(
110 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
111 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
112 STENCIL_TABLE const *stencilTable,
113 const void *instance = NULL,
114 void * deviceContext = NULL) {
115
116 (void)instance; // unused
117 (void)deviceContext; // unused
118 return EvalStencils(srcBuffer->BindCudaBuffer(), srcDesc,
119 dstBuffer->BindCudaBuffer(), dstDesc,
120 (int const *)stencilTable->GetSizesBuffer(),
121 (int const *)stencilTable->GetOffsetsBuffer(),
122 (int const *)stencilTable->GetIndicesBuffer(),
123 (float const *)stencilTable->GetWeightsBuffer(),
124 /*start = */ 0,
125 /*end = */ stencilTable->GetNumStencils());
126 }
127
154 static bool EvalStencils(
155 const float *src, BufferDescriptor const &srcDesc,
156 float *dst, BufferDescriptor const &dstDesc,
157 const int * sizes,
158 const int * offsets,
159 const int * indices,
160 const float * weights,
161 int start, int end);
162
200 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
201 static bool EvalStencils(
202 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
203 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
204 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
205 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
206 STENCIL_TABLE const *stencilTable,
207 const CudaEvaluator *instance = NULL,
208 void * deviceContext = NULL) {
209
210 (void)instance; // unused
211 (void)deviceContext; // unused
212
213 return EvalStencils(srcBuffer->BindCudaBuffer(), srcDesc,
214 dstBuffer->BindCudaBuffer(), dstDesc,
215 duBuffer->BindCudaBuffer(), duDesc,
216 dvBuffer->BindCudaBuffer(), dvDesc,
217 (int const *)stencilTable->GetSizesBuffer(),
218 (int const *)stencilTable->GetOffsetsBuffer(),
219 (int const *)stencilTable->GetIndicesBuffer(),
220 (float const *)stencilTable->GetWeightsBuffer(),
221 (float const *)stencilTable->GetDuWeightsBuffer(),
222 (float const *)stencilTable->GetDvWeightsBuffer(),
223 /*start = */ 0,
224 /*end = */ stencilTable->GetNumStencils());
225 }
226
267 static bool EvalStencils(
268 const float *src, BufferDescriptor const &srcDesc,
269 float *dst, BufferDescriptor const &dstDesc,
270 float *du, BufferDescriptor const &duDesc,
271 float *dv, BufferDescriptor const &dvDesc,
272 const int * sizes,
273 const int * offsets,
274 const int * indices,
275 const float * weights,
276 const float * duWeights,
277 const float * dvWeights,
278 int start, int end);
279
335 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
336 static bool EvalStencils(
337 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
338 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
339 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
340 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
341 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
342 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
343 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
344 STENCIL_TABLE const *stencilTable,
345 const CudaEvaluator *instance = NULL,
346 void * deviceContext = NULL) {
347
348 (void)instance; // unused
349 (void)deviceContext; // unused
350
351 return EvalStencils(srcBuffer->BindCudaBuffer(), srcDesc,
352 dstBuffer->BindCudaBuffer(), dstDesc,
353 duBuffer->BindCudaBuffer(), duDesc,
354 dvBuffer->BindCudaBuffer(), dvDesc,
355 duuBuffer->BindCudaBuffer(), duuDesc,
356 duvBuffer->BindCudaBuffer(), duvDesc,
357 dvvBuffer->BindCudaBuffer(), dvvDesc,
358 (int const *)stencilTable->GetSizesBuffer(),
359 (int const *)stencilTable->GetOffsetsBuffer(),
360 (int const *)stencilTable->GetIndicesBuffer(),
361 (float const *)stencilTable->GetWeightsBuffer(),
362 (float const *)stencilTable->GetDuWeightsBuffer(),
363 (float const *)stencilTable->GetDvWeightsBuffer(),
364 (float const *)stencilTable->GetDuuWeightsBuffer(),
365 (float const *)stencilTable->GetDuvWeightsBuffer(),
366 (float const *)stencilTable->GetDvvWeightsBuffer(),
367 /*start = */ 0,
368 /*end = */ stencilTable->GetNumStencils());
369 }
370
432 static bool EvalStencils(
433 const float *src, BufferDescriptor const &srcDesc,
434 float *dst, BufferDescriptor const &dstDesc,
435 float *du, BufferDescriptor const &duDesc,
436 float *dv, BufferDescriptor const &dvDesc,
437 float *duu, BufferDescriptor const &duuDesc,
438 float *duv, BufferDescriptor const &duvDesc,
439 float *dvv, BufferDescriptor const &dvvDesc,
440 const int * sizes,
441 const int * offsets,
442 const int * indices,
443 const float * weights,
444 const float * duWeights,
445 const float * dvWeights,
446 const float * duuWeights,
447 const float * duvWeights,
448 const float * dvvWeights,
449 int start, int end);
450
456
485 template <typename SRC_BUFFER, typename DST_BUFFER,
486 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
487 static bool EvalPatches(
488 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
489 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
490 int numPatchCoords,
491 PATCHCOORD_BUFFER *patchCoords,
492 PATCH_TABLE *patchTable,
493 CudaEvaluator const *instance,
494 void * deviceContext = NULL) {
495
496 (void)instance; // unused
497 (void)deviceContext; // unused
498
499 return EvalPatches(srcBuffer->BindCudaBuffer(), srcDesc,
500 dstBuffer->BindCudaBuffer(), dstDesc,
501 numPatchCoords,
502 (const PatchCoord *)patchCoords->BindCudaBuffer(),
503 (const PatchArray *)patchTable->GetPatchArrayBuffer(),
504 (const int *)patchTable->GetPatchIndexBuffer(),
505 (const PatchParam *)patchTable->GetPatchParamBuffer());
506 }
507
546 template <typename SRC_BUFFER, typename DST_BUFFER,
547 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
548 static bool EvalPatches(
549 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
550 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
551 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
552 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
553 int numPatchCoords,
554 PATCHCOORD_BUFFER *patchCoords,
555 PATCH_TABLE *patchTable,
556 CudaEvaluator const *instance,
557 void * deviceContext = NULL) {
558
559 (void)instance; // unused
560 (void)deviceContext; // unused
561
562 return EvalPatches(srcBuffer->BindCudaBuffer(), srcDesc,
563 dstBuffer->BindCudaBuffer(), dstDesc,
564 duBuffer->BindCudaBuffer(), duDesc,
565 dvBuffer->BindCudaBuffer(), dvDesc,
566 numPatchCoords,
567 (const PatchCoord *)patchCoords->BindCudaBuffer(),
568 (const PatchArray *)patchTable->GetPatchArrayBuffer(),
569 (const int *)patchTable->GetPatchIndexBuffer(),
570 (const PatchParam *)patchTable->GetPatchParamBuffer());
571 }
572
629 template <typename SRC_BUFFER, typename DST_BUFFER,
630 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
631 static bool EvalPatches(
632 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
633 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
634 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
635 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
636 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
637 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
638 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
639 int numPatchCoords,
640 PATCHCOORD_BUFFER *patchCoords,
641 PATCH_TABLE *patchTable,
642 CudaEvaluator const *instance,
643 void * deviceContext = NULL) {
644
645 (void)instance; // unused
646 (void)deviceContext; // unused
647
648 return EvalPatches(srcBuffer->BindCudaBuffer(), srcDesc,
649 dstBuffer->BindCudaBuffer(), dstDesc,
650 duBuffer->BindCudaBuffer(), duDesc,
651 dvBuffer->BindCudaBuffer(), dvDesc,
652 duuBuffer->BindCudaBuffer(), duuDesc,
653 duvBuffer->BindCudaBuffer(), duvDesc,
654 dvvBuffer->BindCudaBuffer(), dvvDesc,
655 numPatchCoords,
656 (const PatchCoord *)patchCoords->BindCudaBuffer(),
657 (const PatchArray *)patchTable->GetPatchArrayBuffer(),
658 (const int *)patchTable->GetPatchIndexBuffer(),
659 (const PatchParam *)patchTable->GetPatchParamBuffer());
660 }
661
689 static bool EvalPatches(
690 const float *src, BufferDescriptor const &srcDesc,
691 float *dst, BufferDescriptor const &dstDesc,
692 int numPatchCoords,
693 const PatchCoord *patchCoords,
694 const PatchArray *patchArrays,
695 const int *patchIndices,
696 const PatchParam *patchParams);
697
735 static bool EvalPatches(
736 const float *src, BufferDescriptor const &srcDesc,
737 float *dst, BufferDescriptor const &dstDesc,
738 float *du, BufferDescriptor const &duDesc,
739 float *dv, BufferDescriptor const &dvDesc,
740 int numPatchCoords,
741 PatchCoord const *patchCoords,
742 PatchArray const *patchArrays,
743 const int *patchIndices,
744 PatchParam const *patchParams);
745
798 static bool EvalPatches(
799 const float *src, BufferDescriptor const &srcDesc,
800 float *dst, BufferDescriptor const &dstDesc,
801 float *du, BufferDescriptor const &duDesc,
802 float *dv, BufferDescriptor const &dvDesc,
803 float *duu, BufferDescriptor const &duuDesc,
804 float *duv, BufferDescriptor const &duvDesc,
805 float *dvv, BufferDescriptor const &dvvDesc,
806 int numPatchCoords,
807 PatchCoord const *patchCoords,
808 PatchArray const *patchArrays,
809 const int *patchIndices,
810 PatchParam const *patchParams);
811
840 template <typename SRC_BUFFER, typename DST_BUFFER,
841 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
842 static bool EvalPatchesVarying(
843 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
844 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
845 int numPatchCoords,
846 PATCHCOORD_BUFFER *patchCoords,
847 PATCH_TABLE *patchTable,
848 CudaEvaluator const *instance,
849 void * deviceContext = NULL) {
850
851 (void)instance; // unused
852 (void)deviceContext; // unused
853
854 return EvalPatches(srcBuffer->BindCudaBuffer(), srcDesc,
855 dstBuffer->BindCudaBuffer(), dstDesc,
856 numPatchCoords,
857 (const PatchCoord *)patchCoords->BindCudaBuffer(),
858 (const PatchArray *)patchTable->GetVaryingPatchArrayBuffer(),
859 (const int *)patchTable->GetVaryingPatchIndexBuffer(),
860 (const PatchParam *)patchTable->GetPatchParamBuffer());
861 }
862
903 template <typename SRC_BUFFER, typename DST_BUFFER,
904 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
905 static bool EvalPatchesVarying(
906 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
907 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
908 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
909 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
910 int numPatchCoords,
911 PATCHCOORD_BUFFER *patchCoords,
912 PATCH_TABLE *patchTable,
913 CudaEvaluator const *instance,
914 void * deviceContext = NULL) {
915
916 (void)instance; // unused
917 (void)deviceContext; // unused
918
919 return EvalPatches(srcBuffer->BindCudaBuffer(), srcDesc,
920 dstBuffer->BindCudaBuffer(), dstDesc,
921 duBuffer->BindCudaBuffer(), duDesc,
922 dvBuffer->BindCudaBuffer(), dvDesc,
923 numPatchCoords,
924 (const PatchCoord *)patchCoords->BindCudaBuffer(),
925 (const PatchArray *)patchTable->GetVaryingPatchArrayBuffer(),
926 (const int *)patchTable->GetVaryingPatchIndexBuffer(),
927 (const PatchParam *)patchTable->GetPatchParamBuffer());
928 }
929
988 template <typename SRC_BUFFER, typename DST_BUFFER,
989 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
990 static bool EvalPatchesVarying(
991 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
992 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
993 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
994 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
995 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
996 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
997 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
998 int numPatchCoords,
999 PATCHCOORD_BUFFER *patchCoords,
1000 PATCH_TABLE *patchTable,
1001 CudaEvaluator const *instance,
1002 void * deviceContext = NULL) {
1003
1004 (void)instance; // unused
1005 (void)deviceContext; // unused
1006
1007 return EvalPatches(srcBuffer->BindCudaBuffer(), srcDesc,
1008 dstBuffer->BindCudaBuffer(), dstDesc,
1009 duBuffer->BindCudaBuffer(), duDesc,
1010 dvBuffer->BindCudaBuffer(), dvDesc,
1011 duuBuffer->BindCudaBuffer(), duuDesc,
1012 duvBuffer->BindCudaBuffer(), duvDesc,
1013 dvvBuffer->BindCudaBuffer(), dvvDesc,
1014 numPatchCoords,
1015 (const PatchCoord *)patchCoords->BindCudaBuffer(),
1016 (const PatchArray *)patchTable->GetVaryingPatchArrayBuffer(),
1017 (const int *)patchTable->GetVaryingPatchIndexBuffer(),
1018 (const PatchParam *)patchTable->GetPatchParamBuffer());
1019 }
1020
1051 template <typename SRC_BUFFER, typename DST_BUFFER,
1052 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
1053 static bool EvalPatchesFaceVarying(
1054 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
1055 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
1056 int numPatchCoords,
1057 PATCHCOORD_BUFFER *patchCoords,
1058 PATCH_TABLE *patchTable,
1059 int fvarChannel,
1060 CudaEvaluator const *instance,
1061 void * deviceContext = NULL) {
1062
1063 (void)instance; // unused
1064 (void)deviceContext; // unused
1065
1066 return EvalPatches(srcBuffer->BindCudaBuffer(), srcDesc,
1067 dstBuffer->BindCudaBuffer(), dstDesc,
1068 numPatchCoords,
1069 (const PatchCoord *)patchCoords->BindCudaBuffer(),
1070 (const PatchArray *)patchTable->GetFVarPatchArrayBuffer(fvarChannel),
1071 (const int *)patchTable->GetFVarPatchIndexBuffer(fvarChannel),
1072 (const PatchParam *)patchTable->GetFVarPatchParamBuffer(fvarChannel));
1073 }
1074
1117 template <typename SRC_BUFFER, typename DST_BUFFER,
1118 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
1119 static bool EvalPatchesFaceVarying(
1120 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
1121 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
1122 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
1123 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
1124 int numPatchCoords,
1125 PATCHCOORD_BUFFER *patchCoords,
1126 PATCH_TABLE *patchTable,
1127 int fvarChannel,
1128 CudaEvaluator const *instance,
1129 void * deviceContext = NULL) {
1130
1131 (void)instance; // unused
1132 (void)deviceContext; // unused
1133
1134 return EvalPatches(srcBuffer->BindCudaBuffer(), srcDesc,
1135 dstBuffer->BindCudaBuffer(), dstDesc,
1136 duBuffer->BindCudaBuffer(), duDesc,
1137 dvBuffer->BindCudaBuffer(), dvDesc,
1138 numPatchCoords,
1139 (const PatchCoord *)patchCoords->BindCudaBuffer(),
1140 (const PatchArray *)patchTable->GetFVarPatchArrayBuffer(fvarChannel),
1141 (const int *)patchTable->GetFVarPatchIndexBuffer(fvarChannel),
1142 (const PatchParam *)patchTable->GetFVarPatchParamBuffer(fvarChannel));
1143 }
1144
1205 template <typename SRC_BUFFER, typename DST_BUFFER,
1206 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
1207 static bool EvalPatchesFaceVarying(
1208 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
1209 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
1210 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
1211 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
1212 DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc,
1213 DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc,
1214 DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc,
1215 int numPatchCoords,
1216 PATCHCOORD_BUFFER *patchCoords,
1217 PATCH_TABLE *patchTable,
1218 int fvarChannel,
1219 CudaEvaluator const *instance,
1220 void * deviceContext = NULL) {
1221
1222 (void)instance; // unused
1223 (void)deviceContext; // unused
1224
1225 return EvalPatches(srcBuffer->BindCudaBuffer(), srcDesc,
1226 dstBuffer->BindCudaBuffer(), dstDesc,
1227 duBuffer->BindCudaBuffer(), duDesc,
1228 dvBuffer->BindCudaBuffer(), dvDesc,
1229 duuBuffer->BindCudaBuffer(), duuDesc,
1230 duvBuffer->BindCudaBuffer(), duvDesc,
1231 dvvBuffer->BindCudaBuffer(), dvvDesc,
1232 numPatchCoords,
1233 (const PatchCoord *)patchCoords->BindCudaBuffer(),
1234 (const PatchArray *)patchTable->GetFVarPatchArrayBuffer(fvarChannel),
1235 (const int *)patchTable->GetFVarPatchIndexBuffer(fvarChannel),
1236 (const PatchParam *)patchTable->GetFVarPatchParamBuffer(fvarChannel));
1237 }
1238
1244 static void Synchronize(void *deviceContext = NULL);
1245};
1246
1247
1248} // end namespace Osd
1249
1250} // end namespace OPENSUBDIV_VERSION
1251using namespace OPENSUBDIV_VERSION;
1252
1253} // end namespace OpenSubdiv
1254
1255
1256#endif // OPENSUBDIV3_OSD_CUDA_EVALUATOR_H
bufferDescriptor.h
OpenSubdiv
Definition limits.h:15
OpenSubdiv::OPENSUBDIV_VERSION
Definition limits.h:16
OpenSubdiv::OPENSUBDIV_VERSION::Far
Definition refinerSurfaceFactory.h:19
OpenSubdiv::OPENSUBDIV_VERSION::Osd
Definition bufferDescriptor.h:17
OpenSubdiv::OPENSUBDIV_VERSION::Far::PatchTable
Container for arrays of parametric patches.
Definition patchTable.h:38
OpenSubdiv::OPENSUBDIV_VERSION::Far::StencilTable
Stencil table class wrapping the template for compatibility.
Definition stencilTable.h:256
OpenSubdiv::OPENSUBDIV_VERSION::Far::LimitStencilTable
Limit stencil table class wrapping the template for compatibility.
Definition stencilTable.h:566
OpenSubdiv::OPENSUBDIV_VERSION::Osd::BufferDescriptor
BufferDescriptor is a struct which describes buffer elements in interleaved data buffers....
Definition bufferDescriptor.h:44
OpenSubdiv::OPENSUBDIV_VERSION::Osd::CudaStencilTable::GetDuvWeightsBuffer
void * GetDuvWeightsBuffer() const
Definition cudaEvaluator.h:60
OpenSubdiv::OPENSUBDIV_VERSION::Osd::CudaStencilTable::~CudaStencilTable
~CudaStencilTable()
OpenSubdiv::OPENSUBDIV_VERSION::Osd::CudaStencilTable::GetDuWeightsBuffer
void * GetDuWeightsBuffer() const
Definition cudaEvaluator.h:57
OpenSubdiv::OPENSUBDIV_VERSION::Osd::CudaStencilTable::GetDvvWeightsBuffer
void * GetDvvWeightsBuffer() const
Definition cudaEvaluator.h:61
OpenSubdiv::OPENSUBDIV_VERSION::Osd::CudaStencilTable::GetOffsetsBuffer
void * GetOffsetsBuffer() const
Definition cudaEvaluator.h:54
OpenSubdiv::OPENSUBDIV_VERSION::Osd::CudaStencilTable::CudaStencilTable
CudaStencilTable(Far::LimitStencilTable const *limitStencilTable)
OpenSubdiv::OPENSUBDIV_VERSION::Osd::CudaStencilTable::GetDvWeightsBuffer
void * GetDvWeightsBuffer() const
Definition cudaEvaluator.h:58
OpenSubdiv::OPENSUBDIV_VERSION::Osd::CudaStencilTable::GetNumStencils
int GetNumStencils() const
Definition cudaEvaluator.h:62
OpenSubdiv::OPENSUBDIV_VERSION::Osd::CudaStencilTable::GetDuuWeightsBuffer
void * GetDuuWeightsBuffer() const
Definition cudaEvaluator.h:59
OpenSubdiv::OPENSUBDIV_VERSION::Osd::CudaStencilTable::GetWeightsBuffer
void * GetWeightsBuffer() const
Definition cudaEvaluator.h:56
OpenSubdiv::OPENSUBDIV_VERSION::Osd::CudaStencilTable::Create
static CudaStencilTable * Create(Far::LimitStencilTable const *limitStencilTable, void *deviceContext=NULL)
Definition cudaEvaluator.h:42
OpenSubdiv::OPENSUBDIV_VERSION::Osd::CudaStencilTable::GetSizesBuffer
void * GetSizesBuffer() const
Definition cudaEvaluator.h:53
OpenSubdiv::OPENSUBDIV_VERSION::Osd::CudaStencilTable::GetIndicesBuffer
void * GetIndicesBuffer() const
Definition cudaEvaluator.h:55
OpenSubdiv::OPENSUBDIV_VERSION::Osd::CudaStencilTable::CudaStencilTable
CudaStencilTable(Far::StencilTable const *stencilTable)
OpenSubdiv::OPENSUBDIV_VERSION::Osd::CudaStencilTable::Create
static CudaStencilTable * Create(Far::StencilTable const *stencilTable, void *deviceContext=NULL)
Definition cudaEvaluator.h:37
OpenSubdiv::OPENSUBDIV_VERSION::Osd::CudaEvaluator
Definition cudaEvaluator.h:77
OpenSubdiv::OPENSUBDIV_VERSION::Osd::CudaEvaluator::EvalPatches
static bool EvalPatches(const float *src, BufferDescriptor const &srcDesc, float *dst, BufferDescriptor const &dstDesc, int numPatchCoords, const PatchCoord *patchCoords, const PatchArray *patchArrays, const int *patchIndices, const PatchParam *patchParams)
Static limit eval function. It takes an array of PatchCoord and evaluate limit values on given PatchT...
OpenSubdiv::OPENSUBDIV_VERSION::Osd::CudaEvaluator::EvalPatchesVarying
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 ...
Definition cudaEvaluator.h:905
OpenSubdiv::OPENSUBDIV_VERSION::Osd::CudaEvaluator::EvalPatches
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...
Definition cudaEvaluator.h:631
OpenSubdiv::OPENSUBDIV_VERSION::Osd::CudaEvaluator::EvalStencils
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...
Definition cudaEvaluator.h:336
OpenSubdiv::OPENSUBDIV_VERSION::Osd::CudaEvaluator::EvalStencils
static bool EvalStencils(const float *src, BufferDescriptor const &srcDesc, float *dst, BufferDescriptor const &dstDesc, const int *sizes, const int *offsets, const int *indices, const float *weights, int start, int end)
Static eval stencils function which takes raw cuda buffers for input and output.
OpenSubdiv::OPENSUBDIV_VERSION::Osd::CudaEvaluator::EvalPatchesVarying
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 ...
Definition cudaEvaluator.h:842
OpenSubdiv::OPENSUBDIV_VERSION::Osd::CudaEvaluator::EvalStencils
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...
Definition cudaEvaluator.h:201
OpenSubdiv::OPENSUBDIV_VERSION::Osd::CudaEvaluator::EvalPatches
static bool EvalPatches(const float *src, BufferDescriptor const &srcDesc, float *dst, BufferDescriptor const &dstDesc, float *du, BufferDescriptor const &duDesc, float *dv, BufferDescriptor const &dvDesc, float *duu, BufferDescriptor const &duuDesc, float *duv, BufferDescriptor const &duvDesc, float *dvv, BufferDescriptor const &dvvDesc, int numPatchCoords, PatchCoord const *patchCoords, PatchArray const *patchArrays, const int *patchIndices, PatchParam const *patchParams)
Static limit eval function. It takes an array of PatchCoord and evaluate limit values on given PatchT...
OpenSubdiv::OPENSUBDIV_VERSION::Osd::CudaEvaluator::EvalPatchesFaceVarying
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 ...
Definition cudaEvaluator.h:1119
OpenSubdiv::OPENSUBDIV_VERSION::Osd::CudaEvaluator::EvalStencils
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...
Definition cudaEvaluator.h:109
OpenSubdiv::OPENSUBDIV_VERSION::Osd::CudaEvaluator::EvalStencils
static bool EvalStencils(const float *src, BufferDescriptor const &srcDesc, float *dst, BufferDescriptor const &dstDesc, float *du, BufferDescriptor const &duDesc, float *dv, BufferDescriptor const &dvDesc, const int *sizes, const int *offsets, const int *indices, const float *weights, const float *duWeights, const float *dvWeights, int start, int end)
Static eval stencils function with derivatives, which takes raw cuda pointers for input and output.
OpenSubdiv::OPENSUBDIV_VERSION::Osd::CudaEvaluator::EvalStencils
static bool EvalStencils(const float *src, BufferDescriptor const &srcDesc, float *dst, BufferDescriptor const &dstDesc, float *du, BufferDescriptor const &duDesc, float *dv, BufferDescriptor const &dvDesc, float *duu, BufferDescriptor const &duuDesc, float *duv, BufferDescriptor const &duvDesc, float *dvv, BufferDescriptor const &dvvDesc, const int *sizes, const int *offsets, const int *indices, const float *weights, const float *duWeights, const float *dvWeights, const float *duuWeights, const float *duvWeights, const float *dvvWeights, int start, int end)
Static eval stencils function with derivatives, which takes raw cuda pointers for input and output.
OpenSubdiv::OPENSUBDIV_VERSION::Osd::CudaEvaluator::Synchronize
static void Synchronize(void *deviceContext=NULL)
OpenSubdiv::OPENSUBDIV_VERSION::Osd::CudaEvaluator::EvalPatches
static bool EvalPatches(const float *src, BufferDescriptor const &srcDesc, float *dst, BufferDescriptor const &dstDesc, float *du, BufferDescriptor const &duDesc, float *dv, BufferDescriptor const &dvDesc, int numPatchCoords, PatchCoord const *patchCoords, PatchArray const *patchArrays, const int *patchIndices, PatchParam const *patchParams)
Static limit eval function. It takes an array of PatchCoord and evaluate limit values on given PatchT...
OpenSubdiv::OPENSUBDIV_VERSION::Osd::CudaEvaluator::EvalPatchesVarying
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 ...
Definition cudaEvaluator.h:990
OpenSubdiv::OPENSUBDIV_VERSION::Osd::CudaEvaluator::EvalPatches
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 ...
Definition cudaEvaluator.h:487
OpenSubdiv::OPENSUBDIV_VERSION::Osd::CudaEvaluator::EvalPatchesFaceVarying
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 ...
Definition cudaEvaluator.h:1207
OpenSubdiv::OPENSUBDIV_VERSION::Osd::CudaEvaluator::EvalPatches
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...
Definition cudaEvaluator.h:548
OpenSubdiv::OPENSUBDIV_VERSION::Osd::CudaEvaluator::EvalPatchesFaceVarying
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 ...
Definition cudaEvaluator.h:1053
OpenSubdiv::OPENSUBDIV_VERSION::Osd::PatchCoord
Coordinates set on a patch table.
Definition types.h:25
OpenSubdiv::OPENSUBDIV_VERSION::Osd::PatchArray
Definition types.h:49
OpenSubdiv::OPENSUBDIV_VERSION::Osd::PatchParam
Definition types.h:110
types.h