HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CE_PointGrid.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: CE_PointGrid.h ( CE Library, C++)
7  *
8  * COMMENTS: GPU Uniform Radius Neighbor Search.
9  */
10 
11 #ifndef __CE_PointGrid__
12 #define __CE_PointGrid__
13 
14 #include "CE_API.h"
15 
16 #include <UT/UT_Error.h>
17 #include <UT/UT_String.h>
18 
19 template <typename T>
21 {
22 public:
23  CE_PointGridT(int npts, const cl::Buffer &P, const cl::Buffer &pscale,
24  const cl::Buffer &phase, const cl::Buffer &piece):
25  myNpts(npts),
26  myP(P),
27  myPscale(pscale),
28  myPhase(phase),
29  myPiece(piece) {}
30 
31  UT_ErrorSeverity findNeighbors(
32  float radscale,
33  int srcphase,
34  int dstphase,
35  cl::Buffer &neighboroffsets,
36  cl::Buffer &neighbors,
37  UT_String &errmsg);
38 
39  UT_ErrorSeverity deterministicP2G(
40  const cl::Buffer &type,
41  const cl::Buffer &v,
42  const cl::Buffer &density,
43  const cl::Buffer &C,
44  const cl::Buffer &state,
45  const cl::Buffer &sleep_delay,
46  const int numtiles,
47  const cl::Buffer &tilestartsxyz,
48  const cl::Buffer &mass_vdb,
49  const cl::Buffer &surface_vdb,
50  const cl::Buffer &vel_vdb,
51  const cl::Buffer &state_vdb,
52  const cl_float *xformtoworld,
53  const cl::Buffer &dx,
54  const cl::Buffer &gridscale,
55  UT_String &errmsg);
56 
57  UT_ErrorSeverity computeMcFeatures(
58  float rad,
59  const int numtiles,
60  const cl::Buffer &tilestartsxyz,
61  const cl::Buffer &surface_vdb_buff,
62  const cl_float *xformtoworld,
63  const char* kerneloptions,
64  UT_String &errmsg);
65 
66 private:
67  const int myNpts;
68  const cl::Buffer myP;
69  const cl::Buffer myPscale;
70  const cl::Buffer myPhase;
71  const cl::Buffer myPiece;
72 };
73 
74 #endif
#define CE_API
Definition: CE_API.h:13
const GLdouble * v
Definition: glcorearb.h:837
UT_ErrorSeverity
Definition: UT_Error.h:25
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:108
CE_PointGridT(int npts, const cl::Buffer &P, const cl::Buffer &pscale, const cl::Buffer &phase, const cl::Buffer &piece)
Definition: CE_PointGrid.h:23
float cl_float
Definition: cl_platform.h:266
GA_API const UT_StringHolder pscale
Memory buffer interface.
Definition: cl.hpp:1867
state
Definition: core.h:2289