Go to the documentation of this file.
11 #ifndef EIGEN_JACOBI_H
12 #define EIGEN_JACOBI_H
34 template<
typename Scalar>
class JacobiRotation
69 template<
typename Derived>
92 template<
typename Scalar>
136 template<
typename Scalar>
137 template<
typename Derived>
160 template<
typename Scalar>
169 template<
typename Scalar>
229 template<
typename Scalar>
281 template<
typename VectorX,
typename VectorY,
typename OtherScalar>
292 template<
typename Derived>
293 template<
typename OtherScalar>
308 template<
typename Derived>
309 template<
typename OtherScalar>
320 template<
typename Scalar,
typename OtherScalar,
321 int SizeAtCompileTime,
int MinAlignment,
bool Vectorizable>
339 template<
typename Scalar,
typename OtherScalar,
340 int SizeAtCompileTime,
int MinAlignment>
353 if(SizeAtCompileTime ==
Dynamic && ((incrx==1 && incry==1) || PacketSize == 1))
356 enum { Peeling = 2 };
359 Index alignedEnd = alignedStart + ((
size-alignedStart)/PacketSize)*PacketSize;
361 const OtherPacket
pc = pset1<OtherPacket>(
c);
362 const OtherPacket
ps = pset1<OtherPacket>(
s);
379 for(
Index i=alignedStart;
i<alignedEnd;
i+=PacketSize)
391 Index peelingEnd = alignedStart + ((
size-alignedStart)/(Peeling*PacketSize))*(Peeling*PacketSize);
392 for(
Index i=alignedStart;
i<peelingEnd;
i+=Peeling*PacketSize)
395 Packet xi1 = ploadu<Packet>(
px+PacketSize);
397 Packet yi1 = pload <Packet>(
py+PacketSize);
402 px += Peeling*PacketSize;
403 py += Peeling*PacketSize;
405 if(alignedEnd!=peelingEnd)
407 Packet xi = ploadu<Packet>(
x+peelingEnd);
408 Packet yi = pload <Packet>(
y+peelingEnd);
424 else if(SizeAtCompileTime !=
Dynamic && MinAlignment>0)
426 const OtherPacket
pc = pset1<OtherPacket>(
c);
427 const OtherPacket
ps = pset1<OtherPacket>(
s);
446 apply_rotation_in_the_plane_selector<Scalar,OtherScalar,SizeAtCompileTime,MinAlignment,false>::run(
x,incrx,
y,incry,
size,
c,
s);
451 template<
typename VectorX,
typename VectorY,
typename OtherScalar>
461 Index incrx = xpr_x.derived().innerStride();
462 Index incry = xpr_y.derived().innerStride();
467 OtherScalar
c =
j.c();
468 OtherScalar
s =
j.s();
469 if (
c==OtherScalar(1) &&
s==OtherScalar(0))
474 VectorX::SizeAtCompileTime,
483 #endif // EIGEN_JACOBI_H
const AutoDiffScalar< DerType > & conj(const AutoDiffScalar< DerType > &x)
#define EIGEN_DEVICE_FUNC
Namespace containing all symbols from the Eigen library.
G makeGivens(v.x(), v.y())
EIGEN_DEVICE_FUNC void pstoreu(Scalar *to, const Packet &from)
internal::packet_traits< Scalar >::type Packet
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy x
void applyOnTheRight(const EigenBase< OtherDerived > &other)
EIGEN_DEVICE_FUNC JacobiRotation adjoint() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ResultType pmul(const LhsType &x, const RhsType &y) const
Rotation given by a cosine-sine pair.
const unsigned int PacketAccessBit
#define EIGEN_PLAIN_ENUM_MIN(a, b)
EIGEN_DEVICE_FUNC const Scalar & q
EIGEN_DEVICE_FUNC Scalar & c()
static EIGEN_DEVICE_FUNC void run(Scalar *x, Index incrx, Scalar *y, Index incry, Index size, OtherScalar c, OtherScalar s)
EIGEN_DEVICE_FUNC Packet psub(const Packet &a, const Packet &b)
EIGEN_DEVICE_FUNC JacobiRotation operator*(const JacobiRotation &other)
AnnoyingScalar conj(const AnnoyingScalar &x)
int RealScalar int RealScalar int RealScalar * pc
EIGEN_DEVICE_FUNC void pstore(Scalar *to, const Packet &from)
void applyOnTheLeft(const EigenBase< OtherDerived > &other)
NumTraits< Scalar >::Real RealScalar
EIGEN_DEVICE_FUNC Scalar s() const
EIGEN_DEVICE_FUNC JacobiRotation(const Scalar &c, const Scalar &s)
EIGEN_DEVICE_FUNC JacobiRotation transpose() const
EIGEN_DEVICE_FUNC bool abs2(bool x)
EIGEN_DEVICE_FUNC bool makeJacobi(const MatrixBase< Derived > &, Index p, Index q)
Base class for all dense matrices, vectors, and arrays.
EIGEN_DEVICE_FUNC Scalar c() const
int RealScalar int RealScalar int RealScalar RealScalar * ps
EIGEN_DEVICE_FUNC Packet padd(const Packet &a, const Packet &b)
static Index first_default_aligned(const DenseBase< Derived > &m)
static void run(Scalar *x, Index incrx, Scalar *y, Index incry, Index size, OtherScalar c, OtherScalar s)
Base class for all dense matrices, vectors, and expressions.
EIGEN_DEVICE_FUNC Scalar & s()
NumTraits< Scalar >::Real RealScalar
EIGEN_CONSTEXPR Index size(const T &x)
EIGEN_DEVICE_FUNC void makeGivens(const Scalar &p, const Scalar &q, Scalar *r=0)
Holds information about the various numeric (i.e. scalar) types allowed by Eigen.
Jet< T, N > sqrt(const Jet< T, N > &f)
EIGEN_DEVICE_FUNC void apply_rotation_in_the_plane(DenseBase< VectorX > &xpr_x, DenseBase< VectorY > &xpr_y, const JacobiRotation< OtherScalar > &j)
EIGEN_DEVICE_FUNC JacobiRotation()
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
RealScalar RealScalar * px
gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:02:34