28 #include "cvector.hpp" 30 #include "cvector.inl" 32 #include "ivector.hpp" 41 throw(OP_WITH_WRONG_DIM)
47 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cdotprecision&, const cvector &, const cvector &)"));
54 addDot_op(dp,rv1,rv2);
60 throw(OP_WITH_WRONG_DIM)
66 if(
VecLen(sl)!=
VecLen(rv)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cdotprecision&, const cvector_slice &, const cvector &)"));
79 throw(OP_WITH_WRONG_DIM)
85 if(
VecLen(rv)!=
VecLen(sl)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cdotprecision&, const cvector &, const cvector_slice &)"));
98 throw(OP_WITH_WRONG_DIM)
103 #if(CXSC_INDEX_CHECK) 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);
115 #if(CXSC_INDEX_CHECK) 116 throw(OP_WITH_WRONG_DIM)
121 #if(CXSC_INDEX_CHECK) 122 if(
VecLen(rv1)!=
VecLen(rv2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const cvector &, const cvector &)"));
131 #if(CXSC_INDEX_CHECK) 132 throw(OP_WITH_WRONG_DIM)
137 #if(CXSC_INDEX_CHECK) 138 if(
VecLen(sl)!=
VecLen(rv)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const cvector_slice &, const cvector &)"));
147 #if(CXSC_INDEX_CHECK) 148 throw(OP_WITH_WRONG_DIM)
153 #if(CXSC_INDEX_CHECK) 154 if(
VecLen(rv)!=
VecLen(sl)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const cvector &, const cvector_slice &)"));
163 #if(CXSC_INDEX_CHECK) 164 throw(OP_WITH_WRONG_DIM)
169 #if(CXSC_INDEX_CHECK) 170 if(
VecLen(sl1)!=
VecLen(sl2)) cxscthrow(OP_WITH_WRONG_DIM(
"void accumulate(cidotprecision&, const cvector_slice &, const cvector_slice &)"));
179 #if(CXSC_INDEX_CHECK) 180 throw(OP_WITH_WRONG_DIM)
185 #if(CXSC_INDEX_CHECK) 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);
199 #if(CXSC_INDEX_CHECK) 200 throw(OP_WITH_WRONG_DIM)
205 #if(CXSC_INDEX_CHECK) 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));
219 #if(CXSC_INDEX_CHECK) 220 throw(OP_WITH_WRONG_DIM)
225 #if(CXSC_INDEX_CHECK) 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));
239 #if(CXSC_INDEX_CHECK) 240 throw(OP_WITH_WRONG_DIM)
245 #if(CXSC_INDEX_CHECK) 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);
259 #if(CXSC_INDEX_CHECK) 260 throw(OP_WITH_WRONG_DIM)
265 #if(CXSC_INDEX_CHECK) 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));
279 #if(CXSC_INDEX_CHECK) 280 throw(OP_WITH_WRONG_DIM)
285 #if(CXSC_INDEX_CHECK) 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);
299 #if(CXSC_INDEX_CHECK) 300 throw(OP_WITH_WRONG_DIM)
305 #if(CXSC_INDEX_CHECK) 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);
319 #if(CXSC_INDEX_CHECK) 320 throw(OP_WITH_WRONG_DIM)
325 #if(CXSC_INDEX_CHECK) 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));
339 #if(CXSC_INDEX_CHECK) 340 throw(OP_WITH_WRONG_DIM)
345 #if(CXSC_INDEX_CHECK) 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);
356 #if(CXSC_INDEX_CHECK) 357 throw(OP_WITH_WRONG_DIM)
362 #if(CXSC_INDEX_CHECK) 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));
373 #if(CXSC_INDEX_CHECK) 374 throw(OP_WITH_WRONG_DIM)
379 #if(CXSC_INDEX_CHECK) 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));
390 #if(CXSC_INDEX_CHECK) 391 throw(OP_WITH_WRONG_DIM)
396 #if(CXSC_INDEX_CHECK) 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);
407 #if(CXSC_INDEX_CHECK) 408 throw(OP_WITH_WRONG_DIM)
413 #if(CXSC_INDEX_CHECK) 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));
424 #if(CXSC_INDEX_CHECK) 425 throw(OP_WITH_WRONG_DIM)
430 #if(CXSC_INDEX_CHECK) 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);
441 #if(CXSC_INDEX_CHECK) 442 throw(OP_WITH_WRONG_DIM)
447 #if(CXSC_INDEX_CHECK) 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);
458 #if(CXSC_INDEX_CHECK) 459 throw(OP_WITH_WRONG_DIM)
464 #if(CXSC_INDEX_CHECK) 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));
476 #if(CXSC_INDEX_CHECK) 477 throw(OP_WITH_WRONG_DIM)
482 #if(CXSC_INDEX_CHECK) 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);
496 #if(CXSC_INDEX_CHECK) 497 throw(OP_WITH_WRONG_DIM)
502 #if(CXSC_INDEX_CHECK) 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));
516 #if(CXSC_INDEX_CHECK) 517 throw(OP_WITH_WRONG_DIM)
522 #if(CXSC_INDEX_CHECK) 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);
536 #if(CXSC_INDEX_CHECK) 537 throw(OP_WITH_WRONG_DIM)
542 #if(CXSC_INDEX_CHECK) 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));
556 #if(CXSC_INDEX_CHECK) 557 throw(OP_WITH_WRONG_DIM)
562 #if(CXSC_INDEX_CHECK) 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));
576 #if(CXSC_INDEX_CHECK) 577 throw(OP_WITH_WRONG_DIM)
582 #if(CXSC_INDEX_CHECK) 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);
596 #if(CXSC_INDEX_CHECK) 597 throw(OP_WITH_WRONG_DIM)
602 #if(CXSC_INDEX_CHECK) 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);
616 #if(CXSC_INDEX_CHECK) 617 throw(OP_WITH_WRONG_DIM)
622 #if(CXSC_INDEX_CHECK) 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 idotprecision.
The namespace cxsc, providing all functionality of the class library C-XSC.
void set_k(unsigned int i)
Set precision for computation of dot products.
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...
The Data Type ivector_slice.
The Data Type cidotprecision.
The Data Type rvector_slice.
The Data Type cdotprecision.
void set_k(unsigned int i)
Set precision for computation of dot products.
int get_k() const
Get currently set precision for computation of dot products.
The Data Type cvector_slice.