unary.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018-2021, 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 #include <memory>
21 
22 namespace cudf {
30 enum class unary_operator : int32_t {
31  SIN,
32  COS,
33  TAN,
34  ARCSIN,
35  ARCCOS,
36  ARCTAN,
37  SINH,
38  COSH,
39  TANH,
40  ARCSINH,
41  ARCCOSH,
42  ARCTANH,
43  EXP,
44  LOG,
45  SQRT,
46  CBRT,
47  CEIL,
48  FLOOR,
49  ABS,
50  RINT,
51  BIT_INVERT,
52  NOT,
53 };
54 
66 std::unique_ptr<cudf::column> unary_operation(
67  cudf::column_view const& input,
69  rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
70 
81 std::unique_ptr<cudf::column> is_null(
82  cudf::column_view const& input,
83  rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
84 
95 std::unique_ptr<cudf::column> is_valid(
96  cudf::column_view const& input,
97  rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
98 
111 std::unique_ptr<column> cast(
112  column_view const& input,
113  data_type out_type,
114  rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
115 
128 std::unique_ptr<column> is_nan(
129  cudf::column_view const& input,
130  rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
131 
145 std::unique_ptr<column> is_not_nan(
146  cudf::column_view const& input,
147  rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
148  // end of group
150 } // namespace cudf
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:300
types.hpp
Type declarations for libcudf.
cudf::unary_operator
unary_operator
Definition: unary.hpp:30
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:240
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.