Eigen::internal::gebp_traits< LhsScalar_, RhsScalar_, ConjLhs_, ConjRhs_, Arch, PacketSize_ > Class Template Reference

#include <GeneralBlockPanelKernel.h>

Public Types

enum  {
  ConjLhs = ConjLhs_ , ConjRhs = ConjRhs_ , Vectorizable = unpacket_traits<LhsPacket_>::vectorizable && unpacket_traits<RhsPacket_>::vectorizable , LhsPacketSize = Vectorizable ? unpacket_traits<LhsPacket_>::size : 1 ,
  RhsPacketSize = Vectorizable ? unpacket_traits<RhsPacket_>::size : 1 , ResPacketSize = Vectorizable ? unpacket_traits<ResPacket_>::size : 1 , NumberOfRegisters = EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS , nr = 4 ,
  default_mr = (plain_enum_min(16, NumberOfRegisters) / 2 / nr) * LhsPacketSize , mr = default_mr , LhsProgress = LhsPacketSize , RhsProgress = 1
}
 
typedef LhsScalar_ LhsScalar
 
typedef RhsScalar_ RhsScalar
 
typedef ScalarBinaryOpTraits< LhsScalar, RhsScalar >::ReturnType ResScalar
 
typedef std::conditional_t< Vectorizable, LhsPacket_, LhsScalarLhsPacket
 
typedef std::conditional_t< Vectorizable, RhsPacket_, RhsScalarRhsPacket
 
typedef std::conditional_t< Vectorizable, ResPacket_, ResScalarResPacket
 
typedef LhsPacket LhsPacket4Packing
 
typedef QuadPacket< RhsPacketRhsPacketx4
 
typedef ResPacket AccPacket
 

Public Member Functions

 PACKET_DECL_COND_POSTFIX (_, Lhs, PacketSize_)
 
 PACKET_DECL_COND_POSTFIX (_, Rhs, PacketSize_)
 
 PACKET_DECL_COND_POSTFIX (_, Res, PacketSize_)
 
EIGEN_STRONG_INLINE void initAcc (AccPacket &p)
 
template<typename RhsPacketType >
EIGEN_STRONG_INLINE void loadRhs (const RhsScalar *b, RhsPacketType &dest) const
 
EIGEN_STRONG_INLINE void loadRhs (const RhsScalar *b, RhsPacketx4 &dest) const
 
template<typename RhsPacketType >
EIGEN_STRONG_INLINE void updateRhs (const RhsScalar *b, RhsPacketType &dest) const
 
EIGEN_STRONG_INLINE void updateRhs (const RhsScalar *, RhsPacketx4 &) const
 
EIGEN_STRONG_INLINE void loadRhsQuad (const RhsScalar *b, RhsPacket &dest) const
 
template<typename LhsPacketType >
EIGEN_STRONG_INLINE void loadLhs (const LhsScalar *a, LhsPacketType &dest) const
 
template<typename LhsPacketType >
EIGEN_STRONG_INLINE void loadLhsUnaligned (const LhsScalar *a, LhsPacketType &dest) const
 
template<typename LhsPacketType , typename RhsPacketType , typename AccPacketType , typename LaneIdType >
EIGEN_STRONG_INLINE void madd (const LhsPacketType &a, const RhsPacketType &b, AccPacketType &c, RhsPacketType &tmp, const LaneIdType &) const
 
template<typename LhsPacketType , typename AccPacketType , typename LaneIdType >
EIGEN_STRONG_INLINE void madd (const LhsPacketType &a, const RhsPacketx4 &b, AccPacketType &c, RhsPacket &tmp, const LaneIdType &lane) const
 
EIGEN_STRONG_INLINE void acc (const AccPacket &c, const ResPacket &alpha, ResPacket &r) const
 
template<typename ResPacketHalf >
EIGEN_STRONG_INLINE void acc (const ResPacketHalf &c, const ResPacketHalf &alpha, ResPacketHalf &r) const
 

