Skip to content

added bounds checking to CArray#40

Merged
rrsettgast merged 28 commits into
mainfrom
feature/boundsChecking
Apr 9, 2025
Merged

added bounds checking to CArray#40
rrsettgast merged 28 commits into
mainfrom
feature/boundsChecking

Conversation

@rrsettgast
Copy link
Copy Markdown
Member

This PR adds bounds checking to the CArray object.

@rrsettgast rrsettgast self-assigned this Apr 8, 2025
@rrsettgast rrsettgast requested review from Copilot and wrtobin April 8, 2025 11:08
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 12 out of 16 changed files in this pull request and generated no comments.

Files not reviewed (4)
  • cmake/CMakeBasics.cmake: Language not supported
  • cmake/Config.cmake: Language not supported
  • hostconfigs/apple/macOS_base.cmake: Language not supported
  • src/ShivaConfig.hpp.in: Language not supported

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (aa50bca) to head (9e1e49c).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##              main       #40    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files           34        36     +2     
  Lines         1089      1197   +108     
==========================================
+ Hits          1089      1197   +108     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rrsettgast rrsettgast requested a review from Copilot April 9, 2025 10:01
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 16 out of 21 changed files in this pull request and generated 2 comments.

Files not reviewed (5)
  • cmake/CMakeBasics.cmake: Language not supported
  • cmake/Config.cmake: Language not supported
  • cmake/Macros.cmake: Language not supported
  • hostconfigs/apple/macOS_base.cmake: Language not supported
  • src/ShivaConfig.hpp.in: Language not supported
Comments suppressed due to low confidence (4)

src/common/CArray.hpp:188

  • [nitpick] The static_assert message could be clarified to indicate that operator[] performs slicing for multi-dimensional arrays, while for one-dimensional arrays it simply delegates to operator().
static_assert( sizeof...(DIMS) >= 1, "operator[] is only valid for sizeof...(DIMS) > 1" );

src/geometry/mapping/LinearTransform.hpp:171

  • [nitpick] Verify that the removal of the 'template' keyword from the supportLoop call is intentional and that it correctly compiles in all dependent contexts.
InterpolatedShape::supportLoop( [&] ( auto const ... ic_spIndices ) constexpr

src/discretizations/unitTests/testParentElement.cpp:120

  • [nitpick] Verify that the removal of the 'template' keyword from ParentElementType::value is intentional and does not cause compile issues in all required instantiations.
constexpr double value = ParentElementType::value( coord, TEST_PARENT_ELEMENT_HELPER::fieldValues );

src/common/CArrayHelper.hpp:129

  • [nitpick] Review the usage of std::forward with 'INDICES_TYPE const'; ensure that this forwarding is intended and correctly propagates constness in the recursive call.
return index * thisStride + linearIndexHelper< DIMS ... >::template level< INDICES_TYPE ... >( std::forward< INDICES_TYPE const >( indices )... );

Comment thread src/common/pmpl.hpp Outdated
Comment thread src/common/CArray.hpp Outdated
rrsettgast and others added 2 commits April 9, 2025 03:06
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Comment thread src/common/CArray.hpp Outdated
Comment thread src/common/CArray.hpp Outdated
Copy link
Copy Markdown
Collaborator

@wrtobin wrtobin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

couple minor things, looks good otherwise

Comment thread src/common/CArray.hpp
Comment thread src/common/unitTests/testCArray.cpp
@rrsettgast rrsettgast merged commit d71253d into main Apr 9, 2025
21 checks passed
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.

3 participants