scalar.hpp
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2019-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: Apache-2.0
4  */
5 #pragma once
6 
7 #include <cudf/column/column.hpp>
8 #include <cudf/detail/device_scalar.hpp>
9 #include <cudf/table/table.hpp>
10 #include <cudf/types.hpp>
14 
15 #include <rmm/device_buffer.hpp>
16 #include <rmm/device_scalar.hpp>
17 
18 #include <cuda/stream>
19 
20 #include <span>
21 #include <string_view>
22 
28 namespace CUDF_EXPORT cudf {
42 class scalar {
43  public:
44  scalar() = delete;
45  virtual ~scalar() = default;
46  scalar& operator=(scalar const& other) = delete;
47  scalar& operator=(scalar&& other) = delete;
48 
54  [[nodiscard]] data_type type() const noexcept;
55 
62  void set_valid_async(bool is_valid, cuda::stream_ref stream = cudf::get_default_stream());
63 
74  [[nodiscard]] bool is_valid(cuda::stream_ref stream = cudf::get_default_stream()) const;
75 
81  bool* validity_data();
82 
88  [[nodiscard]] bool const* validity_data() const;
89 
90  protected:
91  data_type _type{type_id::EMPTY};
92  cudf::detail::device_scalar<bool> _is_valid;
93 
98  scalar(scalar&& other) = default;
99 
107  scalar(scalar const& other,
108  cuda::stream_ref stream = cudf::get_default_stream(),
110 
123  bool is_valid = false,
124  cuda::stream_ref stream = cudf::get_default_stream(),
126 };
127 
128 namespace detail {
134 template <typename T>
135 class fixed_width_scalar : public scalar {
136  static_assert(is_fixed_width<T>(), "Unexpected non-fixed-width type.");
137 
138  public:
139  using value_type = T;
140 
141  fixed_width_scalar() = delete;
142  ~fixed_width_scalar() override = default;
143 
149 
150  fixed_width_scalar& operator=(fixed_width_scalar const& other) = delete;
151  fixed_width_scalar& operator=(fixed_width_scalar&& other) = delete;
152 
161  cuda::stream_ref stream = cudf::get_default_stream(),
163 
170  void set_value(T value, cuda::stream_ref stream = cudf::get_default_stream());
171 
178  [[nodiscard]] T value(cuda::stream_ref stream = cudf::get_default_stream()) const;
179 
184  T* data();
185 
190  [[nodiscard]] T const* data() const;
191 
192  protected:
193  cudf::detail::device_scalar<T> _data;
194 
204  bool is_valid = true,
205  cuda::stream_ref stream = cudf::get_default_stream(),
207 
216  fixed_width_scalar(cudf::detail::device_scalar<T>&& data,
217  bool is_valid = true,
218  cuda::stream_ref stream = cudf::get_default_stream(),
220 };
221 
222 } // namespace detail
223 
229 template <typename T>
231  static_assert(is_numeric<T>(), "Unexpected non-numeric type.");
232 
233  public:
234  numeric_scalar() = delete;
235  ~numeric_scalar() override = default;
236 
241  numeric_scalar(numeric_scalar&& other) = default;
242 
243  numeric_scalar& operator=(numeric_scalar const& other) = delete;
244  numeric_scalar& operator=(numeric_scalar&& other) = delete;
245 
254  cuda::stream_ref stream = cudf::get_default_stream(),
256 
265  numeric_scalar(T value,
266  bool is_valid = true,
267  cuda::stream_ref stream = cudf::get_default_stream(),
269 
281  explicit numeric_scalar(
282  scalar const& data,
283  cuda::stream_ref stream = cudf::get_default_stream(),
285 
296  [[deprecated("Use the cudf::scalar constructor instead.")]] numeric_scalar(
297  rmm::device_scalar<T>&& data,
298  bool is_valid = true,
299  cuda::stream_ref stream = cudf::get_default_stream(),
301 };
302 
308 template <typename T>
309 class fixed_point_scalar : public scalar {
310  static_assert(is_fixed_point<T>(), "Unexpected non-fixed_point type.");
311 
312  public:
313  using rep_type = typename T::rep;
314  using value_type = T;
315 
316  fixed_point_scalar() = delete;
317  ~fixed_point_scalar() override = default;
318 
324 
325  fixed_point_scalar& operator=(fixed_point_scalar const& other) = delete;
326  fixed_point_scalar& operator=(fixed_point_scalar&& other) = delete;
327 
336  cuda::stream_ref stream = cudf::get_default_stream(),
338 
349  numeric::scale_type scale,
350  bool is_valid = true,
351  cuda::stream_ref stream = cudf::get_default_stream(),
353 
363  bool is_valid = true,
364  cuda::stream_ref stream = cudf::get_default_stream(),
366 
376  bool is_valid = true,
377  cuda::stream_ref stream = cudf::get_default_stream(),
379 
393  scalar const& data,
394  cuda::stream_ref stream = cudf::get_default_stream(),
396 
408  [[deprecated("Use the cudf::scalar constructor instead.")]] fixed_point_scalar(
410  numeric::scale_type scale,
411  bool is_valid = true,
412  cuda::stream_ref stream = cudf::get_default_stream(),
414 
421  [[nodiscard]] rep_type value(cuda::stream_ref stream = cudf::get_default_stream()) const;
422 
429  [[nodiscard]] T fixed_point_value(cuda::stream_ref stream = cudf::get_default_stream()) const;
430 
436 
441  [[nodiscard]] rep_type const* data() const;
442 
443  protected:
444  cudf::detail::device_scalar<rep_type> _data;
445 };
446 
450 class string_scalar : public scalar {
451  public:
453 
454  string_scalar() = delete;
455  ~string_scalar() override = default;
456 
461  string_scalar(string_scalar&& other) = default;
462 
463  // string_scalar(string_scalar const& other) = delete;
464  string_scalar& operator=(string_scalar const& other) = delete;
465  string_scalar& operator=(string_scalar&& other) = delete;
466 
475  cuda::stream_ref stream = cudf::get_default_stream(),
477 
488  string_scalar(std::string_view string,
489  bool is_valid = true,
490  cuda::stream_ref stream = cudf::get_default_stream(),
492 
503  string_scalar(value_type const& source,
504  bool is_valid = true,
505  cuda::stream_ref stream = cudf::get_default_stream(),
507 
519  explicit string_scalar(
520  scalar const& data,
521  cuda::stream_ref stream = cudf::get_default_stream(),
523 
536  [[deprecated("Use the cudf::scalar constructor instead.")]] string_scalar(
538  bool is_valid = true,
539  cuda::stream_ref stream = cudf::get_default_stream(),
541 
554  bool is_valid = true,
555  cuda::stream_ref stream = cudf::get_default_stream(),
557 
564  [[nodiscard]] std::string to_string(cuda::stream_ref stream = cudf::get_default_stream()) const;
565 
572  [[nodiscard]] value_type value(cuda::stream_ref stream = cudf::get_default_stream()) const;
573 
578  [[nodiscard]] size_type size() const;
579 
584  [[nodiscard]] char const* data() const;
585 
586  protected:
588 };
589 
596 template <typename T>
598  static_assert(is_chrono<T>(), "Unexpected non-chrono type");
599 
600  public:
601  chrono_scalar() = delete;
602  ~chrono_scalar() override = default;
603 
608  chrono_scalar(chrono_scalar&& other) = default;
609 
610  chrono_scalar& operator=(chrono_scalar const& other) = delete;
611  chrono_scalar& operator=(chrono_scalar&& other) = delete;
612 
621  cuda::stream_ref stream = cudf::get_default_stream(),
623 
632  chrono_scalar(T value,
633  bool is_valid = true,
634  cuda::stream_ref stream = cudf::get_default_stream(),
636 
648  explicit chrono_scalar(
649  scalar const& data,
650  cuda::stream_ref stream = cudf::get_default_stream(),
652 
663  [[deprecated("Use the cudf::scalar constructor instead.")]] chrono_scalar(
664  rmm::device_scalar<T>&& data,
665  bool is_valid = true,
666  cuda::stream_ref stream = cudf::get_default_stream(),
668 };
669 
676 template <typename T>
677 class timestamp_scalar : public chrono_scalar<T> {
678  public:
679  static_assert(is_timestamp<T>(), "Unexpected non-timestamp type");
681  using rep_type = typename T::rep;
682 
683  timestamp_scalar() = delete;
684 
689  timestamp_scalar(timestamp_scalar&& other) = default;
690 
699  cuda::stream_ref stream = cudf::get_default_stream(),
701 
714  scalar const& data,
715  cuda::stream_ref stream = cudf::get_default_stream(),
717  : chrono_scalar<T>(data, stream, mr)
718  {
719  }
720 
731  template <typename Duration2>
732  timestamp_scalar(Duration2 const& value,
733  bool is_valid,
734  cuda::stream_ref stream = cudf::get_default_stream(),
736 
742  rep_type ticks_since_epoch(cuda::stream_ref stream);
743 };
744 
751 template <typename T>
752 class duration_scalar : public chrono_scalar<T> {
753  public:
754  static_assert(is_duration<T>(), "Unexpected non-duration type");
756  using rep_type = typename T::rep;
757 
758  duration_scalar() = delete;
759 
764  duration_scalar(duration_scalar&& other) = default;
765 
774  cuda::stream_ref stream = cudf::get_default_stream(),
776 
788  explicit duration_scalar(
789  scalar const& data,
790  cuda::stream_ref stream = cudf::get_default_stream(),
792  : chrono_scalar<T>(data, stream, mr)
793  {
794  }
795 
805  bool is_valid,
806  cuda::stream_ref stream = cudf::get_default_stream(),
808 
814  rep_type count(cuda::stream_ref stream);
815 };
816 
820 class list_scalar : public scalar {
821  public:
822  list_scalar() = delete;
823  ~list_scalar() override = default;
824 
829  list_scalar(list_scalar&& other) = default;
830 
831  list_scalar& operator=(list_scalar const& other) = delete;
832  list_scalar& operator=(list_scalar&& other) = delete;
833 
841  list_scalar(list_scalar const& other,
842  cuda::stream_ref stream = cudf::get_default_stream(),
844 
856  bool is_valid = true,
857  cuda::stream_ref stream = cudf::get_default_stream(),
859 
869  bool is_valid = true,
870  cuda::stream_ref stream = cudf::get_default_stream(),
872 
877  [[nodiscard]] column_view view() const;
878 
879  private:
880  cudf::column _data;
881 };
882 
886 class struct_scalar : public scalar {
887  public:
888  struct_scalar() = delete;
889  ~struct_scalar() override = default;
890 
895  struct_scalar(struct_scalar&& other) = default;
896  struct_scalar& operator=(struct_scalar const& other) = delete;
897  struct_scalar& operator=(struct_scalar&& other) = delete;
898 
907  cuda::stream_ref stream = cudf::get_default_stream(),
909 
921  bool is_valid = true,
922  cuda::stream_ref stream = cudf::get_default_stream(),
924 
935  struct_scalar(std::span<column_view const> data,
936  bool is_valid = true,
937  cuda::stream_ref stream = cudf::get_default_stream(),
939 
952  bool is_valid = true,
953  cuda::stream_ref stream = cudf::get_default_stream(),
955 
960  [[nodiscard]] table_view view() const;
961 
962  private:
963  table _data;
964 
968  void assert_valid_size();
969 
979  static table init_data(table&& data,
980  bool is_valid,
981  cuda::stream_ref stream,
983 };
984  // end of group
986 } // namespace CUDF_EXPORT cudf
An owning class to represent a timestamp/duration value in device memory.
Definition: scalar.hpp:597
chrono_scalar(T value, bool is_valid=true, cuda::stream_ref stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Construct a new chrono scalar object.
chrono_scalar(rmm::device_scalar< T > &&data, bool is_valid=true, cuda::stream_ref stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Construct a new chrono scalar object from existing device memory.
chrono_scalar(chrono_scalar const &other, cuda::stream_ref stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Construct a new chrono scalar object by deep copying another.
chrono_scalar(chrono_scalar &&other)=default
Move constructor for chrono_scalar.
chrono_scalar(scalar const &data, cuda::stream_ref stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Construct a new chrono scalar object from another scalar.
A non-owning, immutable view of device data as a column of elements, some of which may be null as ind...
A container of nullable device data as a column of elements.
Definition: column.hpp:37
Indicator for the logical data type of an element in a column.
Definition: types.hpp:279
An owning class to represent a fixed-width type value in device memory.
Definition: scalar.hpp:135
fixed_width_scalar(cudf::detail::device_scalar< T > &&data, bool is_valid=true, cuda::stream_ref stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Construct a new fixed width scalar object from existing device memory.
fixed_width_scalar(fixed_width_scalar &&other)=default
Move constructor for fixed_width_scalar.
fixed_width_scalar(T value, bool is_valid=true, cuda::stream_ref stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Construct a new fixed width scalar object.
T const * data() const
Returns a const raw pointer to the value in device memory.
cudf::detail::device_scalar< T > _data
device memory containing the value
Definition: scalar.hpp:193
T value_type
Type of the value held by the scalar.
Definition: scalar.hpp:139
void set_value(T value, cuda::stream_ref stream=cudf::get_default_stream())
Set the value of the scalar.
T value(cuda::stream_ref stream=cudf::get_default_stream()) const
Get the value of the scalar.
fixed_width_scalar(fixed_width_scalar const &other, cuda::stream_ref stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Construct a new fixed-width scalar object by deep copying another.
T * data()
Returns a raw pointer to the value in device memory.
An owning class to represent a duration value in device memory.
Definition: scalar.hpp:752
duration_scalar(scalar const &data, cuda::stream_ref stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Construct a new duration scalar object from another scalar.
Definition: scalar.hpp:788
duration_scalar(duration_scalar const &other, cuda::stream_ref stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Construct a new duration scalar object by deep copying another.
duration_scalar(duration_scalar &&other)=default
Move constructor for duration_scalar.
rep_type count(cuda::stream_ref stream)
Returns the duration in number of ticks.
duration_scalar(rep_type value, bool is_valid, cuda::stream_ref stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Construct a new duration scalar object from tick counts.
typename T::rep rep_type
The duration's underlying representation type.
Definition: scalar.hpp:756
An owning class to represent a fixed_point number in device memory.
Definition: scalar.hpp:309
rep_type value(cuda::stream_ref stream=cudf::get_default_stream()) const
Get the value of the scalar.
fixed_point_scalar(fixed_point_scalar &&other)=default
Move constructor for fixed_point_scalar.
fixed_point_scalar(scalar const &data, cuda::stream_ref stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Construct a new fixed_point scalar object from another scalar.
fixed_point_scalar(rmm::device_scalar< rep_type > &&data, numeric::scale_type scale, bool is_valid=true, cuda::stream_ref stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Construct a new fixed_point scalar object from existing device memory.
fixed_point_scalar(rep_type value, numeric::scale_type scale, bool is_valid=true, cuda::stream_ref stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Construct a new fixed_point scalar object from already shifted value and scale.
T value_type
The value type of the fixed_point number.
Definition: scalar.hpp:314
fixed_point_scalar(fixed_point_scalar const &other, cuda::stream_ref stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Construct a new fixed_point scalar object by deep copying another.
fixed_point_scalar(T value, bool is_valid=true, cuda::stream_ref stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Construct a new fixed_point scalar object from a fixed_point number.
rep_type const * data() const
Returns a const raw pointer to the value in device memory.
cudf::detail::device_scalar< rep_type > _data
device memory containing the value
Definition: scalar.hpp:444
T fixed_point_value(cuda::stream_ref stream=cudf::get_default_stream()) const
Get the decimal32, decimal64 or decimal128.
fixed_point_scalar(rep_type value, bool is_valid=true, cuda::stream_ref stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Construct a new fixed_point scalar object from a value and default 0-scale.
rep_type * data()
Returns a raw pointer to the value in device memory.
typename T::rep rep_type
The representation type of the fixed_point number.
Definition: scalar.hpp:313
An owning class to represent a list value in device memory.
Definition: scalar.hpp:820
column_view view() const
Returns a non-owning, immutable view to underlying device data.
list_scalar(cudf::column_view const &data, bool is_valid=true, cuda::stream_ref stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Construct a new list scalar object from column_view.
list_scalar(list_scalar const &other, cuda::stream_ref stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Construct a new list scalar object by deep copying another.
list_scalar(list_scalar &&other)=default
Move constructor for list_scalar.
list_scalar(cudf::column &&data, bool is_valid=true, cuda::stream_ref stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Construct a new list scalar object from existing column.
An owning class to represent a numerical value in device memory.
Definition: scalar.hpp:230
numeric_scalar(rmm::device_scalar< T > &&data, bool is_valid=true, cuda::stream_ref stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Construct a new numeric scalar object from existing device memory.
numeric_scalar(scalar const &data, cuda::stream_ref stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Construct a new numeric scalar object from another scalar.
numeric_scalar(numeric_scalar &&other)=default
Move constructor for numeric_scalar.
numeric_scalar(numeric_scalar const &other, cuda::stream_ref stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Construct a new numeric scalar object by deep copying another.
numeric_scalar(T value, bool is_valid=true, cuda::stream_ref stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Construct a new numeric scalar object.
An owning class to represent a singular value.
Definition: scalar.hpp:42
scalar(scalar &&other)=default
Move constructor for scalar.
scalar(scalar const &other, cuda::stream_ref stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Construct a new scalar object by deep copying another.
scalar(data_type type, bool is_valid=false, cuda::stream_ref stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Construct a new scalar object.
data_type type() const noexcept
Returns the scalar's logical value type.
cudf::detail::device_scalar< bool > _is_valid
Device bool signifying validity.
Definition: scalar.hpp:92
An owning class to represent a string in device memory.
Definition: scalar.hpp:450
string_scalar(std::string_view string, bool is_valid=true, cuda::stream_ref stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Construct a new string scalar object.
string_scalar(value_type const &source, bool is_valid=true, cuda::stream_ref stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Construct a new string scalar object from string_view.
string_scalar(scalar const &data, cuda::stream_ref stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Construct a new string scalar object from another scalar.
size_type size() const
Returns the size of the string in bytes.
string_scalar(rmm::device_buffer &&data, bool is_valid=true, cuda::stream_ref stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Construct a new string scalar object by moving an existing string data buffer.
string_scalar(string_scalar &&other)=default
Move constructor for string_scalar.
string_scalar(string_scalar const &other, cuda::stream_ref stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Construct a new string scalar object by deep copying another string_scalar.
std::string to_string(cuda::stream_ref stream=cudf::get_default_stream()) const
Get the value of the scalar in a host std::string.
value_type value(cuda::stream_ref stream=cudf::get_default_stream()) const
Get the value of the scalar as a string_view.
string_scalar(rmm::device_scalar< value_type > &data, bool is_valid=true, cuda::stream_ref stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Construct a new string scalar object from string_view in device memory.
char const * data() const
Returns a raw pointer to the string in device memory.
A non-owning, immutable view of device data that is a variable length char array representing a UTF-8...
Definition: string_view.hpp:35
An owning class to represent a struct value in device memory.
Definition: scalar.hpp:886
struct_scalar(struct_scalar const &other, cuda::stream_ref stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Construct a new struct scalar object by deep copying another.
struct_scalar(table_view const &data, bool is_valid=true, cuda::stream_ref stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Construct a new struct scalar object from table_view.
struct_scalar(table &&data, bool is_valid=true, cuda::stream_ref stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Construct a new struct scalar object from an existing table in device memory.
struct_scalar(std::span< column_view const > data, bool is_valid=true, cuda::stream_ref stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Construct a new struct scalar object from a span of column_views.
table_view view() const
Returns a non-owning, immutable view to underlying device data.
struct_scalar(struct_scalar &&other)=default
Move constructor for struct_scalar.
A set of cudf::column_view's of the same size.
Definition: table_view.hpp:206
A set of cudf::column's of the same size.
Definition: table.hpp:31
An owning class to represent a timestamp value in device memory.
Definition: scalar.hpp:677
timestamp_scalar(timestamp_scalar &&other)=default
Move constructor for timestamp_scalar.
timestamp_scalar(Duration2 const &value, bool is_valid, cuda::stream_ref stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Construct a new timestamp scalar object from a duration that is convertible to T::duration.
typename T::rep rep_type
The underlying representation type of the timestamp.
Definition: scalar.hpp:681
timestamp_scalar(timestamp_scalar const &other, cuda::stream_ref stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Construct a new timestamp scalar object by deep copying another.
rep_type ticks_since_epoch(cuda::stream_ref stream)
Returns the duration in number of ticks since the UNIX epoch.
timestamp_scalar(scalar const &data, cuda::stream_ref stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Construct a new timestamp scalar object from another scalar.
Definition: scalar.hpp:713
Class definition for cudf::column.
APIs for querying the default CUDA stream and per-thread default stream status.
cuda::stream_ref const get_default_stream()
Get the current default stream.
scale_type
The scale type for fixed_point.
Definition: fixed_point.hpp:38
rmm::device_async_resource_ref get_current_device_resource_ref()
Get the current device memory resource reference.
cuda::mr::resource_ref< cuda::mr::device_accessible > device_async_resource_ref
std::unique_ptr< cudf::column > is_valid(cudf::column_view const &input, cuda::stream_ref stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Creates a column of type_id::BOOL8 elements where for every element in input true indicates the value...
int32_t size_type
Row index type for columns and tables.
Definition: types.hpp:76
APIs for getting and setting the current device memory resource.
cuDF interfaces
Definition: host_udf.hpp:27
Class definition for cudf::table.
Type traits for classifying and querying properties of cudf column and scalar types.
Type declarations for libcudf.