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

Function demo_syncFullStateDiagMatr

examples/isolated/initialising_matrices.cpp:403–415  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

401
402
403void demo_syncFullStateDiagMatr() {
404
405 // force use of available hardware acceleration
406 QuESTEnv env = getQuESTEnv();
407 FullStateDiagMatr a = createCustomFullStateDiagMatr(5, env.isDistributed, env.isGpuAccelerated, env.isMultithreaded);
408
409 // every node modifies its first local element
410 a.cpuElems[0] = -10_i * (1+getQuESTEnv().rank);
411
412 syncFullStateDiagMatr(a);
413 reportFullStateDiagMatr(a);
414 destroyFullStateDiagMatr(a);
415}
416
417
418

Callers 1

mainFunction · 0.70

Calls 5

getQuESTEnvFunction · 0.85
syncFullStateDiagMatrFunction · 0.85
reportFullStateDiagMatrFunction · 0.85
destroyFullStateDiagMatrFunction · 0.85

Tested by

no test coverage detected