31 IndexType sizeDim1 = 2;
32 IndexType sizeDim2 = 3;
33 IndexType sizeDim3 = 5;
34 IndexType sizeDim4 = 7;
40 const size_t buffSize = tensor.size() *
sizeof(DataType);
46 DataType* gpu_data1 =
static_cast<DataType*
>(sycl_device.allocate(buffSize));
47 DataType* gpu_data2 =
static_cast<DataType*
>(sycl_device.allocate(buffSize));
52 sycl_device.memcpyHostToDevice(gpu_data1, tensor.data(), buffSize);
54 gpu2.device(sycl_device) = gpu1.shuffle(shuffles);
55 sycl_device.memcpyDeviceToHost(no_shuffle.data(), gpu_data2, buffSize);
56 sycl_device.synchronize();
63 for (IndexType
i = 0;
i < sizeDim1; ++
i) {
64 for (IndexType
j = 0;
j < sizeDim2; ++
j) {
65 for (IndexType
k = 0;
k < sizeDim3; ++
k) {
66 for (IndexType l = 0; l < sizeDim4; ++l) {
79 DataType* gpu_data3 =
static_cast<DataType*
>(sycl_device.allocate(buffSize));
82 gpu3.device(sycl_device) = gpu1.shuffle(shuffles);
83 sycl_device.memcpyDeviceToHost(
shuffle.data(), gpu_data3, buffSize);
84 sycl_device.synchronize();
91 for (IndexType
i = 0;
i < sizeDim1; ++
i) {
92 for (IndexType
j = 0;
j < sizeDim2; ++
j) {
93 for (IndexType
k = 0;
k < sizeDim3; ++
k) {
94 for (IndexType l = 0; l < sizeDim4; ++l) {
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
EIGEN_STRONG_INLINE Packet2d shuffle(const Packet2d &m, const Packet2d &n, int mask)
Definition: LSX/PacketMath.h:150
std::array< T, N > array
Definition: EmulateArray.h:231
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2