21 #include <cuda/std/limits>
22 #include <cuda/std/type_traits>
31 auto to_string(T value) -> std::string
33 if constexpr (cuda::std::is_same_v<T, __int128_t>) {
34 auto s = std::string{};
35 auto const sign = value < 0;
39 if (value == cuda::std::numeric_limits<__int128_t>::max())
40 return "-170141183460469231731687303715884105728";
44 s.push_back(
"0123456789"[value % 10]);
47 if (sign) s.push_back(
'-');
51 return std::to_string(value);
57 constexpr
auto abs(T value)
59 return value >= 0 ? value : -value;
65 return lhs < rhs ? lhs : rhs;
71 return lhs > rhs ? lhs : rhs;
74 template <
typename BaseType>
75 constexpr
auto exp10(int32_t exponent)
79 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.