[PATCH][RFC]Overloading intrinsics
Thomas Koenig
tkoenig@netcologne.de
Thu Nov 1 19:40:00 GMT 2018
Hi Martin,
> module vector_math
> interface
> elemental function sin(arg)
> !GCC$ attributes simd_notinbranch :: sin
> real, intent(in) :: arg
> real :: sin
> end function sin
> end interface
> end module
I'm glad that this project we discussed at the GNU Cauldron is
moving forward!
Regarding the syntax: I am not sure that using an external function
and then trying to coerce it to an intrinsic is something that is
easily or cleanly done (as you yourself noted).
Would it be possible to use something like
module x
!GCC$ attributes simd_notinbranch, real(4) :: sin
!GCC$ attributes simd_notinbranch, real(8) :: sin
end module x
Attribute parsing might have to be extended a little, but
this would create one clear point where to create the
specific version of the library routine.
What do you think?
Regards
Thomas
More information about the Fortran
mailing list