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

@@ -154,6 +154,7 @@ static const char* satKernelsCL= \
"#ifdef __cplusplus\n"
"#else\n"
"#define b3AtomicInc atomic_inc\n"
"#define b3Fabs fabs\n"
"#endif\n"
"#endif\n"
"#ifdef __cplusplus\n"
@@ -174,6 +175,13 @@ static const char* satKernelsCL= \
" 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"
"#ifndef B3_MAT3x3_H\n"
"#define B3_MAT3x3_H\n"