share more code between OpenCL kernels and C++ by moving kernel data structures/code to the 'shared' folders

This commit is contained in:
erwin coumans
2013-11-06 19:57:36 -08:00
parent 82a6855f9e
commit a9a758dd54
21 changed files with 549 additions and 364 deletions

View File

@@ -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"