mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-01-18 14:34:17 +08:00
typo
This commit is contained in:
parent
42c62c8876
commit
197ce96c00
@ -494,10 +494,10 @@ template <typename Scalar>
|
||||
struct ei_linspaced_op_impl<Scalar,false>
|
||||
{
|
||||
typedef typename ei_packet_traits<Scalar>::type PacketScalar;
|
||||
|
||||
ei_linspaced_op_impl(Scalar low, Scalar step) :
|
||||
m_low(low), m_step(step),
|
||||
m_packetStep(ei_pset1(ei_packet_traits<Scalar>::size*step)),
|
||||
|
||||
ei_linspaced_op_impl(Scalar low, Scalar step) :
|
||||
m_low(low), m_step(step),
|
||||
m_packetStep(ei_pset1(ei_packet_traits<Scalar>::size*step)),
|
||||
m_base(ei_padd(ei_pset1(low),ei_pmul(ei_pset1(step),ei_plset<Scalar>(-ei_packet_traits<Scalar>::size)))) {}
|
||||
|
||||
template<typename Index>
|
||||
@ -514,13 +514,13 @@ struct ei_linspaced_op_impl<Scalar,false>
|
||||
// random access for packet ops:
|
||||
// 1) each step
|
||||
// [low, ..., low] + ( [step, ..., step] * ( [i, ..., i] + [0, ..., size] ) )
|
||||
template <typename Scalar>
|
||||
template <typename Scalar>
|
||||
struct ei_linspaced_op_impl<Scalar,true>
|
||||
{
|
||||
typedef typename ei_packet_traits<Scalar>::type PacketScalar;
|
||||
|
||||
ei_linspaced_op_impl(Scalar low, Scalar step) :
|
||||
m_low(low), m_step(step),
|
||||
ei_linspaced_op_impl(Scalar low, Scalar step) :
|
||||
m_low(low), m_step(step),
|
||||
m_lowPacket(ei_pset1(m_low)), m_stepPacket(ei_pset1(m_step)), m_interPacket(ei_plset<Scalar>(0)) {}
|
||||
|
||||
template<typename Index>
|
||||
@ -544,7 +544,7 @@ struct ei_linspaced_op_impl<Scalar,true>
|
||||
template <typename Scalar, bool RandomAccess = true> struct ei_linspaced_op;
|
||||
template <typename Scalar, bool RandomAccess> struct ei_functor_traits< ei_linspaced_op<Scalar,RandomAccess> >
|
||||
{ enum { Cost = 1, PacketAccess = ei_packet_traits<Scalar>::size>1, IsRepeatable = true }; };
|
||||
template <typename Scalar, bool RandomAccess> struct ei_linspaced_op
|
||||
template <typename Scalar, bool RandomAccess> struct ei_linspaced_op
|
||||
{
|
||||
typedef typename ei_packet_traits<Scalar>::type PacketScalar;
|
||||
ei_linspaced_op(Scalar low, Scalar high, int num_steps) : impl(low, (high-low)/(num_steps-1)) {}
|
||||
@ -552,7 +552,7 @@ template <typename Scalar, bool RandomAccess> struct ei_linspaced_op
|
||||
EIGEN_STRONG_INLINE const Scalar operator() (Index i, Index = 0) const { return impl(i); }
|
||||
template<typename Index>
|
||||
EIGEN_STRONG_INLINE const PacketScalar packetOp(Index i, Index = 0) const { return impl.packetOp(i); }
|
||||
// This proxy object handles the actual required temporaries, the different
|
||||
// This proxy object handles the actual required temporaries, the different
|
||||
// implementations (random vs. sequential access) as well as the piping
|
||||
// correct piping to size 2/4 packet operations.
|
||||
const ei_linspaced_op_impl<Scalar,RandomAccess> impl;
|
||||
|
@ -310,37 +310,37 @@ struct ei_blas_traits<SelfCwiseBinaryOp<BinOp,NestedXpr> >
|
||||
static inline const XprType extract(const XprType& x) { return x; }
|
||||
};
|
||||
|
||||
template<bool DestIsTranposed, typename OtherDerived>
|
||||
template<bool DestIsTransposed, typename OtherDerived>
|
||||
struct ei_check_transpose_aliasing_compile_time_selector
|
||||
{
|
||||
enum { ret = ei_blas_traits<OtherDerived>::IsTransposed != DestIsTranposed
|
||||
enum { ret = ei_blas_traits<OtherDerived>::IsTransposed != DestIsTransposed
|
||||
};
|
||||
};
|
||||
|
||||
template<bool DestIsTranposed, typename BinOp, typename DerivedA, typename DerivedB>
|
||||
struct ei_check_transpose_aliasing_compile_time_selector<DestIsTranposed,CwiseBinaryOp<BinOp,DerivedA,DerivedB> >
|
||||
template<bool DestIsTransposed, typename BinOp, typename DerivedA, typename DerivedB>
|
||||
struct ei_check_transpose_aliasing_compile_time_selector<DestIsTransposed,CwiseBinaryOp<BinOp,DerivedA,DerivedB> >
|
||||
{
|
||||
enum { ret = ei_blas_traits<DerivedA>::IsTransposed != DestIsTranposed
|
||||
|| ei_blas_traits<DerivedB>::IsTransposed != DestIsTranposed
|
||||
enum { ret = ei_blas_traits<DerivedA>::IsTransposed != DestIsTransposed
|
||||
|| ei_blas_traits<DerivedB>::IsTransposed != DestIsTransposed
|
||||
};
|
||||
};
|
||||
|
||||
template<typename Scalar, bool DestIsTranposed, typename OtherDerived>
|
||||
template<typename Scalar, bool DestIsTransposed, typename OtherDerived>
|
||||
struct ei_check_transpose_aliasing_run_time_selector
|
||||
{
|
||||
static bool run(const Scalar* dest, const OtherDerived& src)
|
||||
{
|
||||
return (ei_blas_traits<OtherDerived>::IsTransposed != DestIsTranposed) && (dest!=0 && dest==(Scalar*)ei_extract_data(src));
|
||||
return (ei_blas_traits<OtherDerived>::IsTransposed != DestIsTransposed) && (dest!=0 && dest==(Scalar*)ei_extract_data(src));
|
||||
}
|
||||
};
|
||||
|
||||
template<typename Scalar, bool DestIsTranposed, typename BinOp, typename DerivedA, typename DerivedB>
|
||||
struct ei_check_transpose_aliasing_run_time_selector<Scalar,DestIsTranposed,CwiseBinaryOp<BinOp,DerivedA,DerivedB> >
|
||||
template<typename Scalar, bool DestIsTransposed, typename BinOp, typename DerivedA, typename DerivedB>
|
||||
struct ei_check_transpose_aliasing_run_time_selector<Scalar,DestIsTransposed,CwiseBinaryOp<BinOp,DerivedA,DerivedB> >
|
||||
{
|
||||
static bool run(const Scalar* dest, const CwiseBinaryOp<BinOp,DerivedA,DerivedB>& src)
|
||||
{
|
||||
return ((ei_blas_traits<DerivedA>::IsTransposed != DestIsTranposed) && (dest!=0 && dest==(Scalar*)ei_extract_data(src.lhs())))
|
||||
|| ((ei_blas_traits<DerivedB>::IsTransposed != DestIsTranposed) && (dest!=0 && dest==(Scalar*)ei_extract_data(src.rhs())));
|
||||
return ((ei_blas_traits<DerivedA>::IsTransposed != DestIsTransposed) && (dest!=0 && dest==(Scalar*)ei_extract_data(src.lhs())))
|
||||
|| ((ei_blas_traits<DerivedB>::IsTransposed != DestIsTransposed) && (dest!=0 && dest==(Scalar*)ei_extract_data(src.rhs())));
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user