1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-15 06:17:05 +01:00

View introduced

This commit is contained in:
paboyle
2018-03-04 16:39:29 +00:00
parent 3277bda130
commit aead94e9a7
6 changed files with 84 additions and 36 deletions

View File

@ -79,11 +79,11 @@ int main (int argc, char ** argv)
double start=usecond();
thread_loop( (int t=0;t<threads;t++),{
sum[t] = x[t][0];
auto x_t = x[t].View();
sum[t] = x_t[0];
for(int i=0;i<Nloop;i++){
for(auto ss=x[t].begin();ss<x[t].end();ss++){
sum[t] = sum[t]+x[t][ss];
for(auto ss=x_t.begin();ss<x_t.end();ss++){
sum[t] = sum[t]+x_t[ss];
}
}
stop[t]=usecond();