MCPcopy Create free account
hub / github.com/QuEST-Kit/QuEST / setInitialHeapFlags

Function setInitialHeapFlags

quest/src/api/matrices.cpp:189–204  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

187// type T can be CompMatr, DiagMatr or FullStateDiagMatr
188template <class T>
189void setInitialHeapFlags(T matr) {
190
191 // set initial propreties of the newly created matrix to unknown
192 util_setFlagToUnknown(matr.isApproxUnitary);
193 util_setFlagToUnknown(matr.isApproxHermitian);
194
195 // only diagonal matrices (which can be exponentiated)
196 // have these additional fields
197 if constexpr (!util_isDenseMatrixType<T>()) {
198 util_setFlagToUnknown(matr.isApproxNonZero);
199 util_setFlagToUnknown(matr.isStrictlyNonNegative);
200 }
201
202 // indicate that GPU memory has not yet been synchronised
203 *(matr.wasGpuSynced) = 0;
204}
205
206
207

Callers 3

createCompMatrFunction · 0.85
createDiagMatrFunction · 0.85

Calls 1

util_setFlagToUnknownFunction · 0.85

Tested by

no test coverage detected