| 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 |
#ifndef BOOST_MATH_TOOLS_CSTDINT |
| 7 |
#define BOOST_MATH_TOOLS_CSTDINT |
| 8 |
|
| 9 |
#include <boost/math/tools/config.hpp> |
| 10 |
|
| 11 |
|
| 12 |
#ifdef BOOST_MATH_ENABLE_CUDA |
| 13 |
|
| 14 |
#include <cuda/std/cstdint> |
| 15 |
|
| 16 |
namespace boost { |
| 17 |
namespace math { |
| 18 |
|
| 19 |
using cuda::std::int8_t; |
| 20 |
using cuda::std::int16_t; |
| 21 |
using cuda::std::int32_t; |
| 22 |
using cuda::std::int64_t; |
| 23 |
|
| 24 |
using cuda::std::int_fast8_t; |
| 25 |
using cuda::std::int_fast16_t; |
| 26 |
using cuda::std::int_fast32_t; |
| 27 |
using cuda::std::int_fast64_t; |
| 28 |
|
| 29 |
using cuda::std::int_least8_t; |
| 30 |
using cuda::std::int_least16_t; |
| 31 |
using cuda::std::int_least32_t; |
| 32 |
using cuda::std::int_least64_t; |
| 33 |
|
| 34 |
using cuda::std::intmax_t; |
| 35 |
using cuda::std::intptr_t; |
| 36 |
|
| 37 |
using cuda::std::uint8_t; |
| 38 |
using cuda::std::uint16_t; |
| 39 |
using cuda::std::uint32_t; |
| 40 |
using cuda::std::uint64_t; |
| 41 |
|
| 42 |
using cuda::std::uint_fast8_t; |
| 43 |
using cuda::std::uint_fast16_t; |
| 44 |
using cuda::std::uint_fast32_t; |
| 45 |
using cuda::std::uint_fast64_t; |
| 46 |
|
| 47 |
using cuda::std::uint_least8_t; |
| 48 |
using cuda::std::uint_least16_t; |
| 49 |
using cuda::std::uint_least32_t; |
| 50 |
using cuda::std::uint_least64_t; |
| 51 |
|
| 52 |
using cuda::std::uintmax_t; |
| 53 |
using cuda::std::uintptr_t; |
| 54 |
|
| 55 |
using size_t = unsigned long; |
| 56 |
|
| 57 |
#else |
| 58 |
|
| 59 |
#include <cstdint> |
| 60 |
|
| 61 |
namespace boost { |
| 62 |
namespace math { |
| 63 |
|
| 64 |
using std::int8_t; |
| 65 |
using std::int16_t; |
| 66 |
using std::int32_t; |
| 67 |
using std::int64_t; |
| 68 |
|
| 69 |
using std::int_fast8_t; |
| 70 |
using std::int_fast16_t; |
| 71 |
using std::int_fast32_t; |
| 72 |
using std::int_fast64_t; |
| 73 |
|
| 74 |
using std::int_least8_t; |
| 75 |
using std::int_least16_t; |
| 76 |
using std::int_least32_t; |
| 77 |
using std::int_least64_t; |
| 78 |
|
| 79 |
using std::intmax_t; |
| 80 |
using std::intptr_t; |
| 81 |
|
| 82 |
using std::uint8_t; |
| 83 |
using std::uint16_t; |
| 84 |
using std::uint32_t; |
| 85 |
using std::uint64_t; |
| 86 |
|
| 87 |
using std::uint_fast8_t; |
| 88 |
using std::uint_fast16_t; |
| 89 |
using std::uint_fast32_t; |
| 90 |
using std::uint_fast64_t; |
| 91 |
|
| 92 |
using std::uint_least8_t; |
| 93 |
using std::uint_least16_t; |
| 94 |
using std::uint_least32_t; |
| 95 |
using std::uint_least64_t; |
| 96 |
|
| 97 |
using std::uintmax_t; |
| 98 |
using std::uintptr_t; |
| 99 |
|
| 100 |
using std::size_t; |
| 101 |
|
| 102 |
#endif |
| 103 |
|
| 104 |
} // namespace math |
| 105 |
} // namespace boost |
| 106 |
|
| 107 |
#endif // BOOST_MATH_TOOLS_CSTDINT |