accelerator Acs;
array<int , 2> *pvA;
pvA = new array<int , 2>(100 , 100, Acs.get_default_view());
array_view<int , 2> vaC = *pvA;
extent<2> exA;
exA[0] = 100;
exA[1] = 100;
parallel_for_each(
Acs.get_default_view() ,
exA ,
[=](index<2> iC) restrict(amp)
{
int i = iC[0];
int j = iC[1];
vaC[iC] = 0;
vaC[i][j] = 0;
}
);
accelerator Acs;
array<int , 2> *pvA;
pvA = new array<int , 2>(100 , 100, Acs.get_default_view());
array_view<int , 2> vaC = *pvA;
extent<1> exA;
exA[0] = 10000;
parallel_for_each(
Acs.get_default_view() ,
exA ,
[=](index<1> iC) restrict(amp)
{
int i = iC[0]%100;
int j = iC[0]/100;
index<1> iC2;
iC2[0] = i;
iC2[1] = j;
vaC[iC2] = 0;
vaC[iC] = 0;
}
);