Commit 7b579dbf authored by Martin Reinecke's avatar Martin Reinecke
Browse files

tweaks

parent ea09856b
......@@ -474,6 +474,8 @@ a_d_c to_grid (const a_d_c &uv_, const a_c_c &vis_,
{
WriteHelper hlp(nu, nv, epsilon, grid);
double emb = exp(-2*hlp.beta);
const double * RESTRICT ku = hlp.kernel.data();
const double * RESTRICT kv = hlp.kernel.data()+hlp.w;
// Loop over sampling points
#pragma omp for schedule(dynamic,10000)
......@@ -482,12 +484,10 @@ a_d_c to_grid (const a_d_c &uv_, const a_c_c &vis_,
hlp.prep_write(uv[2*ipart], uv[2*ipart+1]);
auto * RESTRICT ptr = hlp.p0;
int w = hlp.w;
auto v = vis[ipart]*emb;
const double * RESTRICT ku = hlp.kernel.data();
const double * RESTRICT kv = hlp.kernel.data()+hlp.w;
auto v(vis[ipart]*emb);
for (int cu=0; cu<w; ++cu)
{
complex<double> tmp = v*ku[cu];
complex<double> tmp(v*ku[cu]);
for (int cv=0; cv<w; ++cv)
ptr[cv] += tmp*kv[cv];
ptr+=hlp.sv;
......@@ -544,6 +544,8 @@ a_c_c from_grid (const a_d_c &uv_, const a_d_c &grid0_, double epsilon)
{
ReadHelper hlp(nu, nv, epsilon, grid);
double emb = exp(-2*hlp.beta);
const double * RESTRICT ku = hlp.kernel.data();
const double * RESTRICT kv = hlp.kernel.data()+hlp.w;
#pragma omp for schedule(dynamic,10000)
for (int ipart=0; ipart<nvis; ++ipart)
......@@ -552,11 +554,9 @@ a_c_c from_grid (const a_d_c &uv_, const a_d_c &grid0_, double epsilon)
complex<double> r = 0.;
auto * RESTRICT ptr = hlp.p0;
int w = hlp.w;
const double * RESTRICT ku = hlp.kernel.data();
const double * RESTRICT kv = hlp.kernel.data()+hlp.w;
for (int cu=0; cu<w; ++cu)
{
complex<double> tmp = 0.;
complex<double> tmp(0.);
for (int cv=0; cv<w; ++cv)
tmp += ptr[cv] * kv[cv];
r += tmp*ku[cu];
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment