Re: Vectorised copy

2011-09-06 Thread Michael Hope
On Wed, Sep 7, 2011 at 2:14 AM, Richard Sandiford wrote: > Michael Hope writes: >> While out benchmarking today, I ran across code similar to this: >> >> int *a; >> int *b; >> int *c; >> >> const int ad[320]; >> const int bd[320]; >> const int cd[320]; >> >> void fill() >> { >>   for (int i = 0;

Re: Vectorised copy

2011-09-06 Thread Richard Sandiford
Michael Hope writes: > While out benchmarking today, I ran across code similar to this: > > int *a; > int *b; > int *c; > > const int ad[320]; > const int bd[320]; > const int cd[320]; > > void fill() > { > for (int i = 0; i < 320; i++) > { > a[i] = ad[i]; > b[i] = bd[i]; >

Re: Vectorised copy

2011-09-04 Thread Michael Hope
On Sat, Sep 3, 2011 at 4:54 AM, Ulrich Weigand wrote: > Michael Hope wrote: > >> int *a; >> int *b; >> int *c; >> >> const int ad[320]; >> const int bd[320]; >> const int cd[320]; >> >> void fill() >> { >> for (int i = 0; i < 320; i++) >> { >> a[i] = ad[i]; >> b[i] = bd[i]; >>

Re: Vectorised copy

2011-09-02 Thread Ulrich Weigand
Michael Hope wrote: > int *a; > int *b; > int *c; > > const int ad[320]; > const int bd[320]; > const int cd[320]; > > void fill() > { > for (int i = 0; i < 320; i++) > { > a[i] = ad[i]; > b[i] = bd[i]; > c[i] = cd[i]; > } > } [snip] > Can we always use the second form

Vectorised copy

2011-08-28 Thread Michael Hope
While out benchmarking today, I ran across code similar to this: int *a; int *b; int *c; const int ad[320]; const int bd[320]; const int cd[320]; void fill() { for (int i = 0; i < 320; i++) { a[i] = ad[i]; b[i] = bd[i]; c[i] = cd[i]; } } I was surprised and happy to