Skip to content

feat: add T value() and set_value(T) fixed_point_scalar_device_view - #23436

Open
jayshrivastava wants to merge 3 commits into
rapidsai:mainfrom
jayshrivastava:jayshrivastava/fixed-point-scalars-methods
Open

feat: add T value() and set_value(T) fixed_point_scalar_device_view#23436
jayshrivastava wants to merge 3 commits into
rapidsai:mainfrom
jayshrivastava:jayshrivastava/fixed-point-scalars-methods

Conversation

@jayshrivastava

@jayshrivastava jayshrivastava commented Jul 26, 2026

Copy link
Copy Markdown

Description

This change adds genericT value() and set_value(T) methods to fixed_point_scalar_device_view bringing it up to parity with fixed_width_scalar_device_view.

Closes #8455

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@copy-pr-bot

copy-pr-bot Bot commented Jul 26, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions github-actions Bot added the libcudf Affects libcudf (C++/CUDA) code. label Jul 26, 2026
@jayshrivastava
jayshrivastava marked this pull request as ready for review July 26, 2026 22:12
@jayshrivastava
jayshrivastava requested a review from a team as a code owner July 26, 2026 22:12
@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 0796826f-d3b7-4d0a-bc19-9a11030a204d

📥 Commits

Reviewing files that changed from the base of the PR and between 3a3a522 and 95e13be.

📒 Files selected for processing (2)
  • cpp/include/cudf/scalar/scalar_device_view.cuh
  • cpp/tests/scalar/scalar_device_view_test.cu

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Added scale-aware fixed-point value access and assignment for device-side scalar views.
    • Fixed-point values can now be read as their numeric type and written with automatic rescaling.
  • Tests

    • Added coverage for fixed-point values, scales, direct representation updates, and cross-scale conversions.

Walkthrough

The fixed-point scalar device view now provides scale-aware value retrieval and assignment while retaining direct representation storage. Typed CUDA tests cover value access, scale reporting, direct representation updates, and rescaling across target scales.

Changes

Fixed-point device view

Layer / File(s) Summary
Scale-aware device API
cpp/include/cudf/scalar/scalar_device_view.cuh
Adds fixed-point support documentation and dependency declarations, plus device-side value() and scale-aware set_value(T) operations.
Fixed-point device validation
cpp/tests/scalar/scalar_device_view_test.cu
Adds typed CUDA tests for fixed-point value access, direct representation assignment, and rescaled assignments across differing scales.

Estimated code review effort: 3 (Moderate) | ~20 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is specific and matches the main change: adding generic fixed-point value accessors to fixed_point_scalar_device_view.
Description check ✅ Passed The description accurately describes the new methods, tests, and parity goal for fixed_point_scalar_device_view.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

libcudf Affects libcudf (C++/CUDA) code.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEA] add value methods to fixed_point_scalar_device_view

1 participant