* rework Map, allow vectorization

* rework PacketMath and DummyPacketMath, make these actual template
specializations instead of just overriding by non-template inline
functions
* introduce ei_ploadt and ei_pstoret, make use of them in Map and Matrix
* remove Matrix::map() methods, use Map constructors instead.
This commit is contained in:
Benoit Jacob
2008-06-27 01:22:35 +00:00
parent e5d301dc96
commit e27b2b95cf
15 changed files with 220 additions and 216 deletions

View File

@@ -72,6 +72,11 @@ inline vector int ei_pmax(const vector int a, const vector int b) { r
inline vector float ei_pload(const float* from) { return vec_ld(0, from); }
inline vector int ei_pload(const int* from) { return vec_ld(0, from); }
inline vector float ei_ploadu(const float*)
{ EIGEN_STATIC_ASSERT(unaligned_load_and_store_operations_unimplemented_on_AltiVec) }
inline vector int ei_ploadu(const int* )
{ EIGEN_STATIC_ASSERT(unaligned_load_and_store_operations_unimplemented_on_AltiVec) }
inline vector float ei_pset1(const float& from)
{
static float __attribute__(aligned(16)) af[4];
@@ -93,6 +98,11 @@ inline vector int ei_pset1(const int& from)
inline void ei_pstore(float* to, const vector float from) { vec_st(from, 0, to); }
inline void ei_pstore(int* to, const vector int from) { vec_st(from, 0, to); }
inline void ei_pstoreu(float*, const vector float)
{ EIGEN_STATIC_ASSERT(unaligned_load_and_store_operations_unimplemented_on_AltiVec) }
inline void ei_pstoreu(int* , const vector int )
{ EIGEN_STATIC_ASSERT(unaligned_load_and_store_operations_unimplemented_on_AltiVec) }
inline float ei_pfirst(const vector float a)
{
static float __attribute__(aligned(16)) af[4];