Member Typedef Documentation

◆ AccPacket

template<typename LhsScalar_ , typename RhsScalar_ , bool ConjLhs_, bool ConjRhs_, int Arch, int PacketSize_>
typedef ResPacket Eigen::internal::gebp_traits< LhsScalar_, RhsScalar_, ConjLhs_, ConjRhs_, Arch, PacketSize_ >::AccPacket

◆ LhsPacket

template<typename LhsScalar_ , typename RhsScalar_ , bool ConjLhs_, bool ConjRhs_, int Arch, int PacketSize_>
typedef std::conditional_t<Vectorizable, LhsPacket_, LhsScalar> Eigen::internal::gebp_traits< LhsScalar_, RhsScalar_, ConjLhs_, ConjRhs_, Arch, PacketSize_ >::LhsPacket

◆ LhsPacket4Packing

template<typename LhsScalar_ , typename RhsScalar_ , bool ConjLhs_, bool ConjRhs_, int Arch, int PacketSize_>
typedef LhsPacket Eigen::internal::gebp_traits< LhsScalar_, RhsScalar_, ConjLhs_, ConjRhs_, Arch, PacketSize_ >::LhsPacket4Packing

◆ LhsScalar

template<typename LhsScalar_ , typename RhsScalar_ , bool ConjLhs_, bool ConjRhs_, int Arch, int PacketSize_>
typedef LhsScalar_ Eigen::internal::gebp_traits< LhsScalar_, RhsScalar_, ConjLhs_, ConjRhs_, Arch, PacketSize_ >::LhsScalar

◆ ResPacket

template<typename LhsScalar_ , typename RhsScalar_ , bool ConjLhs_, bool ConjRhs_, int Arch, int PacketSize_>
typedef std::conditional_t<Vectorizable, ResPacket_, ResScalar> Eigen::internal::gebp_traits< LhsScalar_, RhsScalar_, ConjLhs_, ConjRhs_, Arch, PacketSize_ >::ResPacket

◆ ResScalar

template<typename LhsScalar_ , typename RhsScalar_ , bool ConjLhs_, bool ConjRhs_, int Arch, int PacketSize_>
typedef ScalarBinaryOpTraits<LhsScalar, RhsScalar>::ReturnType Eigen::internal::gebp_traits< LhsScalar_, RhsScalar_, ConjLhs_, ConjRhs_, Arch, PacketSize_ >::ResScalar

◆ RhsPacket

template<typename LhsScalar_ , typename RhsScalar_ , bool ConjLhs_, bool ConjRhs_, int Arch, int PacketSize_>
typedef std::conditional_t<Vectorizable, RhsPacket_, RhsScalar> Eigen::internal::gebp_traits< LhsScalar_, RhsScalar_, ConjLhs_, ConjRhs_, Arch, PacketSize_ >::RhsPacket

◆ RhsPacketx4

template<typename LhsScalar_ , typename RhsScalar_ , bool ConjLhs_, bool ConjRhs_, int Arch, int PacketSize_>
typedef QuadPacket<RhsPacket> Eigen::internal::gebp_traits< LhsScalar_, RhsScalar_, ConjLhs_, ConjRhs_, Arch, PacketSize_ >::RhsPacketx4

◆ RhsScalar

template<typename LhsScalar_ , typename RhsScalar_ , bool ConjLhs_, bool ConjRhs_, int Arch, int PacketSize_>
typedef RhsScalar_ Eigen::internal::gebp_traits< LhsScalar_, RhsScalar_, ConjLhs_, ConjRhs_, Arch, PacketSize_ >::RhsScalar

Member Enumeration Documentation

◆ anonymous enum

