add gpu_sat
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
35
opencl/parallel_primitives/host/btInt2.h
Normal file
35
opencl/parallel_primitives/host/btInt2.h
Normal 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
|
||||
55
opencl/parallel_primitives/host/btInt4.h
Normal file
55
opencl/parallel_primitives/host/btInt4.h
Normal 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
|
||||
Reference in New Issue
Block a user