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

Method SolveReordered

linalg/sparsecholesky.cpp:1712–2009  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1710
1711 template <class TM, class TV_ROW, class TV_COL>
1712 void SparseCholesky<TM, TV_ROW, TV_COL> ::
1713 SolveReordered (FlatVector<TVX> hy) const
1714 {
1715 static Timer timer1("SparseCholesky<d,d,d>::MultAdd fac1");
1716 static Timer timer2("SparseCholesky<d,d,d>::MultAdd fac2");
1717
1718 /*
1719 // sequential verision
1720 for (int i = 0; i < blocks.Size()-1; i++)
1721 SolveBlock (i, hy);
1722 */
1723
1724 /*
1725
1726 // first parallel version with dependency graph
1727 RunParallelDependency (block_dependency,
1728 [&] (int nr)
1729 {
1730 SolveBlock(nr, hy);
1731 });
1732 */
1733
1734
1735
1736 /*
1737 // first parallel version with dependency graph and profiling
1738
1739 class ProfileData
1740 {
1741 public:
1742 double tstart, tend;
1743 int size, extsize;
1744 };
1745
1746 Array<ProfileData> prof(blocks.Size()-1);
1747
1748 double tstart = omp_get_wtime();
1749
1750 RunParallelDependency (block_dependency,
1751 [&] (int nr)
1752 {
1753 int s = blocks[nr+1]-blocks[nr];
1754 if (s >= 100)
1755 prof[nr].tstart = omp_get_wtime();
1756
1757 SolveBlock(nr, hy);
1758
1759 if (s >= 100)
1760 prof[nr].tend = omp_get_wtime();
1761 prof[nr].size = blocks[nr+1]-blocks[nr];
1762 int row = blocks[nr];
1763 prof[nr].extsize = firstinrow[row+1]-firstinrow[row] - prof[nr].size+1;
1764 });
1765
1766 timer1.Stop();
1767
1768 ofstream out ("cholesky.prof");
1769 for (int i = 0; i < prof.Size(); i++)

Callers

nothing calls this directly

Calls 14

BlockDofsFunction · 0.85
BlockExtDofsFunction · 0.85
StopMethod · 0.80
RangeFunction · 0.70
RunParallelDependencyFunction · 0.70
ConjFunction · 0.50
TransFunction · 0.50
AtomicAddFunction · 0.50
SizeMethod · 0.45
endMethod · 0.45
RangeMethod · 0.45
SplitMethod · 0.45

Tested by

no test coverage detected