mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-04 18:54:00 +08:00
move arch-specific code to arch/SSE and arch/AltiVec subdirs.
rename the noarch PacketMath.h to DummyPacketMath.h
This commit is contained in:
parent
3562b01105
commit
dca416cace
@ -50,11 +50,12 @@ namespace Eigen {
|
||||
|
||||
#include "src/Core/NumTraits.h"
|
||||
#include "src/Core/MathFunctions.h"
|
||||
#include "src/Core/PacketMath.h"
|
||||
#include "src/Core/DummyPacketMath.h"
|
||||
|
||||
#if defined EIGEN_VECTORIZE_SSE
|
||||
#include "src/Core/PacketMath_SSE.h"
|
||||
#include "src/Core/arch/SSE/PacketMath.h"
|
||||
#elif defined EIGEN_VECTORIZE_ALTIVEC
|
||||
#include "src/Core/PacketMath_Altivec.h"
|
||||
#include "src/Core/arch/AltiVec/PacketMath.h"
|
||||
#endif
|
||||
|
||||
#include "src/Core/Functors.h"
|
||||
|
@ -22,12 +22,8 @@
|
||||
// License and a copy of the GNU General Public License along with
|
||||
// Eigen. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#ifndef EIGEN_PACKET_MATH_H
|
||||
#define EIGEN_PACKET_MATH_H
|
||||
|
||||
#ifndef EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD
|
||||
#define EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD 16
|
||||
#endif
|
||||
#ifndef EIGEN_DUMMY_PACKET_MATH_H
|
||||
#define EIGEN_DUMMY_PACKET_MATH_H
|
||||
|
||||
// Default implementation for types not supported by the vectorization.
|
||||
// In practice these functions are provided to make easier the writting
|
||||
@ -76,5 +72,5 @@ template <typename Scalar> inline Scalar ei_preduxp(const Scalar* vecs) { return
|
||||
/** \internal \returns the sum of the elements of \a a*/
|
||||
template <typename Scalar> inline Scalar ei_predux(const Scalar& a) { return a; }
|
||||
|
||||
#endif // EIGEN_PACKET_MATH_H
|
||||
#endif // EIGEN_DUMMY_PACKET_MATH_H
|
||||
|
@ -26,11 +26,9 @@
|
||||
#ifndef EIGEN_PACKET_MATH_ALTIVEC_H
|
||||
#define EIGEN_PACKET_MATH_ALTIVEC_H
|
||||
|
||||
#ifndef EIGEN_VECTORIZE_ALTIVEC
|
||||
#error include PacketMath_Altivec without EIGEN_VECTORIZE_ALTIVEC
|
||||
#endif
|
||||
|
||||
#ifndef EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD
|
||||
#define EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD 4
|
||||
#endif
|
||||
|
||||
static const vector int v0i = vec_splat_u32(0);
|
||||
static const vector int v16i_ = vec_splat_u32(-16);
|
||||
@ -108,4 +106,3 @@ inline int ei_pfirst(const vector int a)
|
||||
}
|
||||
|
||||
#endif // EIGEN_PACKET_MATH_ALTIVEC_H
|
||||
|
@ -25,8 +25,8 @@
|
||||
#ifndef EIGEN_PACKET_MATH_SSE_H
|
||||
#define EIGEN_PACKET_MATH_SSE_H
|
||||
|
||||
#ifndef EIGEN_VECTORIZE_SSE
|
||||
#error include PacketMath_SSE without EIGEN_VECTORIZE_SSE
|
||||
#ifndef EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD
|
||||
#define EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD 16
|
||||
#endif
|
||||
|
||||
template<> struct ei_packet_traits<float> { typedef __m128 type; enum {size=4}; };
|
Loading…
x
Reference in New Issue
Block a user