MCPcopy Create free account
hub / github.com/NGSolve/ngsolve / MultAdd1

Method MultAdd1

linalg/sparsematrix_impl.hpp:318–340  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

316
317 template <class TM, class TV_ROW, class TV_COL>
318 void SparseMatrix<TM,TV_ROW,TV_COL> ::
319 MultAdd1 (double s, const BaseVector & x, BaseVector & y,
320 const BitArray * ainner,
321 const Array<int> * acluster) const
322 {
323 if (!ainner || acluster)
324 {
325 MultAdd (s, x, y);
326 return;
327 }
328
329 FlatVector<TVX> fx = x.FV<TVX>();
330 FlatVector<TVY> fy = y.FV<TVY>();
331
332 SharedLoop2 sl(ainner->Size());
333 ParallelJob
334 ( [&] (const TaskInfo & ti)
335 {
336 for (size_t row : sl)
337 if ( (*ainner).Test(row))
338 fy(row) += s * RowTimesVector (row, fx);
339 });
340 }
341
342
343

Callers

nothing calls this directly

Calls 3

RowTimesVectorFunction · 0.85
MultAddFunction · 0.70
SizeMethod · 0.45

Tested by

no test coverage detected