Skip to content
Snippets Groups Projects
Commit b6221e07 authored by Chichi Lalescu's avatar Chichi Lalescu
Browse files

remove redundant variables

parent 80224f74
No related branches found
No related tags found
No related merge requests found
...@@ -146,8 +146,6 @@ void interpolator<rnumber, interp_neighbours>::operator()( ...@@ -146,8 +146,6 @@ void interpolator<rnumber, interp_neighbours>::operator()(
this->compute_beta(deriv[2], xx[2], bz); this->compute_beta(deriv[2], xx[2], bz);
} }
std::fill_n(dest, 3, 0); std::fill_n(dest, 3, 0);
rnumber *ff0 = this->f0 + this->buffer_size;
rnumber *ff1 = this->f1 + this->buffer_size;
for (int iz = -interp_neighbours; iz <= interp_neighbours+1; iz++) for (int iz = -interp_neighbours; iz <= interp_neighbours+1; iz++)
for (int iy = -interp_neighbours; iy <= interp_neighbours+1; iy++) for (int iy = -interp_neighbours; iy <= interp_neighbours+1; iy++)
for (int ix = -interp_neighbours; ix <= interp_neighbours+1; ix++) for (int ix = -interp_neighbours; ix <= interp_neighbours+1; ix++)
...@@ -155,8 +153,10 @@ void interpolator<rnumber, interp_neighbours>::operator()( ...@@ -155,8 +153,10 @@ void interpolator<rnumber, interp_neighbours>::operator()(
{ {
ptrdiff_t tindex = ((ptrdiff_t( xg[2]+iz ) *this->descriptor->sizes[1] + ptrdiff_t tindex = ((ptrdiff_t( xg[2]+iz ) *this->descriptor->sizes[1] +
ptrdiff_t(MOD(xg[1]+iy, this->descriptor->sizes[1])))*this->descriptor->sizes[2] + ptrdiff_t(MOD(xg[1]+iy, this->descriptor->sizes[1])))*this->descriptor->sizes[2] +
ptrdiff_t(MOD(xg[0]+ix, this->descriptor->sizes[2])))*3+c; ptrdiff_t(MOD(xg[0]+ix, this->descriptor->sizes[2])))*3+c + this->buffer_size;
dest[c] += (ff0[tindex]*(1-t) + t*ff1[tindex])*(bz[iz+interp_neighbours]*by[iy+interp_neighbours]*bx[ix+interp_neighbours]); dest[c] += (this->f0[tindex]*(1-t) + t*this->f1[tindex])*(bz[iz+interp_neighbours]*
by[iy+interp_neighbours]*
bx[ix+interp_neighbours]);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment