share more code between OpenCL kernels and C++ by moving kernel data structures/code to the 'shared' folders
This commit is contained in:
@@ -25,6 +25,7 @@ static const char* solverUtilsCL= \
|
||||
"#ifdef __cplusplus\n"
|
||||
"#else\n"
|
||||
"#define b3AtomicInc atomic_inc\n"
|
||||
"#define b3Fabs fabs\n"
|
||||
"#endif\n"
|
||||
"#endif\n"
|
||||
"#ifdef __cplusplus\n"
|
||||
@@ -45,6 +46,13 @@ static const char* solverUtilsCL= \
|
||||
" return cross(a1, b1);\n"
|
||||
" }\n"
|
||||
"#endif \n"
|
||||
" \n"
|
||||
"inline bool b3IsAlmostZero(b3Float4ConstArg v)\n"
|
||||
"{\n"
|
||||
" if(b3Fabs(v.x)>1e-6 || b3Fabs(v.y)>1e-6 || b3Fabs(v.z)>1e-6) \n"
|
||||
" return false;\n"
|
||||
" return true;\n"
|
||||
"}\n"
|
||||
"#endif //B3_FLOAT4_H\n"
|
||||
"typedef struct b3Contact4Data b3Contact4Data_t;\n"
|
||||
"struct b3Contact4Data\n"
|
||||
|
||||
Reference in New Issue
Block a user