42 #include <pvsutil/Logger.h>
45 #include <SkelCL/Vector.h>
52 class ScanTest :
public ::testing::Test {
55 pvsutil::defaultLogger.setLoggingLevel(
56 pvsutil::Logger::Severity::DebugInfo );
66 TEST_F(ScanTest, CreateScanWithString) {
67 skelcl::Scan<float(float)> s{
"float func(float x, float y){ return x+y; }",
71 TEST_F(ScanTest, SimpleScan) {
72 skelcl::Scan<int(int)> s{
"int func(int x, int y){ return x+y; }" };
75 for (
size_t i = 0; i < input.size(); ++i) {
78 EXPECT_EQ(1024, input.size());
82 input.dataOnDeviceModified();
84 EXPECT_EQ(1024, output.size());
85 for (
size_t i = 0; i < output.size(); ++i) {
86 EXPECT_EQ(i, output[i]);
90 TEST_F(ScanTest, SmallScan) {
91 skelcl::Scan<int(int)> s{
"int func(int x, int y){ return x+y; }" };
94 for (
size_t i = 0; i < input.size(); ++i) {
97 EXPECT_EQ(10, input.size());
101 input.dataOnDeviceModified();
103 EXPECT_EQ(10, output.size());
104 for (
size_t i = 0; i < output.size(); ++i) {
105 EXPECT_EQ(i, output[i]);
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.