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

Method MatrixGraph

linalg/sparsematrix.cpp:56–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54
55
56 MatrixGraph :: MatrixGraph (FlatArray<int> elsperrow, size_t awidth)
57 {
58 size = elsperrow.Size();
59 width = awidth;
60 owner = true;
61
62 firsti.SetSize (size+1);
63 nze = 0;
64 for (int i = 0; i < size; i++)
65 {
66 firsti[i] = nze;
67 nze += elsperrow[i];
68 }
69 firsti[size] = nze;
70
71 // colnr.SetSize (nze+1);
72 colnr = NumaDistributedArray<int> (nze); // nze+1
73
74 /*
75 for (size_t i = 0; i < nze; i++)
76 colnr[i] = -1;
77 */
78
79 FlatArray<ColIdx> hcolnr = colnr;
80 ParallelForRange (nze,
81 [hcolnr] (auto myrange)
82 {
83 hcolnr.Range(myrange) = -1;
84 });
85
86 CalcBalancing ();
87 }
88
89 MatrixGraph :: MatrixGraph (size_t as, int max_elsperrow)
90 {

Callers

nothing calls this directly

Calls 13

UsedBitsFunction · 0.85
SplitFunction · 0.85
MergeArraysFunction · 0.85
AddMethod · 0.80
StopMethod · 0.80
AddrMethod · 0.80
SetSymmetricFunction · 0.70
RangeFunction · 0.70
SizeMethod · 0.45
SetSizeMethod · 0.45
RangeMethod · 0.45
SplitMethod · 0.45

Tested by

no test coverage detected