MOAB
4.9.3pre
|
#include <SelfadjointMatrixMatrix.h>
Public Member Functions | |
template<int BlockRows> | |
void | pack (Scalar *blockA, const const_blas_data_mapper< Scalar, Index, StorageOrder > &lhs, Index cols, Index i, Index &count) |
void | operator() (Scalar *blockA, const Scalar *_lhs, Index lhsStride, Index cols, Index rows) |
Definition at line 19 of file SelfadjointMatrixMatrix.h.
void Eigen::internal::symm_pack_lhs< Scalar, Index, Pack1, Pack2_dummy, StorageOrder >::operator() | ( | Scalar * | blockA, |
const Scalar * | _lhs, | ||
Index | lhsStride, | ||
Index | cols, | ||
Index | rows | ||
) | [inline] |
Definition at line 46 of file SelfadjointMatrixMatrix.h.
{ enum { PacketSize = packet_traits<Scalar>::size }; const_blas_data_mapper<Scalar,Index,StorageOrder> lhs(_lhs,lhsStride); Index count = 0; //Index peeled_mc3 = (rows/Pack1)*Pack1; const Index peeled_mc3 = Pack1>=3*PacketSize ? (rows/(3*PacketSize))*(3*PacketSize) : 0; const Index peeled_mc2 = Pack1>=2*PacketSize ? peeled_mc3+((rows-peeled_mc3)/(2*PacketSize))*(2*PacketSize) : 0; const Index peeled_mc1 = Pack1>=1*PacketSize ? (rows/(1*PacketSize))*(1*PacketSize) : 0; if(Pack1>=3*PacketSize) for(Index i=0; i<peeled_mc3; i+=3*PacketSize) pack<3*PacketSize>(blockA, lhs, cols, i, count); if(Pack1>=2*PacketSize) for(Index i=peeled_mc3; i<peeled_mc2; i+=2*PacketSize) pack<2*PacketSize>(blockA, lhs, cols, i, count); if(Pack1>=1*PacketSize) for(Index i=peeled_mc2; i<peeled_mc1; i+=1*PacketSize) pack<1*PacketSize>(blockA, lhs, cols, i, count); // do the same with mr==1 for(Index i=peeled_mc1; i<rows; i++) { for(Index k=0; k<i; k++) blockA[count++] = lhs(i, k); // normal blockA[count++] = numext::real(lhs(i, i)); // real (diagonal) for(Index k=i+1; k<cols; k++) blockA[count++] = numext::conj(lhs(k, i)); // transposed } }
void Eigen::internal::symm_pack_lhs< Scalar, Index, Pack1, Pack2_dummy, StorageOrder >::pack | ( | Scalar * | blockA, |
const const_blas_data_mapper< Scalar, Index, StorageOrder > & | lhs, | ||
Index | cols, | ||
Index | i, | ||
Index & | count | ||
) | [inline] |
Definition at line 22 of file SelfadjointMatrixMatrix.h.
{ // normal copy for(Index k=0; k<i; k++) for(Index w=0; w<BlockRows; w++) blockA[count++] = lhs(i+w,k); // normal // symmetric copy Index h = 0; for(Index k=i; k<i+BlockRows; k++) { for(Index w=0; w<h; w++) blockA[count++] = numext::conj(lhs(k, i+w)); // transposed blockA[count++] = numext::real(lhs(k,k)); // real (diagonal) for(Index w=h+1; w<BlockRows; w++) blockA[count++] = lhs(i+w, k); // normal ++h; } // transposed copy for(Index k=i+BlockRows; k<cols; k++) for(Index w=0; w<BlockRows; w++) blockA[count++] = numext::conj(lhs(k, i+w)); // transposed }