mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-13 12:19:12 +08:00
fix my previous commit with EIGEN_EMPTY macro bug
This commit is contained in:
parent
9b06e072a5
commit
4ac8cabf8a
@ -366,8 +366,10 @@ static EIGEN_DONT_INLINE void ei_cache_friendly_product_colmajor_times_vector(
|
|||||||
ei_pstore(&res[j OFFSET], \
|
ei_pstore(&res[j OFFSET], \
|
||||||
ei_padd(ei_pload(&res[j OFFSET]), \
|
ei_padd(ei_pload(&res[j OFFSET]), \
|
||||||
ei_padd( \
|
ei_padd( \
|
||||||
ei_padd(ei_pmul(ptmp0,ei_pload ## A0(&lhs0[j OFFSET])),ei_pmul(ptmp1,ei_pload ## A13(&lhs1[j OFFSET]))), \
|
ei_padd(ei_pmul(ptmp0,EIGEN_CAT(ei_pload , A0)(&lhs0[j OFFSET])), \
|
||||||
ei_padd(ei_pmul(ptmp2,ei_pload ## A2(&lhs2[j OFFSET])),ei_pmul(ptmp3,ei_pload ## A13(&lhs3[j OFFSET]))) )))
|
ei_pmul(ptmp1,EIGEN_CAT(ei_pload , A13)(&lhs1[j OFFSET]))), \
|
||||||
|
ei_padd(ei_pmul(ptmp2,EIGEN_CAT(ei_pload , A2)(&lhs2[j OFFSET])), \
|
||||||
|
ei_pmul(ptmp3,EIGEN_CAT(ei_pload , A13)(&lhs3[j OFFSET]))) )))
|
||||||
|
|
||||||
typedef typename ei_packet_traits<Scalar>::type Packet;
|
typedef typename ei_packet_traits<Scalar>::type Packet;
|
||||||
const int PacketSize = sizeof(Packet)/sizeof(Scalar);
|
const int PacketSize = sizeof(Packet)/sizeof(Scalar);
|
||||||
@ -552,10 +554,10 @@ static EIGEN_DONT_INLINE void ei_cache_friendly_product_rowmajor_times_vector(
|
|||||||
|
|
||||||
#define _EIGEN_ACCUMULATE_PACKETS(A0,A13,A2,OFFSET) {\
|
#define _EIGEN_ACCUMULATE_PACKETS(A0,A13,A2,OFFSET) {\
|
||||||
Packet b = ei_pload(&rhs[j]); \
|
Packet b = ei_pload(&rhs[j]); \
|
||||||
ptmp0 = ei_pmadd(b, ei_pload##A0 (&lhs0[j]), ptmp0); \
|
ptmp0 = ei_pmadd(b, EIGEN_CAT(ei_pload,A0) (&lhs0[j]), ptmp0); \
|
||||||
ptmp1 = ei_pmadd(b, ei_pload##A13(&lhs1[j]), ptmp1); \
|
ptmp1 = ei_pmadd(b, EIGEN_CAT(ei_pload,A13)(&lhs1[j]), ptmp1); \
|
||||||
ptmp2 = ei_pmadd(b, ei_pload##A2 (&lhs2[j]), ptmp2); \
|
ptmp2 = ei_pmadd(b, EIGEN_CAT(ei_pload,A2) (&lhs2[j]), ptmp2); \
|
||||||
ptmp3 = ei_pmadd(b, ei_pload##A13(&lhs3[j]), ptmp3); }
|
ptmp3 = ei_pmadd(b, EIGEN_CAT(ei_pload,A13)(&lhs3[j]), ptmp3); }
|
||||||
|
|
||||||
typedef typename ei_packet_traits<Scalar>::type Packet;
|
typedef typename ei_packet_traits<Scalar>::type Packet;
|
||||||
const int PacketSize = sizeof(Packet)/sizeof(Scalar);
|
const int PacketSize = sizeof(Packet)/sizeof(Scalar);
|
||||||
|
@ -168,6 +168,9 @@ using Eigen::ei_cos;
|
|||||||
// just an empty macro !
|
// just an empty macro !
|
||||||
#define EIGEN_EMPTY
|
#define EIGEN_EMPTY
|
||||||
|
|
||||||
|
#define EIGEN_CAT2(a,b) a ## b
|
||||||
|
#define EIGEN_CAT(a,b) EIGEN_CAT2(a,b)
|
||||||
|
|
||||||
// format used in Eigen's documentation
|
// format used in Eigen's documentation
|
||||||
// needed to define it here as escaping characters in CMake add_definition's argument seems very problematic.
|
// needed to define it here as escaping characters in CMake add_definition's argument seems very problematic.
|
||||||
#define EIGEN_DOCS_IO_FORMAT IOFormat(3, AlignCols, " ", "\n", "", "")
|
#define EIGEN_DOCS_IO_FORMAT IOFormat(3, AlignCols, " ", "\n", "", "")
|
||||||
|
@ -44,8 +44,7 @@ namespace Eigen
|
|||||||
#define EI_PP_MAKE_STRING2(S) #S
|
#define EI_PP_MAKE_STRING2(S) #S
|
||||||
#define EI_PP_MAKE_STRING(S) EI_PP_MAKE_STRING2(S)
|
#define EI_PP_MAKE_STRING(S) EI_PP_MAKE_STRING2(S)
|
||||||
|
|
||||||
#define EI_PP_CAT2(a,b) a ## b
|
|
||||||
#define EI_PP_CAT(a,b) EI_PP_CAT2(a,b)
|
|
||||||
|
|
||||||
#ifndef EIGEN_NO_ASSERTION_CHECKING
|
#ifndef EIGEN_NO_ASSERTION_CHECKING
|
||||||
|
|
||||||
@ -236,7 +235,7 @@ template<typename T> struct GetDifferentType<std::complex<T> >
|
|||||||
{ typedef std::complex<typename GetDifferentType<T>::type> type; };
|
{ typedef std::complex<typename GetDifferentType<T>::type> type; };
|
||||||
|
|
||||||
// forward declaration of the main test function
|
// forward declaration of the main test function
|
||||||
void EI_PP_CAT(test_,EIGEN_TEST_FUNC)();
|
void EIGEN_CAT(test_,EIGEN_TEST_FUNC)();
|
||||||
|
|
||||||
using namespace Eigen;
|
using namespace Eigen;
|
||||||
|
|
||||||
@ -305,7 +304,7 @@ int main(int argc, char *argv[])
|
|||||||
Eigen::g_repeat = repeat;
|
Eigen::g_repeat = repeat;
|
||||||
Eigen::g_test_stack.push_back(EI_PP_MAKE_STRING(EIGEN_TEST_FUNC));
|
Eigen::g_test_stack.push_back(EI_PP_MAKE_STRING(EIGEN_TEST_FUNC));
|
||||||
|
|
||||||
EI_PP_CAT(test_,EIGEN_TEST_FUNC)();
|
EIGEN_CAT(test_,EIGEN_TEST_FUNC)();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user