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

Function archive_array_shallow

fem/tensorcoefficient.cpp:29–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27
28 template <typename T>
29 void archive_array_shallow(Archive& ar, T& array) {
30 if(ar.Output()) {
31 ar << array.Size();
32 for (auto cf : array)
33 ar.Shallow(cf);
34 }
35 else {
36 size_t s;
37 ar & s;
38 array.SetSize(s);
39 for (auto i : Range(s))
40 ar.Shallow(array[i]);
41 }
42 }
43
44 template <typename T>
45 void archive_array(Archive& ar, T& array) {

Callers 1

DoArchiveMethod · 0.85

Calls 3

RangeFunction · 0.50
SizeMethod · 0.45
SetSizeMethod · 0.45

Tested by

no test coverage detected