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
per_device_resource.hpp
cudf::unary_operation
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.
cudf::column_view
A non-owning, immutable view of device data as a column of elements, some of which may be null as ind...
Definition: column_view.hpp:313
types.hpp
Type declarations for libcudf.
cudf::unary_operator
unary_operator
Types of unary operations that can be performed on data.
Definition: unary.hpp:36
cudf::is_nan
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...
cudf::is_null
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...
cudf::unary_operator::SIN
@ SIN
Trigonometric sine.
cudf::data_type
Indicator for the logical data type of an element in a column.
Definition: types.hpp:228
cudf
cuDF interfaces
Definition: aggregation.hpp:34
cudf::is_valid
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...
rmm::mr::device_memory_resource
cudf::is_not_nan
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...
cudf::cast
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.