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

Method DoArchive

fem/tensorcoefficient.cpp:1139–1179  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1137 }
1138
1139 void EinsumCoefficientFunction::DoArchive(Archive &ar)
1140 {
1141 BASE::DoArchive(ar);
1142 // trivial
1143 ar & is_zero & max_mem & options;
1144
1145 ar & index_signature
1146 & original_index_signature
1147 & expanded_index_signature;
1148
1149 // shallow
1150 ar.Shallow(node);
1151 archive_array_shallow(ar, cfs);
1152 archive_array_shallow(ar, original_inputs);
1153 archive_array_shallow(ar, expanded_inputs);
1154
1155 // vectors and matrices
1156 if (ar.Output())
1157 {
1158 ar << nz_inputs.Size();
1159 for (auto& item : nz_inputs)
1160 {
1161 archive_array(ar, item);
1162 }
1163 }
1164 else
1165 {
1166 size_t s;
1167 ar & s;
1168 nz_inputs.SetSize(s);
1169 for (auto& item : nz_inputs)
1170 {
1171 archive_array(ar, item);
1172 }
1173 }
1174
1175 archive_array(ar, nz_result);
1176 archive_array(ar, nz_all);
1177 archive_matrix(ar, index_maps);
1178 archive_matrix(ar, sparse_index_maps);
1179 }
1180
1181 Matrix<int> EinsumCoefficientFunction::build_index_maps(
1182 const Array<MultiIndex>& index_sets, const optional<Vector<bool>>& nz_pattern)

Callers

nothing calls this directly

Calls 6

archive_array_shallowFunction · 0.85
archive_arrayFunction · 0.85
archive_matrixFunction · 0.85
DoArchiveFunction · 0.70
SizeMethod · 0.45
SetSizeMethod · 0.45

Tested by

no test coverage detected