#ifndef TEST_NORM2_OPENCL_HH #define TEST_NORM2_OPENCL_HH #include "test_opencl.hpp" template class bench_norm2 { public: typedef test_opencl> test; void run() { opencl::library lib; int passedOperations = 0; // get default device and setup context compute::device device = compute::system::default_device(); compute::context context(device); compute::command_queue queue(context, device); std::srand(time(0)); ublas::vector v; for (int i = 0; i 1e-6) //precision of float { std::cout << "Error in calculations" << std::endl; std::cout << "passed: " << passedOperations << std::endl; return; } passedOperations++; } std::cout << "All is well (vector opencl a_sum) of " << typeid(T).name() << std::endl; } }; #endif