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

Function gpu_copyArray

quest/src/gpu/gpu_config.cpp:566–577  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

564
565
566void gpu_copyArray(qcomp* dest, qcomp* src, qindex dim) {
567#if COMPILE_CUDA
568
569 // ensure src and dest aren't being modified
570 gpu_sync();
571
572 CUDA_CHECK( cudaMemcpy(dest, src, dim * sizeof(qcomp), cudaMemcpyDeviceToDevice) );
573
574#else
575 error_gpuCopyButGpuNotCompiled();
576#endif
577}
578
579
580void gpu_copyCpuToGpu(qcomp* cpuArr, qcomp* gpuArr, qindex numElems) {

Callers

nothing calls this directly

Calls 2

gpu_syncFunction · 0.85

Tested by

no test coverage detected