Skip to content

[Refactor] Migrate to C++20 #54

@csparker247

Description

@csparker247

Description

To support the MathBackend abstraction layer and improve memory efficiency for heritage science imaging (e.g., volumetric data), we are upgrading the project requirement to C++20. This version provides the necessary architectural tools (Concepts, Spans) while maintaining broad compatibility with Apple Clang and older HPC environments.

Tasks

  • Update CMakeLists.txt to target_compile_features(OpenABF INTERFACE cxx_std_20).
  • Refactor ABF.hpp and HalfEdgeMesh.hpp to use std::span<T> for data views, eliminating unnecessary std::vector copies during matrix assembly.
  • Consider integrating the kokkos/mdspan reference implementation (or similar) to provide 3D volume access ergonomics without requiring native C++23 support.
  • Update CI/CD to verify builds on Apple Clang 15+, GCC 11+, and MSVC 19.29+.

Motivation

C++20 strikes the best balance between modern architectural safety (Concepts) and library reach. This ensures OpenABF remains accessible to macOS users while gaining the performance benefits of zero-copy memory views.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions