From 5761b0de1c0e32132a87c4054f52f1401fa7dc2c Mon Sep 17 00:00:00 2001 From: Alessandro Capotondi Date: Wed, 27 Apr 2022 08:10:25 +0000 Subject: [PATCH] Update exercise2.cu --- cuda/lab1/exercise2.cu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cuda/lab1/exercise2.cu b/cuda/lab1/exercise2.cu index a6d30d3..402ad6c 100644 --- a/cuda/lab1/exercise2.cu +++ b/cuda/lab1/exercise2.cu @@ -143,7 +143,7 @@ int main(int argc, const char **argv) //TODO: ADD CUDA Data Move start_timer(); - cudaMemcpy(h_x, d_x, sizeof(float) * n, cudaMemcpyDeviceToHost); + cudaMemcpy(d_x, h_x, sizeof(float) * n, cudaMemcpyHostToDevice); //TODO: Add kernel call here