add gpu_sat

This commit is contained in:
erwin coumans
2013-03-12 21:11:46 -07:00
parent ecdb0e52ca
commit 9612c2cd3d
19 changed files with 8283 additions and 76 deletions

View File

@@ -4,83 +4,9 @@
#include "btOpenCLArray.h"
#include "btScalar.h"
ATTRIBUTE_ALIGNED16(struct) btUnsignedInt4
{
BT_DECLARE_ALIGNED_ALLOCATOR();
#include "btInt2.h"
#include "btInt4.h"
union
{
struct
{
unsigned int x,y,z,w;
};
struct
{
unsigned int s[4];
};
};
};
ATTRIBUTE_ALIGNED16(struct) btInt4
{
BT_DECLARE_ALIGNED_ALLOCATOR();
union
{
struct
{
int x,y,z,w;
};
struct
{
int s[4];
};
};
};
struct btUnsignedInt2
{
union
{
struct
{
unsigned int x,y;
};
struct
{
unsigned int s[2];
};
};
};
struct btInt2
{
union
{
struct
{
int x,y;
};
struct
{
int s[2];
};
};
};
SIMD_FORCE_INLINE btInt4 btMakeInt4(int x, int y, int z, int w = 0)
{
btInt4 v;
v.s[0] = x; v.s[1] = y; v.s[2] = z; v.s[3] = w;
return v;
}
SIMD_FORCE_INLINE btUnsignedInt4 btMakeUnsignedInt4(unsigned int x, unsigned int y, unsigned int z, unsigned int w = 0)
{
btUnsignedInt4 v;
v.s[0] = x; v.s[1] = y; v.s[2] = z; v.s[3] = w;
return v;
}
class btFillCL
{

View File

@@ -0,0 +1,35 @@
#ifndef BT_INT2_H
#define BT_INT2_H
struct btUnsignedInt2
{
union
{
struct
{
unsigned int x,y;
};
struct
{
unsigned int s[2];
};
};
};
struct btInt2
{
union
{
struct
{
int x,y;
};
struct
{
int s[2];
};
};
};
#endif

View File

@@ -0,0 +1,55 @@
#ifndef BT_INT4_H
#define BT_INT4_H
#include "btScalar.h"
ATTRIBUTE_ALIGNED16(struct) btUnsignedInt4
{
BT_DECLARE_ALIGNED_ALLOCATOR();
union
{
struct
{
unsigned int x,y,z,w;
};
struct
{
unsigned int s[4];
};
};
};
ATTRIBUTE_ALIGNED16(struct) btInt4
{
BT_DECLARE_ALIGNED_ALLOCATOR();
union
{
struct
{
int x,y,z,w;
};
struct
{
int s[4];
};
};
};
SIMD_FORCE_INLINE btInt4 btMakeInt4(int x, int y, int z, int w = 0)
{
btInt4 v;
v.s[0] = x; v.s[1] = y; v.s[2] = z; v.s[3] = w;
return v;
}
SIMD_FORCE_INLINE btUnsignedInt4 btMakeUnsignedInt4(unsigned int x, unsigned int y, unsigned int z, unsigned int w = 0)
{
btUnsignedInt4 v;
v.s[0] = x; v.s[1] = y; v.s[2] = z; v.s[3] = w;
return v;
}
#endif //BT_INT4_H