10#ifndef EIGEN_SELFADJOINT_MATRIX_MATRIX_H
11#define EIGEN_SELFADJOINT_MATRIX_MATRIX_H
18template<
typename Scalar,
typename Index,
int Pack1,
int Pack2_dummy,
int StorageOrder>
21 template<
int BlockRows>
inline
25 for(
Index k=0; k<i; k++)
27 blockA[count++] = lhs(i+w,k);
32 for(
Index w=0; w<h; w++)
33 blockA[count++] = numext::conj(lhs(k, i+w));
35 blockA[count++] = numext::real(lhs(k,k));
38 blockA[count++] = lhs(i+w, k);
44 blockA[count++] = numext::conj(lhs(k, i+w));
53 HasHalf = (int)HalfPacketSize < (
int)PacketSize,
54 HasQuarter = (int)QuarterPacketSize < (
int)HalfPacketSize};
66 if(
Pack1>=3*PacketSize)
70 if(
Pack1>=2*PacketSize)
74 if(
Pack1>=1*PacketSize)
89 for(
Index k=0; k<i; k++)
90 blockA[count++] = lhs(i, k);
92 blockA[count++] = numext::real(lhs(i, i));
94 for(
Index k=i+1; k<cols; k++)
95 blockA[count++] = numext::conj(lhs(k, i));
100template<
typename Scalar,
typename Index,
int nr,
int StorageOrder>
117 blockB[count+0] = rhs(k,
j2+0);
118 blockB[count+1] = rhs(k,
j2+1);
121 blockB[count+2] = rhs(k,
j2+2);
122 blockB[count+3] = rhs(k,
j2+3);
126 blockB[count+4] = rhs(k,
j2+4);
127 blockB[count+5] = rhs(k,
j2+5);
128 blockB[count+6] = rhs(k,
j2+6);
129 blockB[count+7] = rhs(k,
j2+7);
145 blockB[count+0] = numext::conj(rhs(
j2+0,k));
146 blockB[count+1] = numext::conj(rhs(
j2+1,k));
147 blockB[count+2] = numext::conj(rhs(
j2+2,k));
148 blockB[count+3] = numext::conj(rhs(
j2+3,k));
149 blockB[count+4] = numext::conj(rhs(
j2+4,k));
150 blockB[count+5] = numext::conj(rhs(
j2+5,k));
151 blockB[count+6] = numext::conj(rhs(
j2+6,k));
152 blockB[count+7] = numext::conj(rhs(
j2+7,k));
160 for (
Index w=0 ; w<h; ++w)
161 blockB[count+w] = rhs(k,
j2+w);
163 blockB[count+h] = numext::real(rhs(k,k));
166 for (
Index w=h+1 ; w<8; ++w)
167 blockB[count+w] = numext::conj(rhs(
j2+w,k));
174 blockB[count+0] = rhs(k,
j2+0);
175 blockB[count+1] = rhs(k,
j2+1);
176 blockB[count+2] = rhs(k,
j2+2);
177 blockB[count+3] = rhs(k,
j2+3);
178 blockB[count+4] = rhs(k,
j2+4);
179 blockB[count+5] = rhs(k,
j2+5);
180 blockB[count+6] = rhs(k,
j2+6);
181 blockB[count+7] = rhs(k,
j2+7);
194 blockB[count+0] = numext::conj(rhs(
j2+0,k));
195 blockB[count+1] = numext::conj(rhs(
j2+1,k));
196 blockB[count+2] = numext::conj(rhs(
j2+2,k));
197 blockB[count+3] = numext::conj(rhs(
j2+3,k));
205 for (
Index w=0 ; w<h; ++w)
206 blockB[count+w] = rhs(k,
j2+w);
208 blockB[count+h] = numext::real(rhs(k,k));
211 for (
Index w=h+1 ; w<4; ++w)
212 blockB[count+w] = numext::conj(rhs(
j2+w,k));
219 blockB[count+0] = rhs(k,
j2+0);
220 blockB[count+1] = rhs(k,
j2+1);
221 blockB[count+2] = rhs(k,
j2+2);
222 blockB[count+3] = rhs(k,
j2+3);
235 blockB[count+0] = numext::conj(rhs(
j2+0,k));
236 blockB[count+1] = numext::conj(rhs(
j2+1,k));
237 blockB[count+2] = numext::conj(rhs(
j2+2,k));
238 blockB[count+3] = numext::conj(rhs(
j2+3,k));
239 blockB[count+4] = numext::conj(rhs(
j2+4,k));
240 blockB[count+5] = numext::conj(rhs(
j2+5,k));
241 blockB[count+6] = numext::conj(rhs(
j2+6,k));
242 blockB[count+7] = numext::conj(rhs(
j2+7,k));
253 blockB[count+0] = numext::conj(rhs(
j2+0,k));
254 blockB[count+1] = numext::conj(rhs(
j2+1,k));
255 blockB[count+2] = numext::conj(rhs(
j2+2,k));
256 blockB[count+3] = numext::conj(rhs(
j2+3,k));
269 blockB[count] = numext::conj(rhs(
j2,k));
275 blockB[count] = numext::real(rhs(
j2,
j2));
284 blockB[count] = rhs(k,
j2);
294template <
typename Scalar,
typename Index,
300template <
typename Scalar,
typename Index,
307 static EIGEN_STRONG_INLINE
void run(
320 ::run(cols, rows, rhs,
rhsStride, lhs,
lhsStride, res,
resIncr,
resStride, alpha,
blocking);
324template <
typename Scalar,
typename Index,
331 static EIGEN_DONT_INLINE
void run(
339template <
typename Scalar,
typename Index,
366 kc = (std::min)(kc,mc);
367 std::size_t
sizeA = kc*mc;
368 std::size_t
sizeB = kc*cols;
369 ei_declare_aligned_stack_constructed_variable(Scalar, blockA,
sizeA,
blocking.blockA());
370 ei_declare_aligned_stack_constructed_variable(Scalar, blockB,
sizeB,
blocking.blockB());
407 for(
Index i2=k2+kc; i2<size; i2+=mc)
409 const Index actual_mc = (std::min)(i2+mc,size)-i2;
410 gemm_pack_lhs<Scalar, Index, LhsMapper, Traits::mr, Traits::LhsProgress, typename Traits::LhsPacket4Packing, LhsStorageOrder,false>()
411 (blockA, lhs.getSubMapper(i2, k2), actual_kc, actual_mc);
413 gebp_kernel(res.getSubMapper(i2, 0), blockA, blockB, actual_mc, actual_kc, cols, alpha);
419template <
typename Scalar,
typename Index,
420 int LhsStorageOrder,
bool ConjugateLhs,
421 int RhsStorageOrder,
bool ConjugateRhs,
426 static EIGEN_DONT_INLINE
void run(
434template <
typename Scalar,
typename Index,
456 std::size_t
sizeA = kc*mc;
457 std::size_t
sizeB = kc*cols;
458 ei_declare_aligned_stack_constructed_variable(Scalar, blockA,
sizeA,
blocking.blockA());
459 ei_declare_aligned_stack_constructed_variable(Scalar, blockB,
sizeB,
blocking.blockB());
490template<
typename Lhs,
int LhsMode,
typename Rhs,
int RhsMode>
507 template<
typename Dest>
512 typename internal::add_const_on_value_type<ActualLhsType>::type lhs = LhsBlasTraits::extract(
a_lhs);
513 typename internal::add_const_on_value_type<ActualRhsType>::type rhs = RhsBlasTraits::extract(
a_rhs);
516 * RhsBlasTraits::extractScalarFactor(
a_rhs);
519 Lhs::MaxRowsAtCompileTime, Rhs::MaxColsAtCompileTime, Lhs::MaxColsAtCompileTime,1>
BlockingType;
529 Dest::InnerStrideAtCompileTime>
531 lhs.rows(), rhs.cols(),
532 &lhs.coeffRef(0,0), lhs.outerStride(),
533 &rhs.coeffRef(0,0), rhs.outerStride(),
534 &
dst.coeffRef(0,0),
dst.innerStride(),
dst.outerStride(),
Base class for all dense matrices, vectors, and expressions.
Definition MatrixBase.h:50
Expression of the product of two arbitrary matrices or vectors.
Definition Product.h:75
Definition BlasUtil.h:389
Definition GeneralMatrixMatrix.h:248
@ SelfAdjoint
Used in BandMatrix and SelfAdjointView to indicate that the matrix is self-adjoint.
Definition Constants.h:225
@ Lower
View matrix as a lower triangular matrix.
Definition Constants.h:209
@ Upper
View matrix as an upper triangular matrix.
Definition Constants.h:211
@ ColMajor
Storage order is column major (see TopicStorageOrders).
Definition Constants.h:319
@ RowMajor
Storage order is row major (see TopicStorageOrders).
Definition Constants.h:321
const unsigned int RowMajorBit
for a matrix, this means that the storage order is row-major.
Definition Constants.h:66
Namespace containing all symbols from the Eigen library.
Definition LDLT.h:16
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition Meta.h:74
Holds information about the various numeric (i.e.
Definition NumTraits.h:236
Definition BlasUtil.h:403
Definition GeneralBlockPanelKernel.h:1058
Definition GenericPacketMath.h:107
Definition SelfadjointMatrixMatrix.h:298
Definition ProductEvaluators.h:793
Definition SelfadjointMatrixMatrix.h:20
Definition SelfadjointMatrixMatrix.h:102
Definition ForwardDeclarations.h:17
Definition GenericPacketMath.h:133