Skip to content

Enhancement: Fortran 90 MEX gateway backend (-fmex) from the v1.4 development branch #44

Description

@zgimbutas

Proposed in the July 2026 AI-assisted code review (Claude Code), from investigation of the v1.4 development branch (octave).

-fmex emits a pure Fortran 90 MEX gateway (.f90) plus mwrap-fmex-support.f90 — no C shim, attractive for Fortran-centric projects (FMM libraries): src/mwrap-fmexgen.cc + src/mwrap-fmex-support.f90, mirrored in python/mwrap_fmexgen.py + python/mwrap_fmex_support.f90. -i8 maps to integer*8; -fmex -gpu is rejected in both implementations; a scalar-return fix is already on the branch. The branch has a CMake generation smoke test, testing/test_fmex1.mw, and the larger testing/nufft1d suite.

As with the other backends, the branch's experimental nocopy modifier is excluded from this port (see #45 and #21).

Before it lands on master:

  • a compile/run test with a Fortran compiler in CI (gfortran is available on ubuntu runners)
  • C++/Python byte-parity coverage in testing/test_python.sh
  • user-guide/README documentation including the supported type subset

See #45 for dispatch-table compatibility and merge scope.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions