libcudf
24.04.00
|
Files | |
file | round.hpp |
Column APIs for round. | |
file | unary.hpp |
Column APIs for unary ops. | |
Enumerations | |
enum class | cudf::rounding_method : int32_t { HALF_UP , HALF_EVEN } |
Different rounding methods for cudf::round More... | |
enum class | cudf::unary_operator : int32_t { cudf::SIN , cudf::COS , cudf::TAN , cudf::ARCSIN , cudf::ARCCOS , cudf::ARCTAN , cudf::SINH , cudf::COSH , cudf::TANH , cudf::ARCSINH , cudf::ARCCOSH , cudf::ARCTANH , cudf::EXP , cudf::LOG , cudf::SQRT , cudf::CBRT , cudf::CEIL , cudf::FLOOR , cudf::ABS , cudf::RINT , cudf::BIT_INVERT , cudf::NOT } |
Types of unary operations that can be performed on data. More... | |
Functions | |
std::unique_ptr< column > | cudf::round (column_view const &input, int32_t decimal_places=0, rounding_method method=rounding_method::HALF_UP, rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource()) |
Rounds all the values in a column to the specified number of decimal places. More... | |
std::unique_ptr< cudf::column > | cudf::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. More... | |
std::unique_ptr< cudf::column > | cudf::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 is null and false indicates the value is valid. More... | |
std::unique_ptr< cudf::column > | cudf::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 is valid and false indicates the value is null. More... | |
std::unique_ptr< column > | cudf::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. More... | |
std::unique_ptr< column > | cudf::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 floating point values. The output element at row i is true if the element in input at row i is NAN , else false More... | |
std::unique_ptr< column > | cudf::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 floating point values. The output element at row i is false if the element in input at row i is NAN , else true More... | |
|
strong |
Different rounding methods for cudf::round
Info on HALF_EVEN rounding: https://en.wikipedia.org/wiki/Rounding#Rounding_half_to_even Info on HALF_UP rounding: https://en.wikipedia.org/wiki/Rounding#Rounding_half_away_from_zero Note: HALF_UP means up in MAGNITUDE: Away from zero! Because of how Java and python define it
|
strong |
Types of unary operations that can be performed on data.
std::unique_ptr<column> cudf::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.
Supports only fixed-width types.
input | Input column |
out_type | Desired datatype of output column |
stream | CUDA stream used for device memory operations and kernel launches |
mr | Device memory resource used to allocate the returned column's device memory |
input
containing result of the cast operation cudf::logic_error | if out_type is not a fixed-width type |
std::unique_ptr<column> cudf::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 floating point values. The output element at row i
is true
if the element in input
at row i is NAN
, else false
cudf::logic_error | if input is a non-floating point type |
input | A column of floating-point elements |
stream | CUDA stream used for device memory operations and kernel launches |
mr | Device memory resource used to allocate the returned column's device memory |
type_id::BOOL8
elements with true
representing NAN
values std::unique_ptr<column> cudf::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 floating point values. The output element at row i
is false
if the element in input
at row i is NAN
, else true
cudf::logic_error | if input is a non-floating point type |
input | A column of floating-point elements |
stream | CUDA stream used for device memory operations and kernel launches |
mr | Device memory resource used to allocate the returned column's device memory |
type_id::BOOL8
elements with false
representing NAN
values std::unique_ptr<cudf::column> cudf::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 is null and false
indicates the value is valid.
input | A column_view as input |
stream | CUDA stream used for device memory operations and kernel launches |
mr | Device memory resource used to allocate the returned column's device memory |
type_id::BOOL8
elements with true
representing null
values. std::unique_ptr<cudf::column> cudf::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 is valid and false
indicates the value is null.
input | A column_view as input |
stream | CUDA stream used for device memory operations and kernel launches |
mr | Device memory resource used to allocate the returned column's device memory |
type_id::BOOL8
elements with false
representing null
values. std::unique_ptr<column> cudf::round | ( | column_view const & | input, |
int32_t | decimal_places = 0 , |
||
rounding_method | method = rounding_method::HALF_UP , |
||
rmm::mr::device_memory_resource * | mr = rmm::mr::get_current_device_resource() |
||
) |
Rounds all the values in a column to the specified number of decimal places.
cudf::round
currently supports HALF_UP and HALF_EVEN rounding for integer, floating point and decimal32
and decimal64
numbers. For decimal32
and decimal64
numbers, negated numeric::scale
is equivalent to decimal_places
.
Example:
input | Column of values to be rounded |
decimal_places | Number of decimal places to round to (default 0). If negative, this specifies the number of positions to the left of the decimal point. |
method | Rounding method |
mr | Device memory resource used to allocate the returned column's device memory |
std::unique_ptr<cudf::column> cudf::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.
Note: For decimal32
and decimal64
, only ABS
, CEIL
and FLOOR
are supported.
input | A column_view as input |
op | operation to perform |
stream | CUDA stream used for device memory operations and kernel launches |
mr | Device memory resource used to allocate the returned column's device memory |
input
containing result of the operation