49 IsRowMajor = StorageOrder ==
RowMajor ? 1 : 0,
50 IsLower = UpLo ==
Lower ? 1 : 0,
51 FirstTriangular = IsRowMajor == IsLower
56 conj_helper<RealScalar, Scalar, false, ConjugateRhs> cjd;
65 if (FirstTriangular) bound =
size - bound;
67 for (
Index j = FirstTriangular ? bound : 0;
j < (FirstTriangular ?
size : bound);
j += 2) {
72 Packet ptmp0 = pset1<Packet>(t0);
73 Scalar t1 = cjAlpha * rhs[
j + 1];
74 Packet ptmp1 = pset1<Packet>(t1);
77 Packet ptmp2 = pset1<Packet>(t2);
79 Packet ptmp3 = pset1<Packet>(t3);
81 Index starti = FirstTriangular ? 0 :
j + 2;
84 Index alignedEnd = alignedStart + ((endi - alignedStart) / (PacketSize)) * (PacketSize);
88 if (FirstTriangular) {
89 res[
j] += cj0.pmul(A1[
j], t1);
90 t3 += cj1.pmul(A1[
j], rhs[
j]);
92 res[
j + 1] += cj0.pmul(A0[
j + 1], t0);
93 t2 += cj1.pmul(A0[
j + 1], rhs[
j + 1]);
96 for (
Index i = starti;
i < alignedStart; ++
i) {
97 res[
i] += cj0.pmul(A0[
i], t0) + cj0.pmul(A1[
i], t1);
98 t2 += cj1.pmul(A0[
i], rhs[
i]);
99 t3 += cj1.pmul(A1[
i], rhs[
i]);
107 for (
Index i = alignedStart;
i < alignedEnd;
i += PacketSize) {
108 Packet A0i = ploadu<Packet>(a0It);
110 Packet A1i = ploadu<Packet>(a1It);
114 Packet Xi = pload<Packet>(resIt);
116 Xi = pcj0.pmadd(A0i, ptmp0, pcj0.pmadd(A1i, ptmp1, Xi));
117 ptmp2 = pcj1.pmadd(A0i,
Bi, ptmp2);
118 ptmp3 = pcj1.pmadd(A1i,
Bi, ptmp3);
122 for (
Index i = alignedEnd;
i < endi;
i++) {
123 res[
i] += cj0.pmul(A0[
i], t0) + cj0.pmul(A1[
i], t1);
124 t2 += cj1.pmul(A0[
i], rhs[
i]);
125 t3 += cj1.pmul(A1[
i], rhs[
i]);
131 for (
Index j = FirstTriangular ? 0 : bound;
j < (FirstTriangular ? bound :
size);
j++) {
137 for (
Index i = FirstTriangular ? 0 :
j + 1;
i < (FirstTriangular ?
j :
size);
i++) {
138 res[
i] += cj0.pmul(A0[
i], t1);
139 t2 += cj1.pmul(A0[
i], rhs[
i]);
AnnoyingScalar conj(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:133
int i
Definition: BiCGSTAB_step_by_step.cpp:9
#define EIGEN_RESTRICT
Definition: Macros.h:1067
cout<< "Here is the matrix m:"<< endl<< m<< endl;Matrix< ptrdiff_t, 3, 1 > res
Definition: PartialRedux_count.cpp:3
Scalar Scalar int size
Definition: benchVecAdd.cpp:17
SCALAR Scalar
Definition: bench_gemm.cpp:45
NumTraits< Scalar >::Real RealScalar
Definition: bench_gemm.cpp:46
internal::packet_traits< Scalar >::type Packet
Definition: benchmark-blocking-sizes.cpp:54
@ IsComplex
Definition: common.h:73
float real
Definition: datatypes.h:10
@ Lower
Definition: Constants.h:211
@ RowMajor
Definition: Constants.h:320
RealScalar alpha
Definition: level1_cplx_impl.h:151
constexpr bool logical_xor(bool a, bool b)
Definition: Meta.h:737
static Index first_default_aligned(const DenseBase< Derived > &m)
Definition: DenseCoeffsBase.h:539
EIGEN_DEVICE_FUNC void pstore(Scalar *to, const Packet &from)
Definition: GenericPacketMath.h:891
EIGEN_DEVICE_FUNC unpacket_traits< Packet >::type predux(const Packet &a)
Definition: GenericPacketMath.h:1232
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE T maxi(const T &x, const T &y)
Definition: MathFunctions.h:926
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:83
double Bi
Biot number.
Definition: thermal_fibre.cc:85
T Real
Definition: NumTraits.h:183
Scalar type
Definition: GenericPacketMath.h:109
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2