Commit 3fffc031 authored by Martin Reinecke's avatar Martin Reinecke
Browse files

get rid of RESTRICT

parent fb495885
......@@ -28,14 +28,6 @@
#include "pocketfft_hdronly.h"
#ifdef __GNUC__
//#define RESTRICT __restrict__
#define RESTRICT
#define NOINLINE __attribute__ ((noinline))
#else
#define RESTRICT
#endif
using namespace std;
namespace py = pybind11;
......@@ -960,8 +952,8 @@ template<typename T> pyarr_c<complex<T>> vis2grid_c(
Helper<T> hlp(gconf, nullptr, grid);
T emb = exp(-2*beta);
int jump = hlp.lineJump();
const T * RESTRICT ku = hlp.kernel.data();
const T * RESTRICT kv = hlp.kernel.data()+w;
const T * ku = hlp.kernel.data();
const T * kv = hlp.kernel.data()+w;
// Loop over sampling points
#pragma omp for schedule(guided,100)
......@@ -969,7 +961,7 @@ template<typename T> pyarr_c<complex<T>> vis2grid_c(
{
UVW<T> coord = baselines.effectiveCoord(idx(ipart));
hlp.prep(coord.u, coord.v);
auto * RESTRICT ptr = hlp.p0w;
auto * ptr = hlp.p0w;
auto v(vis(ipart)*emb);
if (have_wgt)
v*=wgt(ipart);
......@@ -1068,8 +1060,8 @@ template<typename T> pyarr_c<complex<T>> ms2grid_c(
Helper<T> hlp(gconf, nullptr, grid);
T emb = exp(-2*beta);
int jump = hlp.lineJump();
const T * RESTRICT ku = hlp.kernel.data();
const T * RESTRICT kv = hlp.kernel.data()+w;
const T * ku = hlp.kernel.data();
const T * kv = hlp.kernel.data()+w;
// Loop over sampling points
#pragma omp for schedule(guided,100)
......@@ -1080,7 +1072,7 @@ template<typename T> pyarr_c<complex<T>> ms2grid_c(
auto chan = tidx-row*nchan;
UVW<T> coord = baselines.effectiveCoord(tidx);
hlp.prep(coord.u, coord.v);
auto * RESTRICT ptr = hlp.p0w;
auto * ptr = hlp.p0w;
auto v(ms(row,chan)*emb);
if (have_wgt)
v*=wgt(row, chan);
......@@ -1130,8 +1122,8 @@ template<typename T> pyarr_c<complex<T>> grid2vis_c(
Helper<T> hlp(gconf, grid, nullptr);
T emb = exp(-2*beta);
int jump = hlp.lineJump();
const T * RESTRICT ku = hlp.kernel.data();
const T * RESTRICT kv = hlp.kernel.data()+w;
const T * ku = hlp.kernel.data();
const T * kv = hlp.kernel.data()+w;
#pragma omp for schedule(guided,100)
for (size_t ipart=0; ipart<nvis; ++ipart)
......@@ -1139,7 +1131,7 @@ template<typename T> pyarr_c<complex<T>> grid2vis_c(
UVW<T> coord = baselines.effectiveCoord(idx(ipart));
hlp.prep(coord.u, coord.v);
complex<T> r = 0;
const auto * RESTRICT ptr = hlp.p0r;
const auto * ptr = hlp.p0r;
for (size_t cu=0; cu<w; ++cu)
{
complex<T> tmp(0);
......@@ -1212,8 +1204,8 @@ template<typename T> pyarr_c<complex<T>> grid2ms_c(const Baselines<T> &baselines
Helper<T> hlp(gconf, grid, nullptr);
T emb = exp(-2*beta);
int jump = hlp.lineJump();
const T * RESTRICT ku = hlp.kernel.data();
const T * RESTRICT kv = hlp.kernel.data()+w;
const T * ku = hlp.kernel.data();
const T * kv = hlp.kernel.data()+w;
#pragma omp for schedule(guided,100)
for (size_t ipart=0; ipart<nvis; ++ipart)
......@@ -1224,7 +1216,7 @@ template<typename T> pyarr_c<complex<T>> grid2ms_c(const Baselines<T> &baselines
UVW<T> coord = baselines.effectiveCoord(tidx);
hlp.prep(coord.u, coord.v);
complex<T> r = 0;
const auto * RESTRICT ptr = hlp.p0r;
const auto * ptr = hlp.p0r;
for (size_t cu=0; cu<w; ++cu)
{
complex<T> tmp(0);
......@@ -1278,8 +1270,8 @@ template<typename T> pyarr_c<complex<T>> apply_holo(
Helper<T> hlp(gconf, grid, ogrid);
T emb = exp(-2*beta);
int jump = hlp.lineJump();
const T * RESTRICT ku = hlp.kernel.data();
const T * RESTRICT kv = hlp.kernel.data()+w;
const T * ku = hlp.kernel.data();
const T * kv = hlp.kernel.data()+w;
#pragma omp for schedule(guided,100)
for (size_t ipart=0; ipart<nvis; ++ipart)
......@@ -1288,7 +1280,7 @@ template<typename T> pyarr_c<complex<T>> apply_holo(
UVW<T> coord = baselines.effectiveCoord(tidx);
hlp.prep(coord.u, coord.v);
complex<T> r = 0;
const auto * RESTRICT ptr = hlp.p0r;
const auto * ptr = hlp.p0r;
for (size_t cu=0; cu<w; ++cu)
{
complex<T> tmp(0);
......@@ -1303,7 +1295,7 @@ template<typename T> pyarr_c<complex<T>> apply_holo(
auto twgt = wgt(ipart);
r*=twgt*twgt;
}
auto * RESTRICT wptr = hlp.p0w;
auto * wptr = hlp.p0w;
for (size_t cu=0; cu<w; ++cu)
{
complex<T> tmp(r*ku[cu]);
......@@ -1355,15 +1347,15 @@ template<typename T> pyarr_c<T> get_correlations(
Helper<T,T> hlp(gconf, nullptr, ogrid);
T emb = exp(-2*beta);
int jump = hlp.lineJump();
const T * RESTRICT ku = hlp.kernel.data();
const T * RESTRICT kv = hlp.kernel.data()+w;
const T * ku = hlp.kernel.data();
const T * kv = hlp.kernel.data()+w;
#pragma omp for schedule(guided,100)
for (size_t ipart=0; ipart<nvis; ++ipart)
{
UVW<T> coord = baselines.effectiveCoord(idx(ipart));
hlp.prep(coord.u, coord.v);
auto * RESTRICT wptr = hlp.p0w + u0*jump;
auto * wptr = hlp.p0w + u0*jump;
auto f0 = emb*emb;
if (have_wgt)
{
......
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