29 IndexType sizeDim1 = 2;
30 IndexType sizeDim2 = 3;
31 IndexType sizeDim3 = 7;
39 DataType* gpu_data1 =
static_cast<DataType*
>(sycl_device.allocate(tensor1.size() *
sizeof(DataType)));
40 DataType* gpu_data2 =
static_cast<DataType*
>(sycl_device.allocate(tensor2.size() *
sizeof(DataType)));
44 sycl_device.memcpyHostToDevice(gpu_data1, tensor1.data(), (tensor1.size()) *
sizeof(DataType));
45 gpu2.device(sycl_device) = gpu1.swap_layout();
46 sycl_device.memcpyDeviceToHost(tensor2.data(), gpu_data2, (tensor2.size()) *
sizeof(DataType));
56 for (IndexType
i = 0;
i < 2; ++
i) {
57 for (IndexType
j = 0;
j < 3; ++
j) {
58 for (IndexType
k = 0;
k < 7; ++
k) {
63 sycl_device.deallocate(gpu_data1);
64 sycl_device.deallocate(gpu_data2);
int i
Definition: BiCGSTAB_step_by_step.cpp:9
A tensor expression mapping an existing array of data.
Definition: TensorMap.h:33
The tensor class.
Definition: Tensor.h:68
char char char int int * k
Definition: level2_impl.h:374
#define VERIFY_IS_EQUAL(a, b)
Definition: main.h:367
std::array< T, N > array
Definition: EmulateArray.h:231
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2