libcudf  24.02.00
unary.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018-2023, NVIDIA CORPORATION.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #pragma once
18 
19 #include <cudf/types.hpp>
21 
23 
24 #include <memory>
25 
26 namespace cudf {
37 enum class unary_operator : int32_t {
38  SIN,
39  COS,
40  TAN,
41  ARCSIN,
42  ARCCOS,
43  ARCTAN,
44  SINH,
45  COSH,
46  TANH,
47  ARCSINH,
48  ARCCOSH,
49  ARCTANH,
50  EXP,
51  LOG,
52  SQRT,
53  CBRT,
54  CEIL,
55  FLOOR,
56  ABS,
57  RINT,
58  BIT_INVERT,
59  NOT,
60 };
61 
74 std::unique_ptr<cudf::column> unary_operation(
75  cudf::column_view const& input,
79 
91 std::unique_ptr<cudf::column> is_null(
92  cudf::column_view const& input,
95 
107 std::unique_ptr<cudf::column> is_valid(
108  cudf::column_view const& input,
111 
125 std::unique_ptr<column> cast(
126  column_view const& input,
127  data_type out_type,
130 
144 std::unique_ptr<column> is_nan(
145  cudf::column_view const& input,
148 
163 std::unique_ptr<column> is_not_nan(
164  cudf::column_view const& input,
167  // end of group
169 } // namespace 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:241
rmm::cuda_stream_view const get_default_stream()
Get the current default stream.
device_memory_resource * get_current_device_resource()
unary_operator
Types of unary operations that can be performed on data.
Definition: unary.hpp:37
std::unique_ptr< cudf::column > is_null(cudf::column_view const &input, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
Creates a column of type_id::BOOL8 elements where for every element in input true indicates the value...
std::unique_ptr< cudf::column > is_valid(cudf::column_view const &input, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
Creates a column of type_id::BOOL8 elements where for every element in input true indicates the value...
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::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
Performs unary op on all values in column.
std::unique_ptr< column > is_not_nan(cudf::column_view const &input, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
Creates a column of type_id::BOOL8 elements indicating the absence of NaN values in a column of float...
std::unique_ptr< column > is_nan(cudf::column_view const &input, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
Creates a column of type_id::BOOL8 elements indicating the presence of NaN values in a column of floa...
std::unique_ptr< column > cast(column_view const &input, data_type out_type, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
Casts data from dtype specified in input to dtype specified in output.
@ NOT
Logical Not (!)
@ TANH
Hyperbolic tangent.
@ CBRT
Cube-root (x^(1.0/3))
@ ARCSINH
Hyperbolic sine inverse.
@ SQRT
Square-root (x^0.5)
@ LOG
Natural Logarithm (base e)
@ FLOOR
largest integer value not greater than arg
@ ARCTAN
Trigonometric tangent inverse.
@ SIN
Trigonometric sine.
@ CEIL
Smallest integer value not less than arg.
@ ARCSIN
Trigonometric sine inverse.
@ RINT
Rounds the floating-point argument arg to an integer value.
@ BIT_INVERT
Bitwise Not (~)
@ TAN
Trigonometric tangent.
@ ARCCOS
Trigonometric cosine inverse.
@ ABS
Absolute value.
@ ARCTANH
Hyperbolic tangent inverse.
@ EXP
Exponential (base e, Euler number)
@ SINH
Hyperbolic sine.
@ COSH
Hyperbolic cosine.
@ ARCCOSH
Hyperbolic cosine inverse.
@ COS
Trigonometric cosine.
cuDF interfaces
Definition: aggregation.hpp:34
Type declarations for libcudf.