[CUDA,OpenCL] Simplify the copying code

7 jobs for blocks-in-ram in 7 minutes and 22 seconds (queued for 5 seconds)
Status Job ID Name Coverage
  Build
passed #180190366
build-clang-cuda

00:03:40

passed #180190367
build-clang-nocuda

00:01:25

passed #180190364
build-gcc-cuda

00:03:40

passed #180190365
build-gcc-nocuda

00:01:25

passed #180190368
update-pocl

00:06:03

 
  Test
failed #180190370
test-clang-nocuda

00:01:06

failed #180190369
test-gcc-nocuda

00:01:15

 
Name Stage Failure
failed
test-clang-nocuda Test
-- Installing: /usr/local/share/pocl/kernel-x86_64-pc-linux-gnu-haswell.bc
-- Installing: /usr/local/lib/pocl/libllvmopencl.so
-- Installing: /usr/local/lib/libpocl.so.2.3.0
-- Installing: /usr/local/lib/libpocl.so.2
-- Installing: /usr/local/lib/libpocl.so
-- Set runtime path of "/usr/local/lib/libpocl.so.2.3.0" to ""
-- Installing: /usr/local/bin/poclcc
scripts/ci-test.sh: line 11: cd: build/clang-nocuda: No such file or directory
ERROR: Job failed: exit code 1
failed
test-gcc-nocuda Test
-- Installing: /usr/local/share/pocl/kernel-x86_64-pc-linux-gnu-haswell.bc
-- Installing: /usr/local/lib/pocl/libllvmopencl.so
-- Installing: /usr/local/lib/libpocl.so.2.3.0
-- Installing: /usr/local/lib/libpocl.so.2
-- Installing: /usr/local/lib/libpocl.so
-- Set runtime path of "/usr/local/lib/libpocl.so.2.3.0" to ""
-- Installing: /usr/local/bin/poclcc
scripts/ci-test.sh: line 11: cd: build/gcc-nocuda: No such file or directory
ERROR: Job failed: exit code 1