[PATCH][RFC]Overloading intrinsics
Martin Liška
mliska@suse.cz
Thu Nov 1 20:51:00 GMT 2018
On 11/1/18 8:40 PM, Thomas Koenig wrote:
> 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!
Hello.
Agree with that. So far I've been provided very nice guidance and
I hope we can get it into GCC 9.1.
>
> 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?
Sounds reasonable for me, I can play with the idea tomorrow.
Thank you,
Martin
>
> Regards
>
> Â Â Â Â Thomas
More information about the Fortran
mailing list