Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix doxygen warnings in ast/, rolling, tdigest/, wrappers/, dictionary/ headers #10921

Merged
merged 5 commits into from
Jun 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 47 additions & 25 deletions cpp/include/cudf/ast/expressions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,34 @@ class expression_parser;
* Expressions inheriting from this class can accept parsers as visitors.
*/
struct expression {
/**
* @brief Accepts a visitor class.
*
* @param visitor The `expression_parser` parsing this expression tree
* @return Index of device data reference for this instance
*/
virtual cudf::size_type accept(detail::expression_parser& visitor) const = 0;

/**
* @brief Returns true if the expression may evaluate to null.
*
* @param left The left operand of the expression (The same is used as right operand)
* @param stream CUDA stream used for device memory operations and kernel launches
* @return `true` if the expression may evaluate to null, otherwise false
*/
[[nodiscard]] bool may_evaluate_null(table_view const& left, rmm::cuda_stream_view stream) const
{
return may_evaluate_null(left, left, stream);
}

/**
* @brief Returns true if the expression may evaluate to null.
*
* @param left The left operand of the expression
* @param right The right operand of the expression
* @param stream CUDA stream used for device memory operations and kernel launches
* @return `true` if the expression may evaluate to null, otherwise false
*/
[[nodiscard]] virtual bool may_evaluate_null(table_view const& left,
table_view const& right,
rmm::cuda_stream_view stream) const = 0;
Expand Down Expand Up @@ -137,8 +158,8 @@ class literal : public expression {
/**
* @brief Construct a new literal object.
*
* @tparam T Numeric scalar template type.
* @param value A numeric scalar value.
* @tparam T Numeric scalar template type
* @param value A numeric scalar value
*/
template <typename T>
literal(cudf::numeric_scalar<T>& value)
Expand All @@ -149,8 +170,8 @@ class literal : public expression {
/**
* @brief Construct a new literal object.
*
* @tparam T Timestamp scalar template type.
* @param value A timestamp scalar value.
* @tparam T Timestamp scalar template type
* @param value A timestamp scalar value
*/
template <typename T>
literal(cudf::timestamp_scalar<T>& value)
Expand All @@ -161,8 +182,8 @@ class literal : public expression {
/**
* @brief Construct a new literal object.
*
* @tparam T Duration scalar template type.
* @param value A duration scalar value.
* @tparam T Duration scalar template type
* @param value A duration scalar value
*/
template <typename T>
literal(cudf::duration_scalar<T>& value)
Expand All @@ -173,14 +194,14 @@ class literal : public expression {
/**
* @brief Get the data type.
*
* @return cudf::data_type
* @return The data type of the literal
*/
[[nodiscard]] cudf::data_type get_data_type() const { return get_value().type(); }

/**
* @brief Get the value object.
*
* @return cudf::detail::fixed_width_scalar_device_view_base
* @return The device scalar object
*/
[[nodiscard]] cudf::detail::fixed_width_scalar_device_view_base get_value() const
{
Expand All @@ -190,8 +211,8 @@ class literal : public expression {
/**
* @brief Accepts a visitor class.
*
* @param visitor Visitor.
* @return cudf::size_type Index of device data reference for this instance.
* @param visitor The `expression_parser` parsing this expression tree
* @return Index of device data reference for this instance
*/
cudf::size_type accept(detail::expression_parser& visitor) const override;

Expand All @@ -205,7 +226,8 @@ class literal : public expression {
/**
* @brief Check if the underlying scalar is valid.
*
* @return bool
* @param stream CUDA stream used for device memory operations and kernel launches
* @return true if the underlying scalar is valid
*/
[[nodiscard]] bool is_valid(rmm::cuda_stream_view stream) const
{
Expand All @@ -227,7 +249,7 @@ class column_reference : public expression {
*
* @param column_index Index of this column in the table (provided when the expression is
* evaluated).
* @param table_source Which table to use in cases with two tables (e.g. joins).
* @param table_source Which table to use in cases with two tables (e.g. joins)
*/
column_reference(cudf::size_type column_index,
table_reference table_source = table_reference::LEFT)
Expand All @@ -238,22 +260,22 @@ class column_reference : public expression {
/**
* @brief Get the column index.
*
* @return cudf::size_type
* @return The column index of the column reference
*/
[[nodiscard]] cudf::size_type get_column_index() const { return column_index; }

/**
* @brief Get the table source.
*
* @return table_reference
* @return table_reference The reference to the table containing this column
*/
[[nodiscard]] table_reference get_table_source() const { return table_source; }

/**
* @brief Get the data type.
*
* @param table Table used to determine types.
* @return cudf::data_type
* @param table Table used to determine types
* @return The data type of the column
*/
[[nodiscard]] cudf::data_type get_data_type(table_view const& table) const
{
Expand All @@ -263,9 +285,9 @@ class column_reference : public expression {
/**
* @brief Get the data type.
*
* @param left_table Left table used to determine types.
* @param right_table Right table used to determine types.
* @return cudf::data_type
* @param left_table Left table used to determine types
* @param right_table Right table used to determine types
* @return The data type of the column
*/
[[nodiscard]] cudf::data_type get_data_type(table_view const& left_table,
table_view const& right_table) const
Expand All @@ -285,8 +307,8 @@ class column_reference : public expression {
/**
* @brief Accepts a visitor class.
*
* @param visitor Visitor.
* @return cudf::size_type Index of device data reference for this instance.
* @param visitor The `expression_parser` parsing this expression tree
* @return Index of device data reference for this instance
*/
cudf::size_type accept(detail::expression_parser& visitor) const override;

Expand Down Expand Up @@ -334,22 +356,22 @@ class operation : public expression {
/**
* @brief Get the operator.
*
* @return ast_operator
* @return The operator
*/
[[nodiscard]] ast_operator get_operator() const { return op; }

/**
* @brief Get the operands.
*
* @return std::vector<std::reference_wrapper<const expression>>
* @return Vector of operands
*/
std::vector<std::reference_wrapper<expression const>> get_operands() const { return operands; }

/**
* @brief Accepts a visitor class.
*
* @param visitor Visitor.
* @return cudf::size_type Index of device data reference for this instance.
* @param visitor The `expression_parser` parsing this expression tree
* @return Index of device data reference for this instance
*/
cudf::size_type accept(detail::expression_parser& visitor) const override;

Expand Down
41 changes: 36 additions & 5 deletions cpp/include/cudf/dictionary/dictionary_column_view.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020, NVIDIA CORPORATION.
* Copyright (c) 2020-2022, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -39,14 +39,33 @@ namespace cudf {
*/
class dictionary_column_view : private column_view {
public:
/**
* @brief Construct a new dictionary column view object from a column view.
*
* @param dictionary_column The column view to wrap
*/
dictionary_column_view(column_view const& dictionary_column);
dictionary_column_view(dictionary_column_view&& dictionary_view) = default;
dictionary_column_view(const dictionary_column_view& dictionary_view) = default;
~dictionary_column_view() = default;
dictionary_column_view(dictionary_column_view&&) = default; ///< Move constructor
dictionary_column_view(dictionary_column_view const&) = default; ///< Copy constructor
~dictionary_column_view() = default;

/**
* @brief Move assignment operator
*
* @return The reference to this dictionary column
*/
dictionary_column_view& operator=(dictionary_column_view const&) = default;

/**
* @brief Copy assignment operator
*
* @return The reference to this dictionary column
*/
dictionary_column_view& operator=(dictionary_column_view&&) = default;

/// Index of the indices column of the dictionary column
static constexpr size_type indices_column_index{0};
/// Index of the keys column of the dictionary column
static constexpr size_type keys_column_index{1};

using column_view::has_nulls;
Expand All @@ -58,32 +77,44 @@ class dictionary_column_view : private column_view {

/**
* @brief Returns the parent column.
*
* @return The parent column
*/
[[nodiscard]] column_view parent() const noexcept;

/**
* @brief Returns the column of indices
*
* @return The indices column
*/
[[nodiscard]] column_view indices() const noexcept;

/**
* @brief Returns a column_view combining the indices data
* with offset, size, and nulls from the parent.
*
* @return A sliced indices column view with nulls from the parent
*/
[[nodiscard]] column_view get_indices_annotated() const noexcept;

/**
* @brief Returns the column of keys
*
* @return The keys column
*/
[[nodiscard]] column_view keys() const noexcept;

/**
* @brief Returns the `data_type` of the keys child column.
* @brief Returns the cudf::data_type of the keys child column.
*
* @return The cudf::data_type of the keys child column
*/
[[nodiscard]] data_type keys_type() const noexcept;

/**
* @brief Returns the number of rows in the keys column.
*
* @return The number of rows in the keys column
*/
[[nodiscard]] size_type keys_size() const noexcept;
};
Expand Down
10 changes: 6 additions & 4 deletions cpp/include/cudf/rolling/range_window_bounds.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, NVIDIA CORPORATION.
* Copyright (c) 2021-2022, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -39,14 +39,15 @@ struct range_window_bounds {
* @brief Factory method to construct a bounded window boundary.
*
* @param boundary Finite window boundary
*
* @return A bounded window boundary object
*/
static range_window_bounds get(scalar const& boundary);

/**
* @brief Factory method to construct an unbounded window boundary.
*
* @param type type The datatype of the window boundary
* @return An unbounded window boundary object
*/
static range_window_bounds unbounded(data_type type);

Expand All @@ -60,11 +61,12 @@ struct range_window_bounds {

/**
* @brief Returns the underlying scalar value for the bounds
*
* @return The underlying scalar value for the bounds
*/
[[nodiscard]] scalar const& range_scalar() const { return *_range_scalar; }

range_window_bounds(range_window_bounds const&) =
default; // Required to return (by copy) from functions.
range_window_bounds(range_window_bounds const&) = default; ///< Copy constructor
range_window_bounds() = default; // Required for use as return types from dispatch functors.

private:
Expand Down
Loading