Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assert that XTensor objects are row-major. #989

Merged
merged 1 commit into from May 6, 2024
Merged

Conversation

1uc
Copy link
Collaborator

@1uc 1uc commented Apr 19, 2024

Easy serializes XTensor objects by obtaining a pointer to the first element, and then using write_raw. Same for reading using read_raw.

Therefore, it only supports (a subset of) row-major arrays. This commit as a runtime check.

Easy serializes XTensor objects by obtaining a pointer to the first
element, and then using `write_raw`. Same for reading using `read_raw`.

Therefore, it only supports (a subset of) row-major arrays. This commit
as a runtime check.
@1uc 1uc force-pushed the 1uc/easy_assert_row_major branch from 8d1a95e to 0c2fe58 Compare April 19, 2024 15:03
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.38%. Comparing base (c1b3cde) to head (0c2fe58).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #989   +/-   ##
=======================================
  Coverage   86.38%   86.38%           
=======================================
  Files          92       92           
  Lines        5898     5898           
=======================================
  Hits         5095     5095           
  Misses        803      803           

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

@1uc 1uc marked this pull request as ready for review April 19, 2024 15:26
@1uc 1uc requested review from matz-e and alkino May 6, 2024 07:06
@1uc 1uc merged commit cabc50f into master May 6, 2024
34 checks passed
@1uc 1uc deleted the 1uc/easy_assert_row_major branch May 6, 2024 12:10
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.

None yet

3 participants