Skip to content

Expand View getSubView host coverage#9

Closed
psychocoderHPC wants to merge 1 commit intodevfrom
pr-expand-view-getsubview-host-coverage
Closed

Expand View getSubView host coverage#9
psychocoderHPC wants to merge 1 commit intodevfrom
pr-expand-view-getsubview-host-coverage

Conversation

@psychocoderHPC
Copy link
Copy Markdown
Owner

@psychocoderHPC psychocoderHPC commented Apr 8, 2026

Split from local commit 5de5bfd.

Base branch: dev.

Summary by CodeRabbit

Release Notes

  • Bug Fixes

    • MdForwardIter now correctly initializes to end state when any dimension extent is zero, ensuring proper iterator comparison for empty spans.
  • New Features

    • Added const overloads for begin()/end() methods in MdSpan and MdSpanArray for improved const-correctness in iteration.
  • Tests

    • Expanded iterator and subview test coverage with comprehensive edge-case validation including empty extents, iteration order, and memory layout preservation.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 8, 2026

Warning

Rate limit exceeded

@psychocoderHPC has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 11 minutes and 43 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 11 minutes and 43 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 4408c360-d557-439f-bd5e-89400dcb75f5

📥 Commits

Reviewing files that changed from the base of the PR and between 5de5bfd and e8639ff.

📒 Files selected for processing (2)
  • include/alpaka/mem/MdForwardIter.hpp
  • test/unit/mem/subDataStorage.cpp
📝 Walkthrough

Walkthrough

The changes fix iterator behavior for multi-dimensional spans with empty dimensions and enhance const-correctness. MdForwardIter now initializes to end state when any extent is zero. MdSpan and MdSpanArray add explicit const overloads for begin/end methods to ensure const-propagated iteration. Comprehensive tests validate iterator semantics, range iteration edge cases, and subview functionality.

Changes

Cohort / File(s) Summary
Multi-dimensional iterator and span refinements
include/alpaka/mem/MdForwardIter.hpp, include/alpaka/mem/MdSpan.hpp, include/alpaka/mem/MdSpanArray.hpp
Modified MdForwardIter constructor to initialize to end state when any dimension extent is zero. Added explicit const overloads for begin()/end() methods in MdSpan and MdSpanArray to ensure const-propagated span iteration.
Iterator and range behavior tests
test/unit/mem/idxRange.cpp, test/unit/mem/mdIterator.cpp, test/unit/mem/subDataStorage.cpp
Added comprehensive host-side tests for IdxRange edge cases, MdSpan/View iterator behavior (including zero-extent, const-correctness, and forward-iterator semantics), and subview offset aliasing with memory layout contract validation.
Regression test update
test/unit/mem/concepts.cpp
Updated pitch calculation test to use NonCopyStruct element type, aligning type derivation with non-copyable element scenarios.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 When spans lie empty, iterators once would stray,
But now they find the end without delay—
With const-correctness blooming everywhere,
These bouncing changes show the utmost care! ✨🎉

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'Expand View getSubView host coverage' directly aligns with the main changes, which add comprehensive unit-test coverage for alpaka::View::getSubView across 1D and 3D cases with host-side testing.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch pr-expand-view-getsubview-host-coverage

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

@psychocoderHPC psychocoderHPC changed the base branch from dev to pr-expand-mdforwarditer-host-coverage April 8, 2026 15:59
@psychocoderHPC
Copy link
Copy Markdown
Owner Author

@coderabbitai review

@psychocoderHPC psychocoderHPC force-pushed the pr-expand-view-getsubview-host-coverage branch from 7b1dd1f to 8fa9d88 Compare April 8, 2026 18:06
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 8, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@psychocoderHPC psychocoderHPC force-pushed the pr-expand-mdforwarditer-host-coverage branch from 1588388 to 8995315 Compare April 8, 2026 18:24
@psychocoderHPC psychocoderHPC force-pushed the pr-expand-view-getsubview-host-coverage branch from 8fa9d88 to e8639ff Compare April 8, 2026 18:25
@psychocoderHPC psychocoderHPC changed the base branch from pr-expand-mdforwarditer-host-coverage to dev April 8, 2026 18:25
@psychocoderHPC
Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 8, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant