[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