| 343 | |
| 344 | template <class TM, class TV_ROW, class TV_COL> |
| 345 | void SparseMatrix<TM,TV_ROW,TV_COL> :: |
| 346 | MultTransAdd (double s, const BaseVector & x, BaseVector & y) const |
| 347 | { |
| 348 | static Timer timer ("SparseMatrix::MultTransAdd"); |
| 349 | RegionTimer reg (timer); |
| 350 | |
| 351 | FlatVector<TVY> fx = x.FV<TVY>(); |
| 352 | FlatVector<TVX> fy = y.FV<TVX>(); |
| 353 | |
| 354 | for (int i = 0; i < this->Height(); i++) |
| 355 | AddRowTransToVector (i, s*fx(i), fy); |
| 356 | |
| 357 | timer.AddFlops (this->NZE()); |
| 358 | |
| 359 | |
| 360 | /* |
| 361 | static Timer t("SparseMatrix::MultTransAdd"); RegionTimer reg(t); |
| 362 | t.AddFlops (this->NZE()*sizeof(TV_ROW)*sizeof(TV_COL)/sqr(sizeof(double))); |
| 363 | |
| 364 | ParallelForRange |
| 365 | (balance, [&] (IntRange myrange) |
| 366 | { |
| 367 | FlatVector<TVY> fx = x.FV<TVY>(); |
| 368 | FlatVector<TVX> fy = y.FV<TVX>(); |
| 369 | |
| 370 | for (auto i : myrange) |
| 371 | AddRowTransToVectorAtomic (i, s*fx(i), fy); |
| 372 | }); |
| 373 | */ |
| 374 | |
| 375 | } |
| 376 | |
| 377 | |
| 378 | template <class TM, class TV_ROW, class TV_COL> |
nothing calls this directly
no test coverage detected