From 164265927286caabfcefa241313a2d54d377d41b Mon Sep 17 00:00:00 2001 From: Tom Deakin Date: Wed, 8 Jan 2020 10:07:41 +0000 Subject: [PATCH] Use 1D index for initialisation --- heat_sycl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/heat_sycl.cpp b/heat_sycl.cpp index 2a04a16..4110461 100644 --- a/heat_sycl.cpp +++ b/heat_sycl.cpp @@ -189,7 +189,7 @@ void initial_value(cl::sycl::queue& queue, const unsigned int n, const double dx int j = idx[0]; double y = dx * (j+1); // Physical y position double x = dx * (i+1); // Physical x position - ua[j][i] = cl::sycl::sin(PI * x / length) * cl::sycl::sin(PI * y / length); + ua[idx] = cl::sycl::sin(PI * x / length) * cl::sycl::sin(PI * y / length); }); }); }