openshmem-org / specification

OpenSHMEM Application Programming Interface
http://www.openshmem.org
50 stars 38 forks source link

Allow Type Extensions in shmem.h #336

Closed jdinan closed 4 years ago

jdinan commented 4 years ago

Issue

OpenSHMEM places a strong restriction on interfaces defined in shmem.h:

All OpenSHMEM extension APIs that are not part of this specification must be defined in the shmemx.h and shmemx.fh include files for C and Fortran language bindings, respectively. These header files must exist, even if no extensions are provided. Any extensions shall use the shmemx_ prefix for all routine, variable, and constant names.

Implementations that want to extend OpenSHMEM with support for additional types must prefix these functions with shmemx_ and include their definition in shmemx.h. This is confusing for users (shmem_int_p vs shmemx_float2_p) and it prevents implementations from supporting these types in C11 generic selection interfaces.

Proposed Solution

Provide an exception for type-only extensions to existing OpenSHMEM routines:

An exception to this restriction is made for OpenSHMEM extensions that add support for additional types to existing OpenSHMEM routines.

jdinan commented 4 years ago

I appreciate that this may not fit exactly into section committee work, but it would be great to have this very minor change in OpenSHMEM 1.5 (enabling standard and generic interfaces to support additional types), versus waiting until OpenSHMEM 1.6.

jdinan commented 4 years ago

Closed by https://github.com/RaymondMichael/specification/pull/23