library.hpp 837 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. // Boost.uBLAS
  2. //
  3. // Copyright (c) 2018 Fady Essam
  4. // Copyright (c) 2018 Stefan Seefeld
  5. //
  6. // Distributed under the Boost Software License, Version 1.0.
  7. // (See accompanying file LICENSE_1_0.txt or
  8. // copy at http://www.boost.org/LICENSE_1_0.txt)
  9. #ifndef boost_numeric_ublas_opencl_library_hpp_
  10. #define boost_numeric_ublas_opencl_library_hpp_
  11. #include <clBLAS.h>
  12. #include <type_traits>
  13. #include <complex>
  14. namespace boost { namespace numeric { namespace ublas { namespace opencl {
  15. class library
  16. {
  17. public:
  18. library() { clblasSetup();}
  19. ~library() { clblasTeardown();}
  20. };
  21. template <typename T>
  22. struct is_numeric
  23. {
  24. static bool const value =
  25. std::is_same<T, float>::value |
  26. std::is_same<T, double>::value |
  27. std::is_same<T, std::complex<float>>::value |
  28. std::is_same<T, std::complex<double>>::value;
  29. };
  30. }}}}
  31. #endif