| 564 | |
| 565 | |
| 566 | void 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 | |
| 580 | void gpu_copyCpuToGpu(qcomp* cpuArr, qcomp* gpuArr, qindex numElems) { |
nothing calls this directly
no test coverage detected