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

Function accel_statevec_getAmps_sub

quest/src/core/accelerator.cpp:190–196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

188
189
190void accel_statevec_getAmps_sub(qcomp* outAmps, Qureg qureg, qindex localStartInd, qindex numLocalAmps) {
191
192 // copy directly from GPU/CPU to outAmps
193 (qureg.isGpuAccelerated)?
194 gpu_copyGpuToCpu(&qureg.gpuAmps[localStartInd], outAmps, numLocalAmps): // (src, dest) = (gpu, cpu)
195 cpu_copyArray( outAmps, &qureg.cpuAmps[localStartInd], numLocalAmps); // (dest, src)
196}
197
198
199

Callers 2

Calls 2

gpu_copyGpuToCpuFunction · 0.85
cpu_copyArrayFunction · 0.85

Tested by

no test coverage detected