47 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cdotprecision&, const cvector &, const cvector &)"));
54 addDot_op(dp,rv1,rv2);
66 if(
VecLen(sl)!=
VecLen(rv)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cdotprecision&, const cvector_slice &, const cvector &)"));
85 if(
VecLen(rv)!=
VecLen(sl)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cdotprecision&, const cvector &, const cvector_slice &)"));
104 if(
VecLen(sl1)!=
VecLen(sl2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cdotprecision&, const cvector_slice &, const cvector_slice &)"));
111 addDot_op(dp,sl1,sl2);
122 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const cvector &, const cvector &)"));
138 if(
VecLen(sl)!=
VecLen(rv)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const cvector_slice &, const cvector &)"));
154 if(
VecLen(rv)!=
VecLen(sl)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const cvector &, const cvector_slice &)"));
170 if(
VecLen(sl1)!=
VecLen(sl2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const cvector_slice &, const cvector_slice &)"));
186 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cdotprecision&, const cvector &, const rvector &)"));
188 addDot(Re(dp), Re(rv1), rv2);
189 addDot(Im(dp), Im(rv1), rv2);
194 addDot_op(Re(dp), Re(rv1), rv2);
195 addDot_op(Im(dp), Im(rv1), rv2);
206 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cdotprecision&, const rvector &, const cvector &)"));
208 addDot(Re(dp), rv1, Re(rv2));
209 addDot(Im(dp), rv1, Im(rv2));
214 addDot_op(Re(dp), rv1, Re(rv2));
215 addDot_op(Im(dp), rv1, Im(rv2));
226 if(
VecLen(sl)!=
VecLen(rv)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cdotprecision&, const rvector_slice &, const cvector &)"));
228 addDot(Re(dp), sl, Re(rv));
229 addDot(Im(dp), sl, Im(rv));
234 addDot_op(Re(dp), sl, Re(rv));
235 addDot_op(Im(dp), sl, Im(rv));
246 if(
VecLen(sl)!=
VecLen(rv)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cdotprecision&, const cvector_slice &, const rvector &)"));
248 addDot(Re(dp), Re(sl), rv);
249 addDot(Im(dp), Im(sl), rv);
254 addDot_op(Re(dp), Re(sl), rv);
255 addDot_op(Im(dp), Im(sl), rv);
266 if(
VecLen(rv)!=
VecLen(sl)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cdotprecision&, const rvector &, const cvector_slice &)"));
268 addDot(Re(dp), rv, Re(sl));
269 addDot(Im(dp), rv, Im(sl));
274 addDot_op(Re(dp), rv, Re(sl));
275 addDot_op(Im(dp), rv, Im(sl));
286 if(
VecLen(sl)!=
VecLen(rv)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cdotprecision&, const cvector &, const rvector_slice &)"));
288 addDot(Re(dp), Re(rv), sl);
289 addDot(Im(dp), Im(rv), sl);
294 addDot_op(Re(dp), Re(rv), sl);
295 addDot_op(Im(dp), Im(rv), sl);
306 if(
VecLen(sl1)!=
VecLen(sl2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cdotprecision&, const cvector_slice &, const rvector_slice &)"));
308 addDot(Re(dp), Re(sl1), sl2);
309 addDot(Im(dp), Im(sl1), sl2);
314 addDot_op(Re(dp), Re(sl1), sl2);
315 addDot_op(Im(dp), Im(sl1), sl2);
326 if(
VecLen(sl1)!=
VecLen(sl2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cdotprecision&, const rvector_slice &, const cvector_slice &)"));
328 addDot(Re(dp), sl1, Re(sl2));
329 addDot(Im(dp), sl1, Im(sl2));
334 addDot_op(Re(dp), sl1, Re(sl2));
335 addDot_op(Im(dp), sl1, Im(sl2));
346 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const cvector &, const rvector &)"));
350 addDot(Re(tmp),Re(rv1),rv2);
351 addDot(Im(tmp),Im(rv1),rv2);
363 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const rvector &, const cvector &)"));
367 addDot(Re(tmp),rv1,Re(rv2));
368 addDot(Im(tmp),rv1,Im(rv2));
380 if(
VecLen(sl)!=
VecLen(rv)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const rvector_slice &, const cvector &)"));
384 addDot(Re(tmp),sl,Re(rv));
385 addDot(Im(tmp),sl,Im(rv));
397 if(
VecLen(sl)!=
VecLen(rv)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const cvector_slice &, const rvector &)"));
401 addDot(Re(tmp),Re(sl),rv);
402 addDot(Im(tmp),Im(sl),rv);
414 if(
VecLen(rv)!=
VecLen(sl)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const rvector &, const cvector_slice &)"));
418 addDot(Re(tmp),rv,Re(sl));
419 addDot(Im(tmp),rv,Im(sl));
431 if(
VecLen(rv)!=
VecLen(sl)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const cvector &, const rvector_slice &)"));
435 addDot(Re(tmp),Re(rv),sl);
436 addDot(Im(tmp),Im(rv),sl);
448 if(
VecLen(sl1)!=
VecLen(sl2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const cvector_slice &, const rvector_slice &)"));
452 addDot(Re(tmp),Re(sl1),sl2);
453 addDot(Im(tmp),Im(sl1),sl2);
465 if(
VecLen(sl1)!=
VecLen(sl2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const rvector_slice &, const cvector_slice &)"));
469 addDot(Re(tmp),sl1,Re(sl2));
470 addDot(Im(tmp),sl1,Im(sl2));
483 if(
VecLen(sl)!=
VecLen(rv)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const cvector_slice &, const ivector &)"));
489 addDot(tmp_re,Re(sl),rv);
490 addDot(tmp_im,Im(sl),rv);
503 if(
VecLen(sl)!=
VecLen(rv)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const ivector &, const cvector_slice &)"));
509 addDot(tmp_re,rv,Re(sl));
510 addDot(tmp_im,rv,Im(sl));
523 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const cvector &, const ivector &)"));
529 addDot(tmp_re,Re(rv1),rv2);
530 addDot(tmp_im,Im(rv1),rv2);
543 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const ivector &, const cvector &)"));
549 addDot(tmp_re,rv1,Re(rv2));
550 addDot(tmp_im,rv1,Im(rv2));
563 if(
VecLen(sl)!=
VecLen(rv)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const ivector_slice &, const cvector &)"));
569 addDot(tmp_re,sl,Re(rv));
570 addDot(tmp_im,sl,Im(rv));
583 if(
VecLen(sl)!=
VecLen(rv)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const cvector &, const ivector_slice &)"));
589 addDot(tmp_re,Re(rv),sl);
590 addDot(tmp_im,Im(rv),sl);
603 if(
VecLen(sl1)!=
VecLen(sl2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const cvector_slice &, const ivector_slice &)"));
609 addDot(tmp_re,Re(sl1),sl2);
610 addDot(tmp_im,Im(sl1),sl2);
623 if(
VecLen(sl1)!=
VecLen(sl2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const ivector_slice &, const cvector_slice &)"));
629 addDot(tmp_re,sl1,Re(sl2));
630 addDot(tmp_im,sl1,Im(sl2));
636 addSum(Re(dp),Re(v));
637 addSum(Im(dp),Im(v));
645 accumulate(tmp_re,Re(v));
646 accumulate(tmp_im,Im(v));
The Data Type cdotprecision.
void set_k(unsigned int i)
Set precision for computation of dot products.
The Data Type cidotprecision.
int get_k() const
Get currently set precision for computation of dot products.
The Data Type cvector_slice.
The Data Type idotprecision.
void set_k(unsigned int i)
Set precision for computation of dot products.
The Data Type ivector_slice.
The Data Type rvector_slice.
The namespace cxsc, providing all functionality of the class library C-XSC.
int VecLen(const scimatrix_subv &S)
Returns the length of the subvector.
void accumulate_approx(cdotprecision &dp, const cmatrix_subv &rv1, const cmatrix_subv &rv2)
The accurate scalar product of the last two arguments added to the value of the first argument (witho...