elementwise_operations_test.cpp 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #include "elementwise_operations_test.hpp"
  2. int main()
  3. {
  4. ///testing row major flaot elementwise operations
  5. bench_elementwise <float, ublas::basic_row_major<>, 10, 10> b1;
  6. ///testing row major complex float elementwise operations
  7. bench_elementwise <std::complex<float>, ublas::basic_row_major<>, 10, 10> b2;
  8. ///testing row major double elementwise operations
  9. bench_elementwise <double, ublas::basic_row_major<>, 10, 10> b5;
  10. ///testing row major complex double elementwise operations
  11. bench_elementwise <std::complex<double>, ublas::basic_row_major<>, 10, 10> b6;
  12. ///testing column major flaot elementwise operations
  13. bench_elementwise <float, ublas::basic_column_major<>, 10, 10> b3;
  14. ///testing column major complex float elementwise operations
  15. bench_elementwise <std::complex<float>, ublas::basic_column_major<>, 10, 10> b4;
  16. ///testing column major double elementwise operations
  17. bench_elementwise <double, ublas::basic_column_major<>, 10, 10> b7;
  18. ///testing column major complex double elementwise operations
  19. bench_elementwise <std::complex<double>, ublas::basic_column_major<>, 10, 10> b8;
  20. std::cout << "row major:" << std::endl;
  21. b1.run();
  22. b2.run();
  23. b5.run();
  24. b6.run();
  25. std::cout << "column major:" << std::endl;
  26. b3.run();
  27. b4.run();
  28. b7.run();
  29. b8.run();
  30. }