24 #include <rmm/mr/device/per_device_resource.hpp>
25 #include <rmm/resource_ref.hpp>
51 template <
typename Fixed,
53 typename cuda::std::enable_if_t<is_fixed_point<Fixed>() &&
54 cuda::std::is_floating_point_v<Floating>>* =
nullptr>
57 using Rep =
typename Fixed::rep;
58 auto const shifted = numeric::detail::shift<Rep, Fixed::rad>(floating, scale);
76 template <
typename Floating,
78 typename cuda::std::enable_if_t<cuda::std::is_floating_point_v<Floating> &&
79 is_fixed_point<Fixed>()>* =
nullptr>
82 using Rep =
typename Fixed::rep;
83 auto const casted =
static_cast<Floating
>(fixed.value());
85 return numeric::detail::shift<Rep, Fixed::rad>(casted, scale);
96 template <
typename Floating,
98 typename cuda::std::enable_if_t<cuda::std::is_floating_point_v<Floating>>* =
nullptr>
101 if constexpr (is_fixed_point<Input>()) {
102 return convert_fixed_to_floating<Floating>(input);
104 return static_cast<Floating
>(input);
152 rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
168 rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
184 rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
203 rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
221 rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
240 rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
A non-owning, immutable view of device data as a column of elements, some of which may be null as ind...
Indicator for the logical data type of an element in a column.
Class definition for fixed point data type.
rmm::cuda_stream_view const get_default_stream()
Get the current default stream.
scale_type
The scale type for fixed_point.
Helper struct for constructing fixed_point when value is already shifted.
Type declarations for libcudf.
#define CUDF_HOST_DEVICE
Indicates that the function or method is usable on host and device.