10 #ifndef EIGEN_TRIANGULAR_SOLVER_VECTOR_H
11 #define EIGEN_TRIANGULAR_SOLVER_VECTOR_H
14 #include "../InternalHeaderCheck.h"
20 template <
typename LhsScalar,
typename RhsScalar,
typename Index,
int Mode,
bool Conjugate,
int StorageOrder>
30 template <
typename LhsScalar,
typename RhsScalar,
typename Index,
int Mode,
bool Conjugate>
40 std::conditional_t<Conjugate, const CwiseUnaryOp<typename internal::scalar_conjugate_op<LhsScalar>, LhsMap>,
44 for (
Index pi = IsLower ? 0 :
size; IsLower ? pi < size : pi > 0; IsLower ?
pi += PanelWidth :
pi -= PanelWidth) {
52 Index startRow = IsLower ?
pi :
pi - actualPanelWidth;
53 Index startCol = IsLower ? 0 :
pi;
56 false>
::run(actualPanelWidth,
r,
57 LhsMapper(&lhs.coeffRef(startRow, startCol), lhsStride),
58 RhsMapper(rhs + startCol, 1), rhs + startRow, 1, RhsScalar(-1));
61 for (
Index k = 0;
k < actualPanelWidth; ++
k) {
65 rhs[
i] -= (cjLhs.row(
i).segment(
s,
k).transpose().cwiseProduct(
76 template <
typename LhsScalar,
typename RhsScalar,
typename Index,
int Mode,
bool Conjugate>
84 std::conditional_t<Conjugate, const CwiseUnaryOp<typename internal::scalar_conjugate_op<LhsScalar>, LhsMap>,
89 for (
Index pi = IsLower ? 0 :
size; IsLower ? pi < size : pi > 0; IsLower ?
pi += PanelWidth :
pi -= PanelWidth) {
91 Index startBlock = IsLower ?
pi :
pi - actualPanelWidth;
92 Index endBlock = IsLower ?
pi + actualPanelWidth : 0;
94 for (
Index k = 0;
k < actualPanelWidth; ++
k) {
97 if (!(Mode &
UnitDiag)) rhs[
i] /= cjLhs.coeff(
i,
i);
99 Index r = actualPanelWidth -
k - 1;
104 Index r = IsLower ?
size - endBlock : startBlock;
110 false>
::run(
r, actualPanelWidth,
111 LhsMapper(&lhs.coeffRef(endBlock, startBlock), lhsStride),
112 RhsMapper(rhs + startBlock, 1), rhs + endBlock, 1, RhsScalar(-1));
int i
Definition: BiCGSTAB_step_by_step.cpp:9
#define EIGEN_TUNE_TRIANGULAR_PANEL_WIDTH
Definition: Settings.h:37
Scalar Scalar int size
Definition: benchVecAdd.cpp:17
Definition: ForwardDeclarations.h:102
A matrix or vector expression mapping an existing array of data.
Definition: Map.h:96
The matrix class, also used for vectors and row-vectors.
Definition: Eigen/Eigen/src/Core/Matrix.h:186
Convenience specialization of Stride to specify only an outer stride See class Map for some examples.
Definition: Stride.h:104
Definition: BlasUtil.h:443
#define min(a, b)
Definition: datatypes.h:22
@ UnitDiag
Definition: Constants.h:215
@ Lower
Definition: Constants.h:211
@ Upper
Definition: Constants.h:213
@ ColMajor
Definition: Constants.h:318
@ RowMajor
Definition: Constants.h:320
@ OnTheLeft
Definition: Constants.h:331
@ OnTheRight
Definition: Constants.h:333
RealScalar s
Definition: level1_cplx_impl.h:130
char char char int int * k
Definition: level2_impl.h:374
EIGEN_STRONG_INLINE bool is_identically_zero(const Scalar &s)
Definition: Meta.h:632
Namespace containing all symbols from the Eigen library.
Definition: bench_norm.cpp:70
auto run(Kernel kernel, Args &&... args) -> decltype(kernel(args...))
Definition: gpu_test_helper.h:414
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:83
const Mdouble pi
Definition: ExtendedMath.h:23
Definition: Eigen_Colamd.h:49
Definition: BlasUtil.h:42
static void run(Index size, const LhsScalar *_lhs, Index lhsStride, RhsScalar *rhs)
Definition: TriangularSolverVector.h:33
static void run(Index size, const LhsScalar *_lhs, Index lhsStride, RhsScalar *rhs)
Definition: TriangularSolverVector.h:79
static void run(Index size, const LhsScalar *_lhs, Index lhsStride, RhsScalar *rhs)
Definition: TriangularSolverVector.h:22
Definition: SolveTriangular.h:23