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

Refactor util::pack_vector_fields to use array::ArrayViewVariant #226

Merged

Conversation

odlomax
Copy link
Contributor

@odlomax odlomax commented Sep 25, 2024

This PR refactors util::pack_vector_fields to use std::variant<ArrayViews...> with std::visit, as opposed to nested switch statements to resolve the possible Value types and Rank values for different arrays.

I also found it beneficial to refactor array::make_view_variant such that it produces either a variant of const or a variant of non- const ArrayView types.

This PR needs #220 and #224 to be merged first.

@wdeconinck
Copy link
Member

@odlomax Ready for rebase / conflict resolution

@odlomax odlomax closed this Oct 14, 2024
@odlomax odlomax force-pushed the feature/refactor_pack_vector_fields branch from ea26e71 to 96edef9 Compare October 14, 2024 08:15
@odlomax odlomax reopened this Oct 14, 2024
@odlomax
Copy link
Contributor Author

odlomax commented Oct 14, 2024

There we go. A bit of brute force was required to fix the branch!

@odlomax
Copy link
Contributor Author

odlomax commented Oct 14, 2024

Blimey, I didn't see that one coming...
https://github.com/ecmwf/atlas/actions/runs/11323604861/job/31488503545#step:14:3695

@wdeconinck
Copy link
Member

Blimey, I didn't see that one coming... https://github.com/ecmwf/atlas/actions/runs/11323604861/job/31488503545#step:14:3695

rerunning to see if it is a fluke

Copy link
Member

@wdeconinck wdeconinck left a comment

Choose a reason for hiding this comment

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

All relevant tests have passed

@wdeconinck wdeconinck merged commit 591a762 into ecmwf:develop Oct 14, 2024
178 of 179 checks passed
wdeconinck added a commit that referenced this pull request Nov 18, 2024
* release/0.40.0: (40 commits)
  Update changelog
  Version 0.40.0
  Add hicLaunchHostFunc for async host functions
  Add test for various use cases of StructuredInterpolation2D with limiter
  Implement StructureInterpolation2D for 3-dimensional fields with extra variables)
  Fix application of limiter for StructuredInterpolation2D
  Protect atlas_test_array_view_variant to eckit v 1.27.0
  Move example-fortran inside atlas_HAVE_DOCS (#235)
  Fix possible device-memory leak in WrappedDataStore (fixes #234)
  add device data on FieldSet
  Add test for fieldset device operators
  Add fieldset device operators
  Update fctest_field_gpu to test acc deviceptr
  Update test_field_acc to test acc deviceptr
  Add device_data Fortran access to Field
  Refactored spherical vector interpolation method. (#227)
  Refactored (un)pack_vector_fields. (#226)
  Integrate `pack_vector_fields` into `SphericalVector` Interpolation method. (#224)
  Fixed ordering of fixup_halos and halo_exhange in StructuredColumns.cc (#223)
  Tidied headers and error message. (#231)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants