more work towards cpu pipeline, sharing OpenCL kernel code

This commit is contained in:
erwin coumans
2013-08-30 16:30:22 -07:00
parent 0ccb6922a8
commit a6d9cf382f
19 changed files with 1247 additions and 130 deletions

View File

@@ -10,6 +10,13 @@
#define b3Dot3F4 b3Dot
#define b3Cross3 b3Cross
#define b3MakeFloat4 b3MakeVector3
inline b3Float4 b3FastNormalized3(b3Float4ConstArg v)
{
return v.normalized();
}
#else
typedef float4 b3Float4;
#define b3Float4ConstArg const b3Float4
@@ -28,4 +35,15 @@
}
#endif
inline bool b3IsAlmostZero(b3Float4ConstArg v)
{
if(b3Fabs(v.x)>1e-6 || b3Fabs(v.y)>1e-6 || b3Fabs(v.z)>1e-6)
return false;
return true;
}
#endif //B3_FLOAT4_H