38 #include <pvsutil/Logger.h>
42 #include <SkelCL/IndexVector.h>
49 class IndexVectorTest :
public ::testing::Test {
52 pvsutil::defaultLogger.setLoggingLevel(pvsutil::Logger::Severity::Debug);
61 TEST_F(IndexVectorTest, CreateIndexVector) {
64 EXPECT_EQ(1024, vi.size());
65 EXPECT_EQ(0, vi.front());
66 EXPECT_EQ(1023, vi.back());
69 TEST_F(IndexVectorTest, SimpleVoidMap) {
71 skelcl::Map<void(skelcl::Index)> m(
"void func(Index i, __global int* out) { out[i] = i; }");
72 EXPECT_EQ(1024, index.size());
78 EXPECT_EQ(index.size(), v.size());
79 for (
size_t i = 0; i < v.size(); ++i) {
84 TEST_F(IndexVectorTest, SimpleMap) {
86 skelcl::Map<int(skelcl::Index)> m(
"int func(Index i) { return i; }");
87 EXPECT_EQ(1023, index.size());
91 EXPECT_EQ(index.size(), v.size());
92 for (
size_t i = 0; i < v.size(); ++i) {
Out< ContainerType< T > > out(ContainerType< T > &c)
Helper function to create a Out wrapper object.
SKELCL_DLL void init(detail::DeviceProperties properties=allDevices())
Initializes the SkelCL library. This function (or another init function) has to be called prior to ev...
SKELCL_DLL detail::DeviceProperties nDevices(size_t n)
Creates a detail::DeviceProperties object representing n devices. This object should be used as param...
The Vector class is a one dimensional container which makes its data accessible on the host as well a...
SKELCL_DLL void terminate()
Frees all resources allocated internally by SkelCL.
The IndexVector (a.k.a. Vector) class is a special implementation of a Vector with Elements of...