20 #include <cuda_runtime.h>
24 #include <cuda/std/limits>
25 #include <cuda/std/type_traits>
34 auto to_string(T value) -> std::string
36 if constexpr (cuda::std::is_same_v<T, __int128_t>) {
37 auto s = std::string{};
38 auto const sign = value < 0;
42 if (value == cuda::std::numeric_limits<__int128_t>::max())
43 return "-170141183460469231731687303715884105728";
47 s.push_back(
"0123456789"[value % 10]);
50 if (sign) s.push_back(
'-');
54 return std::to_string(value);
60 constexpr
auto abs(T value)
62 return value >= 0 ? value : -value;
68 return lhs < rhs ? lhs : rhs;
74 return lhs > rhs ? lhs : rhs;
77 template <
typename BaseType>
78 constexpr
auto exp10(int32_t exponent)
82 value *= 10, --exponent;
std::unique_ptr< table > reverse(table_view const &source_table, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
Reverses the rows within a table.
fixed_point and supporting types
Type declarations for libcudf.
#define CUDF_HOST_DEVICE
Indicates that the function or method is usable on host and device.