1.4.0
CCC
 
PrecisionOpMulti.cpp File Reference
#include "LinearOp/PrecisionOpMulti.hpp"
#include "Basic/AStringable.hpp"
#include "Covariances/CovAniso.hpp"
#include "Matrix/MatrixSquareSymmetric.hpp"
#include "Matrix/VectorEigen.hpp"
#include <Eigen/src/Core/Matrix.h>

Macros

#define EVALOP(IN, OUT, TAB, getmat, OP, IY, COMPUTEOP, XORY, START, END, IVAR, JVAR)
 

Macro Definition Documentation

◆ EVALOP

#define EVALOP (   IN,
  OUT,
  TAB,
  getmat,
  OP,
  IY,
  COMPUTEOP,
  XORY,
  START,
  END,
  IVAR,
  JVAR 
)
Value:
{\
int nvar = _getNVar();\
int ncov = _getNCov();\
int iad_x = 0;\
int iad_struct = 0;\
Eigen::VectorXd* y;\
for (int icov = 0; icov < ncov; icov++)\
{\
int napices = size(icov);\
if ( (nvar == 1) && (ncov == 1) )\
{\
y = &OUT;\
}\
else\
{\
y = nullptr;\
if (COMPUTEOP)\
{\
y = &_works[icov];\
y->resize(napices);\
}\
}\
for (int jvar = 0; jvar < nvar; jvar++)\
{\
int iad_y = IY;\
Eigen::Map<const Eigen::VectorXd> x(IN.data() + iad_x, napices);\
if (COMPUTEOP) \
_pops[icov]->OP(x, *y);\
if ( (nvar == 1) && (ncov == 1) ) break;\
if (nvar == 1)\
{\
Eigen::Map<Eigen::VectorXd> outmap(OUT.data() + iad_y, napices);\
VectorEigen::copy(*y, outmap);\
iad_x += napices;\
continue;\
}\
for (int ivar = START; ivar < END; ivar++)\
{\
if (_isNoStatForVariance[icov])\
{\
VectorEigen::addMultiplyVectVectInPlace(TAB##NoStat[icov][IND(IVAR,JVAR,nvar)],XORY,OUT,iad_y); \
}\
else\
{\
VectorEigen::addMultiplyConstantInPlace(TAB[icov].getmat(IVAR,JVAR),XORY,OUT,iad_y);\
}\
iad_y += napices;\
}\
iad_x += napices; \
}\
iad_struct += napices * nvar;\
}\
if (COMPUTEOP) return 0;\
}\
#define x
#define IND(i, j, nvar)
Definition: PrecisionOpMulti.hpp:29
void fill(double value)
Set all the values of the Vector at once.
Definition: VectorEigen.cpp:310
static void addMultiplyVectVectInPlace(const Eigen::VectorXd &in1, const Eigen::VectorXd &in2, Eigen::VectorXd &res, int iad)
Definition: VectorEigen.cpp:60
static void addMultiplyConstantInPlace(double val, const Eigen::VectorXd &in, Eigen::VectorXd &res, int iad)
Definition: VectorEigen.cpp:47
static void copy(const Eigen::VectorXd &in, Eigen::VectorXd &dest)
Definition: VectorEigen.cpp:155