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;
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];
>
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];
>>
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
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