mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-09-15 10:53:50 +08:00
Fix for msvc 2012 and older
This commit is contained in:
parent
373c340b71
commit
d123717e21
@ -373,11 +373,7 @@ struct nullary_wrapper<Scalar,NullaryOp,false,false,true>
|
|||||||
// In this case, i==0 and j is used for the actual iteration.
|
// In this case, i==0 and j is used for the actual iteration.
|
||||||
template<typename Scalar,typename NullaryOp>
|
template<typename Scalar,typename NullaryOp>
|
||||||
struct nullary_wrapper<Scalar,NullaryOp,false,true,false>
|
struct nullary_wrapper<Scalar,NullaryOp,false,true,false>
|
||||||
: nullary_wrapper<Scalar,NullaryOp,false,true,true> // to get the identity wrapper
|
|
||||||
{
|
{
|
||||||
typedef nullary_wrapper<Scalar,NullaryOp,false,true,true> base;
|
|
||||||
using base::operator();
|
|
||||||
using base::packetOp;
|
|
||||||
template <typename Index>
|
template <typename Index>
|
||||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar operator()(const NullaryOp& op, Index i, Index j) const {
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar operator()(const NullaryOp& op, Index i, Index j) const {
|
||||||
eigen_assert(i==0 || j==0);
|
eigen_assert(i==0 || j==0);
|
||||||
@ -387,6 +383,11 @@ struct nullary_wrapper<Scalar,NullaryOp,false,true,false>
|
|||||||
eigen_assert(i==0 || j==0);
|
eigen_assert(i==0 || j==0);
|
||||||
return op.template packetOp<T>(i+j);
|
return op.template packetOp<T>(i+j);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename Index>
|
||||||
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar operator()(const NullaryOp& op, Index i) const { return op(i); }
|
||||||
|
template <typename T, typename Index>
|
||||||
|
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T packetOp(const NullaryOp& op, Index i) const { return op.template packetOp<T>(i); }
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename Scalar,typename NullaryOp>
|
template<typename Scalar,typename NullaryOp>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user