Example #1
0
 def test_cublasZcopy(self):
     x = (np.random.rand(5)+1j*np.random.rand(5)).astype(np.complex128)
     x_gpu = gpuarray.to_gpu(x)
     y_gpu = misc.zeros_like(x_gpu)
     cublas.cublasZcopy(x_gpu.size, x_gpu.gpudata, 1,
                        y_gpu.gpudata, 1)
     assert np.allclose(y_gpu.get(), x_gpu.get())
Example #2
0
 def test_cublasZcopy(self):
     x = (np.random.rand(5) + 1j * np.random.rand(5)).astype(np.complex128)
     x_gpu = gpuarray.to_gpu(x)
     y_gpu = misc.zeros_like(x_gpu)
     cublas.cublasZcopy(self.cublas_handle, x_gpu.size, x_gpu.gpudata, 1,
                        y_gpu.gpudata, 1)
     assert np.allclose(y_gpu.get(), x_gpu.get())