Eigen::internal::packed_rank2_update_selector< Scalar, Index, UpLo > Struct Template Reference

#include <Rank2Update.h>

Static Public Member Functions

static void run (Index size, Scalar *mat, const Scalar *u, const Scalar *v, Scalar alpha)
 

Member Function Documentation

◆ run()

template<typename Scalar , typename Index , int UpLo>
static void Eigen::internal::packed_rank2_update_selector< Scalar, Index, UpLo >::run ( Index  size,
Scalar mat,
const Scalar u,
const Scalar v,
Scalar  alpha 
)
inlinestatic
38  {
39  typedef Map<const Matrix<Scalar, Dynamic, 1> > OtherMap;
40  Index offset = 0;
41  for (Index i = 0; i < size; ++i) {
42  Map<Matrix<Scalar, Dynamic, 1> >(mat + offset, UpLo == Lower ? size - i : (i + 1)) +=
44  OtherMap(v + (UpLo == Lower ? i : 0), UpLo == Lower ? size - i : (i + 1)) +
45  alpha * numext::conj(v[i]) * OtherMap(u + (UpLo == Lower ? i : 0), UpLo == Lower ? size - i : (i + 1));
46  // FIXME This should be handled outside.
47  mat[offset + (UpLo == Lower ? 0 : i)] = numext::real(mat[offset + (UpLo == Lower ? 0 : i)]);
48  offset += UpLo == Lower ? size - i : (i + 1);
49  }
50  }
AnnoyingScalar conj(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:133
Array< int, Dynamic, 1 > v
Definition: Array_initializer_list_vector_cxx11.cpp:1
int i
Definition: BiCGSTAB_step_by_step.cpp:9
Scalar Scalar int size
Definition: benchVecAdd.cpp:17
float real
Definition: datatypes.h:10
@ Lower
Definition: Constants.h:211
RealScalar alpha
Definition: level1_cplx_impl.h:151
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:83

References alpha, conj(), i, Eigen::Lower, size, and v.


The documentation for this struct was generated from the following file: