| 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 |
|
| 10 |
#ifndef BOOST_MATH_TOOLS_ARRAY_HPP |
| 11 |
#define BOOST_MATH_TOOLS_ARRAY_HPP |
| 12 |
|
| 13 |
#include <boost/math/tools/config.hpp> |
| 14 |
|
| 15 |
#ifdef BOOST_MATH_ENABLE_CUDA |
| 16 |
|
| 17 |
#include <cuda/std/array> |
| 18 |
|
| 19 |
namespace boost { |
| 20 |
namespace math { |
| 21 |
|
| 22 |
using cuda::std::array; |
| 23 |
|
| 24 |
} // namespace math |
| 25 |
} // namespace boost |
| 26 |
|
| 27 |
#else |
| 28 |
|
| 29 |
#include <array> |
| 30 |
|
| 31 |
namespace boost { |
| 32 |
namespace math { |
| 33 |
|
| 34 |
using std::array; |
| 35 |
|
| 36 |
} // namespace math |
| 37 |
} // namespace boost |
| 38 |
|
| 39 |
#endif // BOOST_MATH_ENABLE_CUDA |
| 40 |
|
| 41 |
#endif // BOOST_MATH_TOOLS_ARRAY_HPP |