template<typename LhsScalar_ , typename RhsScalar_ , bool ConjLhs_, bool ConjRhs_, int Arch, int PacketSize_>
anonymous enum
Enumerator
ConjLhs 
ConjRhs 
Vectorizable 
LhsPacketSize 
RhsPacketSize 
ResPacketSize 
NumberOfRegisters 
nr 
default_mr 
mr 
LhsProgress 
RhsProgress 
407  {
408  ConjLhs = ConjLhs_,
409  ConjRhs = ConjRhs_,
414 
416 
417  // register block size along the N direction must be 1 or 4
418  nr = 4,
419 
420  // register block size along the M direction (currently, this one cannot be modified)
422 #if defined(EIGEN_HAS_SINGLE_INSTRUCTION_MADD) && !defined(EIGEN_VECTORIZE_ALTIVEC) && \
423  !defined(EIGEN_VECTORIZE_VSX) && ((!EIGEN_COMP_MSVC) || (EIGEN_COMP_MSVC >= 1914))
424  // we assume 16 registers or more
425  // See bug 992, if the scalar type is not vectorizable but that EIGEN_HAS_SINGLE_INSTRUCTION_MADD is defined,
426  // then using 3*LhsPacketSize triggers non-implemented paths in syrk.
427  // Bug 1515: MSVC prior to v19.14 yields to register spilling.
429 #else
430  mr = default_mr,
431 #endif
432 
434  RhsProgress = 1
435  };
#define EIGEN_HAS_SINGLE_INSTRUCTION_MADD
Definition: AltiVec/PacketMath.h:25
#define EIGEN_ARCH_DEFAULT_NUMBER_OF_REGISTERS
Definition: AltiVec/PacketMath.h:30
#define EIGEN_COMP_MSVC
Definition: Macros.h:131
@ nr
Definition: products/GeneralBlockPanelKernel.h:418
@ default_mr
Definition: products/GeneralBlockPanelKernel.h:421
@ ConjLhs
Definition: products/GeneralBlockPanelKernel.h:408
@ ResPacketSize
Definition: products/GeneralBlockPanelKernel.h:413
@ Vectorizable
Definition: products/GeneralBlockPanelKernel.h:410
@ RhsProgress
Definition: products/GeneralBlockPanelKernel.h:434
@ RhsPacketSize
Definition: products/GeneralBlockPanelKernel.h:412
@ LhsProgress
Definition: products/GeneralBlockPanelKernel.h:433
@ mr
Definition: products/GeneralBlockPanelKernel.h:430
@ NumberOfRegisters
Definition: products/GeneralBlockPanelKernel.h:415
@ ConjRhs
Definition: products/GeneralBlockPanelKernel.h:409
@ LhsPacketSize
Definition: products/GeneralBlockPanelKernel.h:411
constexpr int plain_enum_min(A a, B b)
Definition: Meta.h:649
@ size
Definition: GenericPacketMath.h:139
@ vectorizable
Definition: GenericPacketMath.h:141

Member Function Documentation

◆ acc() [1/2]

template<typename LhsScalar_ , typename RhsScalar_ , bool ConjLhs_, bool ConjRhs_, int Arch, int PacketSize_>
EIGEN_STRONG_INLINE void Eigen::internal::gebp_traits< LhsScalar_, RhsScalar_, ConjLhs_, ConjRhs_, Arch, PacketSize_ >::acc ( const AccPacket c,
const ResPacket alpha,
ResPacket r 
) const
inline
499  {
500  r = pmadd(c, alpha, r);
501  }
RealScalar alpha
Definition: level1_cplx_impl.h:151
EIGEN_STRONG_INLINE Packet4f pmadd(const Packet4f &a, const Packet4f &b, const Packet4f &c)
Definition: AltiVec/PacketMath.h:1218
r
Definition: UniformPSDSelfTest.py:20
int c
Definition: calibrate.py:100

References alpha, calibrate::c, Eigen::internal::pmadd(), and UniformPSDSelfTest::r.

Referenced by Eigen::internal::gebp_kernel< LhsScalar, RhsScalar, Index, DataMapper, mr, nr, ConjugateLhs, ConjugateRhs >::operator()(), and Eigen::internal::last_row_process_16_packets< LhsScalar, RhsScalar, Index, DataMapper, mr, nr, ConjugateLhs, ConjugateRhs, 16 >::operator()().

