Skip to content
This repository has been archived by the owner on Jan 26, 2024. It is now read-only.

Commit

Permalink
Fixed further tests that weren't caught, as Google Test was not insta…
Browse files Browse the repository at this point in the history
…lled. Closes #65.
  • Loading branch information
Christopher Di Bella committed Feb 19, 2018
1 parent 1dd3d89 commit a72d960
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 14 deletions.
3 changes: 1 addition & 2 deletions include/sycl/algorithm/find.hpp
Expand Up @@ -127,8 +127,7 @@ InputIt find_impl(ExecutionPolicy &sep, InputIt b, InputIt e,
q.wait_and_throw();

const auto hI =
t_buf.template get_access<cl::sycl::access::mode::read,
cl::sycl::access::target::host_buffer>();
t_buf.template get_access<cl::sycl::access::mode::read>();

// there's probably a cleaner way to do this, but essentially once we have
// the "search index", we need to increment the begin iterator until
Expand Down
3 changes: 1 addition & 2 deletions include/sycl/algorithm/inner_product.hpp
Expand Up @@ -166,8 +166,7 @@ T inner_product(ExecutionPolicy &exec, InputIt1 first1, InputIt1 last1,
length = length / local;
} while (length > 1); // end do-while
q.wait_and_throw();
auto hb = bufr.template get_access<cl::sycl::access::mode::read,
cl::sycl::access::target::host_buffer>();
auto hb = bufr.template get_access<cl::sycl::access::mode::read>();
return op1(value, hb[0]);
}
}
Expand Down
3 changes: 1 addition & 2 deletions include/sycl/algorithm/reduce.hpp
Expand Up @@ -96,8 +96,7 @@ typename std::iterator_traits<Iterator>::value_type reduce(
length = length / local;
} while (length > 1);
q.wait_and_throw();
auto hI = bufI.template get_access<cl::sycl::access::mode::read,
cl::sycl::access::target::host_buffer>();
auto hI = bufI.template get_access<cl::sycl::access::mode::read>();
return bop(hI[0], init);
}
#else
Expand Down
3 changes: 1 addition & 2 deletions include/sycl/algorithm/transform_reduce.hpp
Expand Up @@ -100,8 +100,7 @@ T transform_reduce(ExecutionPolicy& exec, InputIterator first,
length = length / local;
} while (length > 1);
q.wait_and_throw();
auto hR = bufR.template get_access<cl::sycl::access::mode::read,
cl::sycl::access::target::host_buffer>();
auto hR = bufR.template get_access<cl::sycl::access::mode::read>();
return binary_op(hR[0], init);
}

Expand Down
3 changes: 1 addition & 2 deletions tests/buffer_unique_ptr.cpp
Expand Up @@ -70,8 +70,7 @@ TEST_F(UniquePTRAlgorithm, TestSyclUniquePTR) {
});
});

auto result = b.get_access<cl::sycl::access::mode::read,
cl::sycl::access::target::host_buffer>();
auto result = b.get_access<cl::sycl::access::mode::read>();
for (int i = 0; i != N; ++i) {
EXPECT_TRUE(result[i] == 2 * 16 * 3.0f);
}
Expand Down
6 changes: 2 additions & 4 deletions tests/vector.cpp
Expand Up @@ -49,8 +49,7 @@ TEST_F(SyclHostIteratorTest, TestIteratorsOnHostAccessor) {
{
// A host vector is just a vector that contains a host_accessor
// The data of the vector is the host accessor
auto hostAcc = sv.get_access<cl::sycl::access::mode::read_write,
cl::sycl::access::target::host_buffer>();
auto hostAcc = sv.get_access<cl::sycl::access::mode::read_write>();

auto vI = v.begin();
int count = 0;
Expand Down Expand Up @@ -78,8 +77,7 @@ TEST_F(SyclHostIteratorTest, TestUsingStlAlgorithm) {
// cl::sycl::buffer<float> sv(cl::sycl::range<1>(v.size()));
cl::sycl::buffer<float> sv(v.begin(), v.end());

auto hostAcc = sv.get_access<cl::sycl::access::mode::read_write,
cl::sycl::access::target::host_buffer>();
auto hostAcc = sv.get_access<cl::sycl::access::mode::read_write>();

std::transform(begin(hostAcc), end(hostAcc), begin(hostAcc),
[=](float e) { return e * 2; });
Expand Down

0 comments on commit a72d960

Please sign in to comment.