10#ifndef ROOT_Minuit2_LAVector
11#define ROOT_Minuit2_LAVector
28int Mndaxpy(
unsigned int,
double,
const double *,
int,
double *,
int);
29int Mndscal(
unsigned int,
double,
double *,
int);
30int Mndspmv(
const char *,
unsigned int,
double,
const double *,
const double *,
int,
double,
double *,
int);
47 std::memset(
fData, 0,
size() *
sizeof(
double));
65 std::memcpy(
fData,
v.Data(),
fSize *
sizeof(
double));
76 std::memcpy(
fData,
v.Data(),
fSize *
sizeof(
double));
86 std::memcpy(
fData,
v.Obj().Data(),
fSize *
sizeof(T));
91 template <
class A,
class B,
class T>
96 (*this) =
sum.Obj().A();
97 (*this) +=
sum.Obj().B();
101 template <
class A,
class T>
109 (*this) =
sum.Obj().B();
111 (*this) +=
sum.Obj().A();
116 template <
class A,
class T>
120 (*this) = something.Obj();
121 (*this) *= something.f();
133 Mndspmv(
"U",
fSize, prod.f() * prod.Obj().A().f() * prod.Obj().B().f(), prod.Obj().A().Obj().Data(),
134 prod.Obj().B().Obj().Data(), 1, 0.,
fData, 1);
141 ABSum<
ABObj<
vec,
ABProd<
ABObj<sym, LASymMatrix, T>,
ABObj<vec, LAVector, T>>, T>,
ABObj<vec, LAVector, T>>,
145 (*this) = prod.Obj().B();
146 (*this) += prod.Obj().A();
147 (*this) *=
double(prod.f());
154 assert(
fSize ==
m.size());
162 assert(
fSize ==
m.size());
171 assert(
fSize ==
m.Obj().size());
172 if (
m.Obj().Data() ==
fData) {
181 template <
class A,
class T>
192 Mndspmv(
"U",
fSize, prod.f() * prod.Obj().A().f() * prod.Obj().B().f(), prod.Obj().A().Obj().Data(),
193 prod.Obj().B().Data(), 1, 1.,
fData, 1);
246 assert(
fSize ==
v.Obj().size());
248 std::memcpy(
fData,
v.Obj().Data(),
fSize *
sizeof(
double));
253 template <
class A,
class T>
259 (*this) = something.Obj();
262 assert(
fSize == tmp.size());
263 std::memcpy(
fData, tmp.Data(),
fSize *
sizeof(
double));
265 (*this) *= something.f();
269 template <
class A,
class B,
class T>
273 (*this) =
sum.Obj().A();
274 (*this) +=
sum.Obj().B();
277 tmp +=
sum.Obj().B();
278 assert(
fSize == tmp.size());
279 std::memcpy(
fData, tmp.Data(),
fSize *
sizeof(
double));
285 template <
class A,
class T>
289 (*this) =
sum.Obj().B();
290 (*this) +=
sum.Obj().A();
293 tmp +=
sum.Obj().B();
294 assert(
fSize == tmp.size());
295 std::memcpy(
fData, tmp.Data(),
fSize *
sizeof(
double));
306 fSize = prod.Obj().B().Obj().size();
308 Mndspmv(
"U",
fSize,
double(prod.f() * prod.Obj().A().f() * prod.Obj().B().f()), prod.Obj().A().Obj().Data(),
309 prod.Obj().B().Obj().Data(), 1, 0.,
fData, 1);
312 assert(
fSize == tmp.size());
313 Mndspmv(
"U",
fSize,
double(prod.f() * prod.Obj().A().f()), prod.Obj().A().Obj().Data(), tmp.Data(), 1, 0.,
324 ABSum<
ABObj<
vec,
ABProd<
ABObj<sym, LASymMatrix, T>,
ABObj<vec, LAVector, T>>, T>,
ABObj<vec, LAVector, T>>,
328 (*this) = prod.Obj().B();
329 (*this) += prod.Obj().A();
333 tmp += prod.Obj().A();
334 assert(
fSize == tmp.size());
335 std::memcpy(
fData, tmp.Data(),
fSize *
sizeof(
double));
LAVector & operator=(const ABObj< vec, ABSum< ABObj< vec, A, T >, ABObj< vec, B, T > >, T > &sum)
const double * Data() const
LAVector & operator*=(double scal)
unsigned int size() const
double operator[](unsigned int i) const
double operator()(unsigned int i) const
LAVector & operator+=(const LAVector &m)
LAVector(const ABObj< vec, ABProd< ABObj< sym, LASymMatrix, T >, ABObj< vec, LAVector, T > >, T > &prod)
LAVector(const ABObj< vec, ABObj< vec, A, T >, T > &something)
LAVector & operator=(const ABObj< vec, LAVector, T > &v)
LAVector(const ABObj< vec, ABSum< ABObj< vec, A, T >, ABObj< vec, B, T > >, T > &sum)
double & operator[](unsigned int i)
LAVector & operator=(const ABObj< vec, ABObj< vec, A, T >, T > &something)
LAVector & operator=(const LAVector &v)
LAVector(const ABObj< vec, ABSum< ABObj< vec, LAVector, T >, ABObj< vec, A, T > >, T > &sum)
LAVector & operator+=(const ABObj< vec, A, T > &m)
LAVector(const ABObj< vec, ABSum< ABObj< vec, ABProd< ABObj< sym, LASymMatrix, T >, ABObj< vec, LAVector, T > >, T >, ABObj< vec, LAVector, T > >, T > &prod)
LAVector(const ABObj< vec, LAVector, T > &v)
LAVector & operator-=(const LAVector &m)
LAVector(const LAVector &v)
LAVector & operator=(const ABObj< vec, ABSum< ABObj< vec, ABProd< ABObj< sym, LASymMatrix, T >, ABObj< vec, LAVector, T > >, T >, ABObj< vec, LAVector, T > >, T > &prod)
double & operator()(unsigned int i)
LAVector & operator=(const ABObj< vec, ABSum< ABObj< vec, LAVector, T >, ABObj< vec, A, T > >, T > &sum)
LAVector & operator=(const ABObj< vec, ABProd< ABObj< sym, LASymMatrix, T >, ABObj< vec, LAVector, T > >, T > &prod)
LAVector & operator+=(const ABObj< vec, ABProd< ABObj< sym, LASymMatrix, T >, ABObj< vec, LAVector, T > >, T > &prod)
LAVector & operator+=(const ABObj< vec, LAVector, T > &m)
static StackAllocator & Get()
void * Allocate(size_t nBytes)
int Mndaxpy(unsigned int, double, const double *, int, double *, int)
int Mndscal(unsigned int, double, double *, int)
int Mndspmv(const char *, unsigned int, double, const double *, const double *, int, double, double *, int)
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
static uint64_t sum(uint64_t i)