new proposal to vector intrinsics

Tobias Burnus burnus@net-b.de
Fri Jan 18 23:19:00 GMT 2008


Sa Liu wrote:
> How about the changes in frontend concerning recognition of backend
> builtins? Will this be acceptable in gfotran?
It is not completely clear what you mean by this. For the vector type
itself, I assume one needs to support somewhere the conversion
TYPE(vec_*) to attribute((vector)), even if the type itself is defined
in a module.

And if I read your email correctly (see quote below) I understood that
there is no backend support necessary but it can be a normal Fortran
module; thus I am not sure what you mean by this? Loading this module by
default without specifying "USE vec_intrinsics"? If yes, then I think
the import should be in any disabled by default and made available using
a special option.

Tobias

You wrote before:

> Then we could define a intrinsic module to bind the builtin_* functions 
> with their corresponding C functions:
>
> module vec_intrinsics
>   implicit none
>
>   interface
>     function builtin_vec_add_int(a, b) result(c) bind(c, 
> name="__builtin_altivec_vadduwm")
>           use, intrinsic :: iso_c_binding
>           integer (c_int), intent(in):: a(4), b(4)
>           integer(c_int) :: c(4)
>     end function builtin_vec_add_int
> [...]



More information about the Fortran mailing list