This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: how to enable vector intrinsic functions in fortran frontend
- From: Sa Liu <SALIU at de dot ibm dot com>
- To: "Andrew Pinski" <pinskia at gmail dot com>
- Cc: "Tobias Burnus" <burnus at net-b dot de>, fortran at gcc dot gnu dot org, "Steve Kargl" <sgk at troutmask dot apl dot washington dot edu>, "Tobias Schlüter" <tobias dot schlueter at physik dot uni-muenchen dot de>, Ulrich Weigand <Ulrich dot Weigand at de dot ibm dot com>
- Date: 2007年10月22日 18:55:04 +0200
- Subject: Re: how to enable vector intrinsic functions in fortran frontend
"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