Skip to content

Commit

Permalink
address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
karthikeyann committed May 18, 2022
1 parent 80cd246 commit 20a8995
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 30 deletions.
40 changes: 20 additions & 20 deletions cpp/include/cudf/scalar/scalar.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class scalar {
/**
* @brief Returns the scalar's logical value type.
*
* @return The scalar's logical value type.
* @return The scalar's logical value type
*/
[[nodiscard]] data_type type() const noexcept;

Expand All @@ -71,22 +71,22 @@ class scalar {
* function does a stream synchronization.
*
* @param stream CUDA stream used for device memory operations.
* @return true Value is valid.
* @return false Value is invalid/null.
* @return true Value is valid
* @return false Value is invalid/null
*/
[[nodiscard]] bool is_valid(rmm::cuda_stream_view stream = rmm::cuda_stream_default) const;

/**
* @brief Returns a raw pointer to the validity bool in device memory.
*
* @return Raw pointer to the validity bool in device memory.
* @return Raw pointer to the validity bool in device memory
*/
bool* validity_data();

/**
* @brief Return a const raw pointer to the validity bool in device memory.
*
* @return Raw pointer to the validity bool in device memory.
* @return Raw pointer to the validity bool in device memory
*/
[[nodiscard]] bool const* validity_data() const;

Expand Down Expand Up @@ -182,19 +182,19 @@ class fixed_width_scalar : public scalar {
* @brief Get the value of the scalar.
*
* @param stream CUDA stream used for device memory operations.
* @return Value of the scalar.
* @return Value of the scalar
*/
T value(rmm::cuda_stream_view stream = rmm::cuda_stream_default) const;

/**
* @brief Returns a raw pointer to the value in device memory.
* @return A raw pointer to the value in device memory.
* @return A raw pointer to the value in device memory
*/
T* data();

/**
* @brief Returns a const raw pointer to the value in device memory.
* @return A const raw pointer to the value in device memory.
* @return A const raw pointer to the value in device memory
*/
T const* data() const;

Expand Down Expand Up @@ -388,15 +388,15 @@ class fixed_point_scalar : public scalar {
* @brief Get the value of the scalar.
*
* @param stream CUDA stream used for device memory operations.
* @return The value of the scalar.
* @return The value of the scalar
*/
rep_type value(rmm::cuda_stream_view stream = rmm::cuda_stream_default) const;

/**
* @brief Get the decimal32, decimal64 or decimal128.
*
* @param stream CUDA stream used for device memory operations.
* @return The decimal32, decimal64 or decimal128 value.
* @return The decimal32, decimal64 or decimal128 value
*/
T fixed_point_value(rmm::cuda_stream_view stream = rmm::cuda_stream_default) const;

Expand All @@ -407,13 +407,13 @@ class fixed_point_scalar : public scalar {

/**
* @brief Returns a raw pointer to the value in device memory.
* @return A raw pointer to the value in device memory.
* @return A raw pointer to the value in device memory
*/
rep_type* data();

/**
* @brief Returns a const raw pointer to the value in device memory.
* @return a const raw pointer to the value in device memory.
* @return a const raw pointer to the value in device memory
*/
rep_type const* data() const;

Expand Down Expand Up @@ -520,7 +520,7 @@ class string_scalar : public scalar {
* @brief Get the value of the scalar in a host std::string.
*
* @param stream CUDA stream used for device memory operations.
* @return The value of the scalar in a host std::string.
* @return The value of the scalar in a host std::string
*/
[[nodiscard]] std::string to_string(
rmm::cuda_stream_view stream = rmm::cuda_stream_default) const;
Expand All @@ -529,19 +529,19 @@ class string_scalar : public scalar {
* @brief Get the value of the scalar as a string_view.
*
* @param stream CUDA stream used for device memory operations.
* @return The value of the scalar as a string_view.
* @return The value of the scalar as a string_view
*/
[[nodiscard]] value_type value(rmm::cuda_stream_view stream = rmm::cuda_stream_default) const;

/**
* @brief Returns the size of the string in bytes.
* @return The size of the string in bytes.
* @return The size of the string in bytes
*/
[[nodiscard]] size_type size() const;

/**
* @brief Returns a raw pointer to the string in device memory.
* @return a raw pointer to the string in device memory.
* @return a raw pointer to the string in device memory
*/
[[nodiscard]] const char* data() const;

Expand Down Expand Up @@ -660,7 +660,7 @@ class timestamp_scalar : public chrono_scalar<T> {

/**
* @brief Returns the duration in number of ticks since the UNIX epoch.
* @return The duration in number of ticks since the UNIX epoch.
* @return The duration in number of ticks since the UNIX epoch
*/
rep_type ticks_since_epoch();
};
Expand Down Expand Up @@ -712,7 +712,7 @@ class duration_scalar : public chrono_scalar<T> {

/**
* @brief Returns the duration in number of ticks.
* @return The duration in number of ticks.
* @return The duration in number of ticks
*/
rep_type count();
};
Expand Down Expand Up @@ -775,7 +775,7 @@ class list_scalar : public scalar {

/**
* @brief Returns a non-owning, immutable view to underlying device data.
* @return A non-owning, immutable view to underlying device data.
* @return A non-owning, immutable view to underlying device data
*/
[[nodiscard]] column_view view() const;

Expand Down Expand Up @@ -858,7 +858,7 @@ class struct_scalar : public scalar {

/**
* @brief Returns a non-owning, immutable view to underlying device data.
* @return A non-owning, immutable view to underlying device data.
* @return A non-owning, immutable view to underlying device data
*/
[[nodiscard]] table_view view() const;

Expand Down
14 changes: 7 additions & 7 deletions cpp/include/cudf/scalar/scalar_device_view.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class fixed_width_scalar_device_view_base : public detail::scalar_device_view_ba
* @brief Returns reference to stored value.
*
* @tparam T The desired type
* @returns Reference to stored value.
* @returns Reference to stored value
*/
template <typename T>
__device__ T& value() noexcept
Expand All @@ -94,7 +94,7 @@ class fixed_width_scalar_device_view_base : public detail::scalar_device_view_ba
* @brief Returns const reference to stored value.
*
* @tparam T The desired type
* @returns Const reference to stored value.
* @returns Const reference to stored value
*/
template <typename T>
__device__ T const& value() const noexcept
Expand Down Expand Up @@ -169,14 +169,14 @@ class fixed_width_scalar_device_view : public detail::fixed_width_scalar_device_
/**
* @brief Returns reference to stored value.
*
* @returns Reference to stored value.
* @returns Reference to stored value
*/
__device__ T& value() noexcept { return fixed_width_scalar_device_view_base::value<T>(); }

/**
* @brief Returns const reference to stored value.
*
* @returns Const reference to stored value.
* @returns Const reference to stored value
*/
__device__ T const& value() const noexcept
{
Expand Down Expand Up @@ -278,7 +278,7 @@ class fixed_point_scalar_device_view : public detail::scalar_device_view_base {
/**
* @brief Get the value of the scalar, as a `rep_type`.
*
* @returns The value of the scalar, as a `rep_type`.
* @returns The value of the scalar, as a `rep_type`
*/
__device__ rep_type const& rep() const noexcept { return *_data; }

Expand Down Expand Up @@ -311,7 +311,7 @@ class string_scalar_device_view : public detail::scalar_device_view_base {
/**
* @brief Returns string_view of the value of this scalar.
*
* @returns string_view of the value of this scalar.
* @returns string_view of the value of this scalar
*/
[[nodiscard]] __device__ ValueType value() const noexcept
{
Expand All @@ -331,7 +331,7 @@ class string_scalar_device_view : public detail::scalar_device_view_base {
/**
* @brief Returns the size of the string in bytes.
*
* @returns The size of the string in bytes.
* @returns The size of the string in bytes
*/
[[nodiscard]] __device__ size_type size() const noexcept { return _size; }

Expand Down
6 changes: 3 additions & 3 deletions cpp/include/cudf/scalar/scalar_factories.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ std::unique_ptr<scalar> make_numeric_scalar(
* @param type The desired timestamp element type
* @param stream CUDA stream used for device memory operations.
* @param mr Device memory resource used to allocate the scalar's `data` and `is_valid` bool.
* @return An uninitialized timestamp scalar.
* @return An uninitialized timestamp scalar
*/
std::unique_ptr<scalar> make_timestamp_scalar(
data_type type,
Expand All @@ -71,7 +71,7 @@ std::unique_ptr<scalar> make_timestamp_scalar(
* @param type The desired duration element type
* @param stream CUDA stream used for device memory operations.
* @param mr Device memory resource used to allocate the scalar's `data` and `is_valid` bool.
* @return An uninitialized duration scalar.
* @return An uninitialized duration scalar
*/
std::unique_ptr<scalar> make_duration_scalar(
data_type type,
Expand All @@ -88,7 +88,7 @@ std::unique_ptr<scalar> make_duration_scalar(
* @param type The desired fixed-width element type
* @param stream CUDA stream used for device memory operations.
* @param mr Device memory resource used to allocate the scalar's `data` and `is_valid` bool.
* @return An uninitialized fixed-width scalar.
* @return An uninitialized fixed-width scalar
*/
std::unique_ptr<scalar> make_fixed_width_scalar(
data_type type,
Expand Down

0 comments on commit 20a8995

Please sign in to comment.