unary.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018-2022, 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>
20 
22 
23 #include <memory>
24 
25 namespace cudf {
36 enum class unary_operator : int32_t {
37  SIN,
38  COS,
39  TAN,
40  ARCSIN,
41  ARCCOS,
42  ARCTAN,
43  SINH,
44  COSH,
45  TANH,
46  ARCSINH,
47  ARCCOSH,
48  ARCTANH,
49  EXP,
50  LOG,
51  SQRT,
52  CBRT,
53  CEIL,
54  FLOOR,
55  ABS,
56  RINT,
57  BIT_INVERT,
58  NOT,
59 };
60 
72 std::unique_ptr<cudf::column> unary_operation(
73  cudf::column_view const& input,
75  rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
76 
87 std::unique_ptr<cudf::column> is_null(
88  cudf::column_view const& input,
89  rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
90 
101 std::unique_ptr<cudf::column> is_valid(
102  cudf::column_view const& input,
103  rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
104 
117 std::unique_ptr<column> cast(
118  column_view const& input,
119  data_type out_type,
120  rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
121 
134 std::unique_ptr<column> is_nan(
135  cudf::column_view const& input,
136  rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
137 
151 std::unique_ptr<column> is_not_nan(
152  cudf::column_view const& input,
153  rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
154  // end of group
156 } // 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:227
unary_operator
Types of unary operations that can be performed on data.
Definition: unary.hpp:36
std::unique_ptr< column > is_not_nan(cudf::column_view const &input, 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< cudf::column > is_null(cudf::column_view const &input, 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< column > is_nan(cudf::column_view const &input, 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< cudf::column > unary_operation(cudf::column_view const &input, cudf::unary_operator op, rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
Performs unary op on all values in column.
std::unique_ptr< cudf::column > is_valid(cudf::column_view const &input, 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< column > cast(column_view const &input, data_type out_type, 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.