Skip to content

Releases: sourceryinstitute/emulators

Initial release: findloc, co_sum, co_broadcast, and co_reduce

18 Sep 21:21
eb80c1a
Compare
Choose a tag to compare

This release provides emulators for one intrinsic function and three collective subroutines as detailed below.

Intrinsic function

  • findloc for arguments of
    • rank 1 default integer, logical, or character

Collective subroutines

  • co_sum for arguments of
    • rank 0 default integer
    • rank 1 or 2 real(real32)
    • rank 1 or 2 real(real64)
  • co_broadcast
    • rank 0 default logical
    • rank 0 default integer
    • rank 1 or 2 real(real32)
    • rank 1 or 2 real(real64)
  • co_reduce
    • rank 0 logical

Test results

Not all combination of argument type, kind, rank, and presence are supported.
The test command and results below give a partial indication of currently supported
features, but not all procedures or procedure argument combinations are currently
tested so the set of supported procedures and arguments is a bit larger than the
set of tested procedures and arguments.

fpm test \
  --runner cafrun -n 2 \
  --compiler caf \
  --flag "-cpp -DEMULATE_INTRINSICS -DEMULATE_COLLECTIVES"

Running Tests

Test that
    co_sum
        gives sums with result_image present
        gives sums without result_image present
    findloc
        handles zero-sized argument
        handles absent back argument
        handles .false. back argument
        handles .true. back argument
        handles absent back argument
        handles character array argument
        handles empty character array argument
        handles failed search

A total of 10 test cases

All Passed
Took 3.76e-4 seconds

A total of 10 test cases containing a total of 10 assertions
Running Tests

Test that
    co_sum
        gives sums with result_image present
        gives sums without result_image present
    findloc
        handles zero-sized argument
        handles absent back argument
        handles .false. back argument
        handles .true. back argument
        handles absent back argument
        handles character array argument
        handles empty character array argument
        handles failed search

A total of 10 test cases

All Passed
Took 3.76e-4 seconds

A total of 10 test cases containing a total of 10 assertions