Skip to content

Commit

Permalink
Still fix docs
Browse files Browse the repository at this point in the history
Signed-off-by: Nghia Truong <[email protected]>
  • Loading branch information
ttnghia committed Nov 26, 2024
1 parent b10e924 commit 9dd26d3
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion cpp/include/cudf/aggregation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,8 @@ struct host_udf_base {
segmented_reduction_data_attribute,
groupby_data_attribute,
std::unique_ptr<aggregation>>;
value_type value;
value_type value; ///< The actual data attribute, wrapped in this struct
///< as a wrapper is needed to define hash and equal_to functors.

data_attribute() = default; ///< Default constructor
data_attribute(data_attribute&&) = default; ///< Move constructor
Expand Down Expand Up @@ -742,6 +743,11 @@ struct host_udf_base {
* @brief Hash functor for `data_attribute`.
*/
struct hash {
/**
* @brief Compute the hash value of a data attribute.
* @param attr The data attribute to hash
* @return The hash value of the data attribute
*/
std::size_t operator()(data_attribute const& attr) const
{
auto const& value = attr.value;
Expand All @@ -766,6 +772,12 @@ struct host_udf_base {
* @brief Equality comparison functor for `data_attribute`.
*/
struct equal_to {
/**
* @brief Check if two data attributes are equal.
* @param lhs The left-hand side data attribute
* @param rhs The right-hand side data attribute
* @return True if the two data attributes are equal
*/
bool operator()(data_attribute const& lhs, data_attribute const& rhs) const
{
auto const& lhs_val = lhs.value;
Expand Down

0 comments on commit 9dd26d3

Please sign in to comment.