how to enable vector intrinsic functions in fortran frontend
Sa Liu
SALIU@de.ibm.com
Mon Oct 22 16:55:00 GMT 2007
"Andrew Pinski" <pinskia@gmail.com> wrote on 17.10.2007 20:08:54:
> On 10/17/07, Sa Liu <SALIU@de.ibm.com> wrote:
> May I suggest that the VECTOR "kind" takes an optional argument which
> is exactly the same as the vector_size attribute argument. This
> allows for generic vector support in gfortran and uses the already
> implemented generic vector support inside GCC?
>
> The idea would allow:
>
> vector(Integer, 16) :: a, b, c
> a = b + c
> end
>
> so that would be constent with the generic vector support in the C/C++
> front-ends.
>
> Maybe it is better to implement this first and then implement the
> VMX/SPU specific parts.
Thanks for pointing this out. I think we should support user specified
vector size for the generic vector type.
But I'm not quite sure about the syntax here. In C/C++ it is possible to
calculate number of units by vector_size/sizeof(scalar_type), in Fortran
we have to use Integer to represent char, short, int and long. Where could
I specify kind of scalar type? Somthing like vector(Integer(1), 16)?
Thanks,
Sa
More information about the Fortran
mailing list