array.hpp 872 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // Copyright (c) 2024 Matt Borland
  2. // Use, modification and distribution are subject to the
  3. // Boost Software License, Version 1.0. (See accompanying file
  4. // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. //
  6. // Regular use of std::array functions can not be used on
  7. // GPU platforms like CUDA since they are missing the __device__ marker
  8. // Alias as needed to get correct support
  9. #ifndef BOOST_MATH_TOOLS_ARRAY_HPP
  10. #define BOOST_MATH_TOOLS_ARRAY_HPP
  11. #include <boost/math/tools/config.hpp>
  12. #ifdef BOOST_MATH_ENABLE_CUDA
  13. #include <cuda/std/array>
  14. namespace boost {
  15. namespace math {
  16. using cuda::std::array;
  17. } // namespace math
  18. } // namespace boost
  19. #else
  20. #include <array>
  21. namespace boost {
  22. namespace math {
  23. using std::array;
  24. } // namespace math
  25. } // namespace boost
  26. #endif // BOOST_MATH_ENABLE_CUDA
  27. #endif // BOOST_MATH_TOOLS_ARRAY_HPP