Re: [arm-gnu] NEON usage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [arm-gnu] NEON usage
- To: arm-gnu <arm-gnu@xxxxxxxxxxxxxxxx>
- Subject: Re: [arm-gnu] NEON usage
- From: James <jamessteward@xxxxxxxxxxxxxxx>
- Date: Tue, 11 May 2010 14:03:17 +1000
On Tue, 2010-05-11 at 05:41 +0200, 42Bastian wrote:
> Am 11.05.2010 05:20, schrieb James:
>
> > But the ARM NEON Intrinsics here:
> > http://gcc.gnu.org/onlinedocs/gcc/ARM-NEON-Intrinsics.html
> >
> > seems to suggest that
> >
> > int64x2_t vmlal_s32 (int64x2_t, int32x2_t, int32x2_t)
> >
> > could be used?
>
> Excuse my ignorance, but aren't intrinsics meant to be used by the
> programmer ?
Yes, as I understand it. What I was getting at is that the platform has
the ability to perform a 32x32=64 bit computation, but the vectorizer
doesn't seem to know about it.
> So you need to write:
>
> int32x2_t x,y;
> int64x2_t sum;
> for(i = 0; i < N; i+=2){
> x = vld1_s32(&x[i]); y = vld1_s32(&y[i]);
> vmlal_s32(sum,x,y);
> }
> // add upper and lower 64bit
> // shift down
More than likely. I was hoping to write in portable C and let the
compiler do the NEON dirty work.
Regards,
James.