◆ acc() [2/2]

template<typename LhsScalar_ , typename RhsScalar_ , bool ConjLhs_, bool ConjRhs_, int Arch, int PacketSize_>
template<typename ResPacketHalf >
EIGEN_STRONG_INLINE void Eigen::internal::gebp_traits< LhsScalar_, RhsScalar_, ConjLhs_, ConjRhs_, Arch, PacketSize_ >::acc ( const ResPacketHalf &  c,
const ResPacketHalf &  alpha,
ResPacketHalf &  r 
) const
inline
504  {
505  r = pmadd(c, alpha, r);
506  }

References alpha, calibrate::c, Eigen::internal::pmadd(), and UniformPSDSelfTest::r.

◆ initAcc()

template<typename LhsScalar_ , typename RhsScalar_ , bool ConjLhs_, bool ConjRhs_, int Arch, int PacketSize_>
EIGEN_STRONG_INLINE void Eigen::internal::gebp_traits< LhsScalar_, RhsScalar_, ConjLhs_, ConjRhs_, Arch, PacketSize_ >::initAcc ( AccPacket p)
inline
445 { p = pset1<ResPacket>(ResScalar(0)); }
float * p
Definition: Tutorial_Map_using.cpp:9
ScalarBinaryOpTraits< LhsScalar, RhsScalar >::ReturnType ResScalar
Definition: products/GeneralBlockPanelKernel.h:401

References p.

Referenced by Eigen::internal::gebp_kernel< LhsScalar, RhsScalar, Index, DataMapper, mr, nr, ConjugateLhs, ConjugateRhs >::operator()().

◆ loadLhs()

template<typename LhsScalar_ , typename RhsScalar_ , bool ConjLhs_, bool ConjRhs_, int Arch, int PacketSize_>
template<typename LhsPacketType >
EIGEN_STRONG_INLINE void Eigen::internal::gebp_traits< LhsScalar_, RhsScalar_, ConjLhs_, ConjRhs_, Arch, PacketSize_ >::loadLhs ( const LhsScalar a,
LhsPacketType &  dest 
) const
inline
466  {
467  dest = pload<LhsPacketType>(a);
468  }
const Scalar * a
Definition: level2_cplx_impl.h:32

References a.

◆ loadLhsUnaligned()

template<typename LhsScalar_ , typename RhsScalar_ , bool ConjLhs_, bool ConjRhs_, int Arch, int PacketSize_>
template<typename LhsPacketType >
EIGEN_STRONG_INLINE void Eigen::internal::gebp_traits< LhsScalar_, RhsScalar_, ConjLhs_, ConjRhs_, Arch, PacketSize_ >::loadLhsUnaligned ( const LhsScalar a,
LhsPacketType &  dest 
) const
inline

◆ loadRhs() [1/2]

template<typename LhsScalar_ , typename RhsScalar_ , bool ConjLhs_, bool ConjRhs_, int Arch, int PacketSize_>
template<typename RhsPacketType >
EIGEN_STRONG_INLINE void Eigen::internal::gebp_traits< LhsScalar_, RhsScalar_, ConjLhs_, ConjRhs_, Arch, PacketSize_ >::loadRhs ( const RhsScalar b,
RhsPacketType &  dest 
) const
inline

◆ loadRhs() [2/2]

template<typename LhsScalar_ , typename RhsScalar_ , bool ConjLhs_, bool ConjRhs_, int Arch, int PacketSize_>
EIGEN_STRONG_INLINE void Eigen::internal::gebp_traits< LhsScalar_, RhsScalar_, ConjLhs_, ConjRhs_, Arch, PacketSize_ >::loadRhs ( const RhsScalar b,
RhsPacketx4 dest 
) const
inline
452  {
453  pbroadcast4(b, dest.B_0, dest.B1, dest.B2, dest.B3);
454  }
EIGEN_DEVICE_FUNC void pbroadcast4(const typename unpacket_traits< Packet >::type *a, Packet &a0, Packet &a1, Packet &a2, Packet &a3)
Definition: GenericPacketMath.h:849

