added sample task, for multi threading tests

added union vec_float4 m_Vec128; for btVector3 for SPU and PPU.
This commit is contained in:
erwin.coumans
2008-06-03 21:24:34 +00:00
parent 8028fa4999
commit 5e3777ddd2
6 changed files with 174 additions and 15 deletions

View File

@@ -18,6 +18,14 @@ subject to the following restrictions:
#include "btScalar.h"
#include "btMinMax.h"
#include <math.h>
#ifdef __PPU__
#include <altivec.h>
#endif
#ifdef __SPU__
#include <spu_intrinsics.h>
#endif
//ATTRIBUTE_ALIGNED16(class) btQuadWordStorage
//some issues under PS3 Linux with IBM 2.1 SDK, gcc compiler prevent from using aligned quadword. todo: look into this
@@ -25,10 +33,35 @@ subject to the following restrictions:
class btQuadWordStorage
{
protected:
#if defined __PPU__ || defined __SPU__
union {
vec_float4 m_Vec128;
struct
{
#endif
btScalar m_x;
btScalar m_y;
btScalar m_z;
btScalar m_unusedW;
#if defined __PPU__ || defined __SPU__
};
};
#endif
public:
#if defined __PPU__ || defined __SPU__
inline const vec_float4 get128( ) const
{
return m_Vec128;
}
inline vec_float4 get128( )
{
return m_Vec128;
}
#endif //
};