unary.hpp
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2018-2025, NVIDIA CORPORATION.
3  * SPDX-License-Identifier: Apache-2.0
4  */
5 
6 #pragma once
7 
8 #include <cudf/fixed_point/detail/floating_conversion.hpp>
10 #include <cudf/types.hpp>
12 #include <cudf/utilities/export.hpp>
15 
16 #include <memory>
17 
18 namespace CUDF_EXPORT cudf {
29 enum class unary_operator : int32_t {
30  SIN,
31  COS,
32  TAN,
33  ARCSIN,
34  ARCCOS,
35  ARCTAN,
36  SINH,
37  COSH,
38  TANH,
39  ARCSINH,
40  ARCCOSH,
41  ARCTANH,
42  EXP,
43  LOG,
44  SQRT,
45  CBRT,
46  CEIL,
47  FLOOR,
48  ABS,
49  RINT,
50  BIT_COUNT,
51  BIT_INVERT,
52  NOT,
53  NEGATE,
54 };
55 
68 std::unique_ptr<cudf::column> unary_operation(
69  cudf::column_view const& input,
73 
85 std::unique_ptr<cudf::column> is_null(
86  cudf::column_view const& input,
89 
101 std::unique_ptr<cudf::column> is_valid(
102  cudf::column_view const& input,
105 
119 std::unique_ptr<column> cast(
120  column_view const& input,
121  data_type out_type,
124 
133 bool is_supported_cast(data_type from, data_type to) noexcept;
134 
148 std::unique_ptr<column> is_nan(
149  cudf::column_view const& input,
152 
167 std::unique_ptr<column> is_not_nan(
168  cudf::column_view const& input,
171  // end of group
173 } // namespace CUDF_EXPORT cudf
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.
Definition: types.hpp:238
Class definition for fixed point data type.
rmm::cuda_stream_view const get_default_stream()
Get the current default stream.
rmm::device_async_resource_ref get_current_device_resource_ref()
Get the current device memory resource reference.
detail::cccl_async_resource_ref< cuda::mr::resource_ref< cuda::mr::device_accessible > > device_async_resource_ref
unary_operator
Types of unary operations that can be performed on data.
Definition: unary.hpp:29
std::unique_ptr< cudf::column > is_valid(cudf::column_view const &input, rmm::cuda_stream_view 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...
std::unique_ptr< cudf::column > is_null(cudf::column_view const &input, rmm::cuda_stream_view 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...
bool is_supported_cast(data_type from, data_type to) noexcept
Check if a cast between two datatypes is supported.
std::unique_ptr< column > is_not_nan(cudf::column_view const &input, rmm::cuda_stream_view 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 indicating the absence of NaN values in a column of float...
std::unique_ptr< column > cast(column_view const &input, data_type out_type, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Casts data from dtype specified in input to dtype specified in output.
std::unique_ptr< cudf::column > unary_operation(cudf::column_view const &input, cudf::unary_operator op, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Performs unary op on all values in column.
std::unique_ptr< column > is_nan(cudf::column_view const &input, rmm::cuda_stream_view 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 indicating the presence of NaN values in a column of floa...
@ BIT_COUNT
Count the number of bits set to 1 of an integer value.
@ NEGATE
Unary negation (-), only for signed numeric and duration types.
cuDF interfaces
Definition: host_udf.hpp:26
Type declarations for libcudf.