j3-fortran / generics

BSD 3-Clause "New" or "Revised" License
39 stars 8 forks source link

An example using new TEMPLATE notation. #46

Closed tclune closed 2 years ago

tclune commented 3 years ago

The files in this directory are an attempt to demonstrate several ideas that were bantered about at the last subgroup telecon using the AXPY algorithm as an example.

  1. Introduce a new TEMPLATE construct - sort of like an inner parameterized module.
  2. How can a map procedure be combined with a rank-agnostic Array wrapper template, to provide operations on the wrapped elements?
  3. Use procedures instead of operators as template arguments. (More general, and sidesteps some anoying notation issues to a degree.)
tclune commented 3 years ago

Note that this example also does not allow direct operations between "raw" intrinsics (scalar or array), but instead requires all operands to be wrapped with the generic Array wrapper.