References b, Eigen::internal::QuadPacket< Packet >::B1, Eigen::internal::QuadPacket< Packet >::B2, Eigen::internal::QuadPacket< Packet >::B3, Eigen::internal::QuadPacket< Packet >::B_0, and Eigen::internal::pbroadcast4().

◆ loadRhsQuad()

template<typename LhsScalar_ , typename RhsScalar_ , bool ConjLhs_, bool ConjRhs_, int Arch, int PacketSize_>
EIGEN_STRONG_INLINE void Eigen::internal::gebp_traits< LhsScalar_, RhsScalar_, ConjLhs_, ConjRhs_, Arch, PacketSize_ >::loadRhsQuad ( const RhsScalar b,
RhsPacket dest 
) const
inline

◆ madd() [1/2]

template<typename LhsScalar_ , typename RhsScalar_ , bool ConjLhs_, bool ConjRhs_, int Arch, int PacketSize_>
template<typename LhsPacketType , typename RhsPacketType , typename AccPacketType , typename LaneIdType >
EIGEN_STRONG_INLINE void Eigen::internal::gebp_traits< LhsScalar_, RhsScalar_, ConjLhs_, ConjRhs_, Arch, PacketSize_ >::madd ( const LhsPacketType &  a,
const RhsPacketType &  b,
AccPacketType &  c,
RhsPacketType &  tmp,
const LaneIdType &   
) const
inline
477  {
478  conj_helper<LhsPacketType, RhsPacketType, ConjLhs, ConjRhs> cj;
479  // It would be a lot cleaner to call pmadd all the time. Unfortunately if we
480  // let gcc allocate the register in which to store the result of the pmul
481  // (in the case where there is no FMA) gcc fails to figure out how to avoid
482  // spilling register.
483 #ifdef EIGEN_HAS_SINGLE_INSTRUCTION_MADD
485  c = cj.pmadd(a, b, c);
486 #else
487  tmp = b;
488  tmp = cj.pmul(a, tmp);
489  c = padd(c, tmp);
490 #endif
491  }
#define EIGEN_UNUSED_VARIABLE(var)
Definition: Macros.h:966
Eigen::Matrix< Scalar, Dynamic, Dynamic, ColMajor > tmp
Definition: level3_impl.h:365
EIGEN_DEVICE_FUNC Packet padd(const Packet &a, const Packet &b)
Definition: GenericPacketMath.h:318

References a, b, calibrate::c, EIGEN_UNUSED_VARIABLE, Eigen::internal::padd(), Eigen::internal::conj_helper< LhsType, RhsType, ConjLhs, ConjRhs >::pmadd(), Eigen::internal::conj_helper< LhsType, RhsType, ConjLhs, ConjRhs >::pmul(), and tmp.

Referenced by Eigen::internal::gebp_traits< LhsScalar_, RhsScalar_, ConjLhs_, ConjRhs_, Arch, PacketSize_ >::madd(), Eigen::internal::gebp_traits< std::complex< RealScalar >, RealScalar, ConjLhs_, false, Arch, PacketSize_ >::madd(), Eigen::internal::gebp_traits< std::complex< RealScalar >, std::complex< RealScalar >, ConjLhs_, ConjRhs_, Arch, PacketSize_ >::madd(), Eigen::internal::gebp_traits< RealScalar, std::complex< RealScalar >, false, ConjRhs_, Arch, PacketSize_ >::madd(), Eigen::internal::gebp_kernel< LhsScalar, RhsScalar, Index, DataMapper, mr, nr, ConjugateLhs, ConjugateRhs >::operator()(), and Eigen::internal::last_row_process_16_packets< LhsScalar, RhsScalar, Index, DataMapper, mr, nr, ConjugateLhs, ConjugateRhs, 16 >::operator()().

◆ madd() [2/2]

template<typename LhsScalar_ , typename RhsScalar_ , bool ConjLhs_, bool ConjRhs_, int Arch, int PacketSize_>
template<typename LhsPacketType , typename AccPacketType , typename LaneIdType >
EIGEN_STRONG_INLINE void Eigen::internal::gebp_traits< LhsScalar_, RhsScalar_, ConjLhs_, ConjRhs_, Arch, PacketSize_ >::madd ( const LhsPacketType &  a,
const RhsPacketx4 b,
AccPacketType &  c,
RhsPacket tmp,
const LaneIdType &  lane 
) const
inline
495  {
496  madd(a, b.get(lane), c, tmp, lane);
497  }
EIGEN_STRONG_INLINE void madd(const LhsPacketType &a, const RhsPacketType &b, AccPacketType &c, RhsPacketType &tmp, const LaneIdType &) const
Definition: products/GeneralBlockPanelKernel.h:476

References a, b, calibrate::c, Eigen::internal::gebp_traits< LhsScalar_, RhsScalar_, ConjLhs_, ConjRhs_, Arch, PacketSize_ >::madd(), and tmp.

◆ PACKET_DECL_COND_POSTFIX() [1/3]

template<typename LhsScalar_ , typename RhsScalar_ , bool ConjLhs_, bool ConjRhs_, int Arch, int PacketSize_>
Eigen::internal::gebp_traits< LhsScalar_, RhsScalar_, ConjLhs_, ConjRhs_, Arch, PacketSize_ >::PACKET_DECL_COND_POSTFIX ( _  ,
Lhs  ,
PacketSize_   
)

◆ PACKET_DECL_COND_POSTFIX() [2/3]

template<typename LhsScalar_ , typename RhsScalar_ , bool ConjLhs_, bool ConjRhs_, int Arch, int PacketSize_>
Eigen::internal::gebp_traits< LhsScalar_, RhsScalar_, ConjLhs_, ConjRhs_, Arch, PacketSize_ >::PACKET_DECL_COND_POSTFIX ( _  ,
Res  ,
PacketSize_   
)

◆ PACKET_DECL_COND_POSTFIX() [3/3]

template<typename LhsScalar_ , typename RhsScalar_ , bool ConjLhs_, bool ConjRhs_, int Arch, int PacketSize_>
Eigen::internal::gebp_traits< LhsScalar_, RhsScalar_, ConjLhs_, ConjRhs_, Arch, PacketSize_ >::PACKET_DECL_COND_POSTFIX ( _  ,
Rhs  ,
PacketSize_   
)

◆ updateRhs() [1/2]

template<typename LhsScalar_ , typename RhsScalar_ , bool ConjLhs_, bool ConjRhs_, int Arch, int PacketSize_>
EIGEN_STRONG_INLINE void Eigen::internal::gebp_traits< LhsScalar_, RhsScalar_, ConjLhs_, ConjRhs_, Arch, PacketSize_ >::updateRhs ( const RhsScalar ,
RhsPacketx4  
) const
inline
461 {}

◆ updateRhs() [2/2]

template<typename LhsScalar_ , typename RhsScalar_ , bool ConjLhs_, bool ConjRhs_, int Arch, int PacketSize_>
template<typename RhsPacketType >
EIGEN_STRONG_INLINE void Eigen::internal::gebp_traits< LhsScalar_, RhsScalar_, ConjLhs_, ConjRhs_, Arch, PacketSize_ >::updateRhs ( const RhsScalar b,
RhsPacketType &  dest 
) const
inline
457  {
458  loadRhs(b, dest);
459  }
EIGEN_STRONG_INLINE void loadRhs(const RhsScalar *b, RhsPacketType &dest) const
Definition: products/GeneralBlockPanelKernel.h:448

References b, and Eigen::internal::gebp_traits< LhsScalar_, RhsScalar_, ConjLhs_, ConjRhs_, Arch, PacketSize_ >::loadRhs().


The documentation for this class was generated from the following file: