Skip to content

Module/submodule restructuring before continuing modernization #61

@loiseaujc

Description

@loiseaujc

Hej,

Following the discussion here, I've started to think about what should be the next big steps in the modernization of fftpack. In my opinion, the two most important ones would be:

  • Templating all of the routines with fypp to support all the different precisions already included in stdlib (simple, double, extended, and quadruple).
  • Provide modern high- and low-levels interfaces to the different transforms, similar to what has been done with stdlib_linalg module.

For both of these ideas, I think that restructuring the package into a set of well-defined modules and submodules would be a good idea. Not only would all the functionalities be equipped with a proper interface, but it will also ease maintenance and the eventual move to fypp-templating.

Here is a possible structure followed by a short description of the different modules/submodules.

.
└── src/
    ├── module: fftpack.f90
    ├── module: fftpack_kinds.f90
    ├── module: fftpack_legacy.f90
    │   └── submodule: fftpack_drivers.f90
    │       ├── submodule: fftpack_drivers_pass.f90
    │       └── submodule: fftpack_drivers_rad.f90  
    ├── module: fftpack_modern.f90
    └── module: fftpack_utils.f90
  • fftpack_kinds.f90 (module): Essentially a module similar to stdlib_kinds defining all the different precisions supported by fftpack (currently only double precision, but we'll be able to extend this list once we start using fypp).

  • fftpack_legacy.f90 (module): Defines all the legacy interfaces to the transforms supported by fftpack (and eventually those for the future precisions with fypp).

    • fftpack_drivers.f90 (submodule): Provides the actual implementations of the different transforms + the definition of the interfaces for the set of pass* and rad* routines.
      • fftpack_drivers_pass.f90 (submodule): Provides all of the implementations of the pass* subroutines (including all the different precisions later on).
      • fftpack_drivers_rad.f90 (submodule): Provides all of the implementations of the rad* subroutines (including all the different precisions later on).
  • fftpack_modern.f90 (module): Provides all of the modern generic interfaces (and implementations?) that may eventually become the stdlib standard (see this discussion).

  • fftpack_utils.f90 (module): A simple module with all of the utility functions we can already have or can think of.

This is just a sketch but since it may eventually impact how stdlib will support Fourier transforms, let me ping part of the other team to get their feedback as well. Ping: @perazz, @jalvesz, @jvdp1, @zoziha. @p-costa, you also have extensive experience with 2DECOMP&FFT library I believe so feel free to give your own 2 cents about modern interfaces for instance. @jacobwilliams, @certik, @milancurcic, @ivan-pi, since you were involved in the initial discussion and modernization a few years ago, your insights are also more than welcome.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions