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

Function cpu_copyMatrix

quest/src/cpu/cpu_config.cpp:428–440  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

426
427
428void cpu_copyMatrix(qcomp** dest, qcomp** src, qindex dim) {
429
430 /// @todo
431 /// there may be a faster, asynchronous way to perform
432 /// these memcpys then do a final wait
433
434 // note that we cannot call a single memcpy to copy all rows at once,
435 // because dest/src may not be contiguous stack arrays; instead, each
436 // row is likely a unique, discontiguous span of heap memory. So we
437 // memcpy each row in-turn
438 for (qindex r=0; r<dim; r++)
439 cpu_copyArray(dest[r], src[r], dim);
440}
441
442void cpu_copyMatrix(qcomp** dest, vector<vector<qcomp>> src, qindex dim) {
443

Callers 3

setAndSyncSuperOpElemsFunction · 0.85
setAndSyncKrausMapElemsFunction · 0.85
setAndSyncDenseMatrElemsFunction · 0.85

Calls 1

cpu_copyArrayFunction · 0.85

Tested by

no test coverage detected