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

Function archive_array

fem/tensorcoefficient.cpp:45–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43
44 template <typename T>
45 void archive_array(Archive& ar, T& array) {
46 // TODO: streamline implementation / implement somewhere else
47 if(ar.Output()) {
48 ar << array.Size();
49 for (auto& item : array)
50 ar & item;
51 }
52 else {
53 size_t s;
54 ar & s;
55 array.SetSize(s);
56 for (auto& item : array)
57 ar & item;
58 }
59 }
60
61 template <typename T>
62 void archive_matrix(Archive& ar, T& matrix) {

Callers 1

DoArchiveMethod · 0.85

Calls 2

SizeMethod · 0.45
SetSizeMethod · 0.45

Tested by

no test coverage detected