46 #define BENCHMARK_VECTOR_SIZE   2 
   47 #define BENCHMARK_RUNS          1000 
   50 template<
typename ScalarType>
 
   71     std_vec1[i] = std_vec1[i-1] * 
ScalarType(1.000001);
 
   72     std_vec2[i] = std_vec1[i-1] * 
ScalarType(0.999999);
 
   80   vcl_vec2 = alpha * vcl_vec1 + beta * vcl_vec2;
 
   85     vcl_vec2 = alpha * vcl_vec1 + beta * vcl_vec2;
 
   88   exec_time = timer.
get();
 
   89   std::cout << 
"Execution time per operation, no scheduler: " << exec_time / BENCHMARK_RUNS << 
" sec" << std::endl;
 
   90   std::cout << 
"Result: " << vcl_vec2[0] << std::endl;
 
  100   exec_time = timer.
get();
 
  101   std::cout << 
"Execution time per operation, with scheduler including statement generation: " << exec_time / BENCHMARK_RUNS << 
" sec" << std::endl;
 
  102   std::cout << 
"Result: " << vcl_vec2[0] << std::endl;
 
  112   exec_time = timer.
get();
 
  113   std::cout << 
"Execution time per operation, only execution: " << exec_time / BENCHMARK_RUNS << 
" sec" << std::endl;
 
  114   std::cout << 
"Result: " << vcl_vec2[0] << std::endl;
 
  121   std::cout << std::endl;
 
  122   std::cout << 
"----------------------------------------------" << std::endl;
 
  123   std::cout << 
"               Device Info" << std::endl;
 
  124   std::cout << 
"----------------------------------------------" << std::endl;
 
  126 #ifdef VIENNACL_WITH_OPENCL 
  130   std::cout << std::endl;
 
  131   std::cout << 
"----------------------------------------------" << std::endl;
 
  132   std::cout << 
"----------------------------------------------" << std::endl;
 
  133   std::cout << 
"## Benchmark :: Vector" << std::endl;
 
  134   std::cout << 
"----------------------------------------------" << std::endl;
 
  135   std::cout << std::endl;
 
  136   std::cout << 
"   -------------------------------" << std::endl;
 
  137   std::cout << 
"   # benchmarking single-precision" << std::endl;
 
  138   std::cout << 
"   -------------------------------" << std::endl;
 
  139   run_benchmark<float>();
 
  140 #ifdef VIENNACL_WITH_OPENCL 
  144     std::cout << std::endl;
 
  145     std::cout << 
"   -------------------------------" << std::endl;
 
  146     std::cout << 
"   # benchmarking double-precision" << std::endl;
 
  147     std::cout << 
"   -------------------------------" << std::endl;
 
  148     run_benchmark<double>();
 
Generic interface for the l^2-norm. See viennacl/linalg/vector_operations.hpp for implementations...
Implementation of the dense matrix class. 
A tag class representing assignment. 
void finish()
Synchronizes the execution. finish() will only return after all compute kernels (CUDA, OpenCL) have completed. 
void execute(statement const &s)
#define BENCHMARK_VECTOR_SIZE
viennacl::ocl::device const & current_device()
Convenience function for returning the active device in the current context. 
Generic interface for the computation of inner products. See viennacl/linalg/vector_operations.hpp for implementations. 
std::string info(vcl_size_t indent=0, char indent_char= ' ') const 
Returns an info string with a few properties of the device. Use full_info() to get all details...
bool double_support() const 
ViennaCL convenience function: Returns true if the device supports double precision. 
A simple, yet (mostly) sufficiently accurate timer for benchmarking and profiling. 
The vector type with operator-overloads and proxy classes is defined here. Linear algebra operations ...
void copy(std::vector< NumericT > &cpu_vec, circulant_matrix< NumericT, AlignmentV > &gpu_mat)
Copies a circulant matrix from the std::vector to the OpenCL device (either GPU or multi-core CPU) ...
Provides the datastructures for dealing with a single statement such as 'x = y + z;'. 
The main class for representing a statement such as x = inner_prod(y,z); at runtime. 
Implementation of the ViennaCL scalar class. 
void fast_copy(const const_vector_iterator< SCALARTYPE, ALIGNMENT > &gpu_begin, const const_vector_iterator< SCALARTYPE, ALIGNMENT > &gpu_end, CPU_ITERATOR cpu_begin)