Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

[SYCL] Remove testing of handler::copy with atomic accessors #126

Merged
merged 1 commit into from
Jan 28, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 0 additions & 60 deletions SYCL/Basic/handler/handler_mem_op.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ template <typename T> void test_update_host();
template <typename T> void test_2D_copy_acc_acc();
template <typename T> void test_3D_copy_acc_acc();
template <typename T> void test_0D1D_copy_acc_acc();
template <typename T> void test_0D1D_copy_acc_acc_atomic();
template <typename T> void test_1D2D_copy_acc_acc();
template <typename T> void test_1D3D_copy_acc_acc();
template <typename T> void test_2D1D_copy_acc_acc();
Expand Down Expand Up @@ -165,12 +164,6 @@ int main() {
test_0D1D_copy_acc_acc<point<float>>();
}

// handler.copy(acc, acc) 0D to/from 1D where one/both acc are atomic
{
test_0D1D_copy_acc_acc_atomic<int>();
test_0D1D_copy_acc_acc_atomic<float>();
}

// handler.copy(acc, acc) 1D to 2D
{
test_1D2D_copy_acc_acc<int>();
Expand Down Expand Up @@ -636,59 +629,6 @@ template <typename T> void test_0D1D_copy_acc_acc() {
assert(Dst == 7);
}

template <typename T> void test_0D1D_copy_acc_acc_atomic() {
// Copy 1 element from 0-dim ATOMIC accessor to 1-dim accessor
T Src = T(1);
T Dst = T(0);
{
buffer<T, 1> BufferFrom(&Src, range<1>(1));
buffer<T, 1> BufferTo(&Dst, range<1>(1));
queue Queue;
Queue.submit([&](handler &Cgh) {
accessor<T, 0, access::mode::atomic, access::target::global_buffer>
AccessorFrom(BufferFrom, Cgh);
accessor<T, 1, access::mode::write, access::target::global_buffer>
AccessorTo(BufferTo, Cgh);
Cgh.copy(AccessorFrom, AccessorTo);
});
}
assert(Dst == 1);

// Copy 1 element from 1-dim ATOMIC accessor to 0-dim accessor
Src = T(3);
Dst = T(0);
{
buffer<T, 1> BufferFrom(&Src, range<1>(1));
buffer<T, 1> BufferTo(&Dst, range<1>(1));
queue Queue;
Queue.submit([&](handler &Cgh) {
accessor<T, 1, access::mode::atomic, access::target::global_buffer>
AccessorFrom(BufferFrom, Cgh);
accessor<T, 0, access::mode::write, access::target::global_buffer>
AccessorTo(BufferTo, Cgh);
Cgh.copy(AccessorFrom, AccessorTo);
});
}
assert(Dst == 3);

// Copy 1 element from 0-dim ATOMIC accessor to 0-dim ATOMIC accessor
Src = T(7);
Dst = T(0);
{
buffer<T, 1> BufferFrom(&Src, range<1>(1));
buffer<T, 1> BufferTo(&Dst, range<1>(1));
queue Queue;
Queue.submit([&](handler &Cgh) {
accessor<T, 0, access::mode::atomic, access::target::global_buffer>
AccessorFrom(BufferFrom, Cgh);
accessor<T, 0, access::mode::atomic, access::target::global_buffer>
AccessorTo(BufferTo, Cgh);
Cgh.copy(AccessorFrom, AccessorTo);
});
}
assert(Dst == 7);
}

template <typename T> void test_1D2D_copy_acc_acc() {
const size_t Size = 20;
std::vector<T> Data(Size);
Expand Down