Commit d8d8c226 authored by Martin Reinecke's avatar Martin Reinecke
Browse files

cosmetics

parent 942d7eff
...@@ -607,6 +607,7 @@ class GridderConfig ...@@ -607,6 +607,7 @@ class GridderConfig
template<typename T> void grid2dirty_post(const mav<T,2> &tmav, const mav<T,2> &dirty) const template<typename T> void grid2dirty_post(const mav<T,2> &tmav, const mav<T,2> &dirty) const
{ {
checkShape(dirty.shape(), {nx_dirty,ny_dirty});
for (size_t i=0; i<nx_dirty; ++i) for (size_t i=0; i<nx_dirty; ++i)
for (size_t j=0; j<ny_dirty; ++j) for (size_t j=0; j<ny_dirty; ++j)
{ {
...@@ -617,10 +618,10 @@ class GridderConfig ...@@ -617,10 +618,10 @@ class GridderConfig
dirty(i,j) = tmav(i2,j2)*T(cfu[i]*cfv[j]); dirty(i,j) = tmav(i2,j2)*T(cfu[i]*cfv[j]);
} }
} }
template<typename T> void grid2dirty(const const_mav<T,2> &grid, const mav<T,2> &dirty) const template<typename T> void grid2dirty(const const_mav<T,2> &grid, const mav<T,2> &dirty) const
{ {
checkShape(grid.shape(), {nu,nv}); checkShape(grid.shape(), {nu,nv});
checkShape(dirty.shape(), {nx_dirty,ny_dirty});
tmpStorage<T,2> tmpdat({nu,nv}); tmpStorage<T,2> tmpdat({nu,nv});
auto tmav = tmpdat.getMav(); auto tmav = tmpdat.getMav();
hartley2_2D<T>(grid, tmav, nthreads); hartley2_2D<T>(grid, tmav, nthreads);
...@@ -630,7 +631,6 @@ class GridderConfig ...@@ -630,7 +631,6 @@ class GridderConfig
template<typename T> void grid2dirty_c(const mav<const complex<T>,2> &grid, mav<complex<T>,2> &dirty) const template<typename T> void grid2dirty_c(const mav<const complex<T>,2> &grid, mav<complex<T>,2> &dirty) const
{ {
checkShape(grid.shape(), {nu,nv}); checkShape(grid.shape(), {nu,nv});
checkShape(dirty.shape(), {nx_dirty,ny_dirty});
tmpStorage<complex<T>,2> tmpdat({nu,nv}); tmpStorage<complex<T>,2> tmpdat({nu,nv});
auto tmp = tmpdat.getMav(); auto tmp = tmpdat.getMav();
constexpr auto sc = ptrdiff_t(sizeof(complex<T>)); constexpr auto sc = ptrdiff_t(sizeof(complex<T>));
...@@ -655,6 +655,7 @@ class GridderConfig ...@@ -655,6 +655,7 @@ class GridderConfig
grid(i2,j2) = dirty(i,j)*T(cfu[i]*cfv[j]); grid(i2,j2) = dirty(i,j)*T(cfu[i]*cfv[j]);
} }
} }
template<typename T> void dirty2grid(const const_mav<T,2> &dirty, mav<T,2> &grid) const template<typename T> void dirty2grid(const const_mav<T,2> &dirty, mav<T,2> &grid) const
{ {
dirty2grid_pre(dirty, grid); dirty2grid_pre(dirty, grid);
...@@ -1271,7 +1272,7 @@ template<typename T, typename Serv> void x2dirty( ...@@ -1271,7 +1272,7 @@ template<typename T, typename Serv> void x2dirty(
dirty.fill(0); dirty.fill(0);
vector<complex<T>> vis_loc_; vector<complex<T>> vis_loc_;
vector<uint32_t> idx_loc_; vector<uint32_t> idx_loc_;
vector<uint32_t> newidx; vector<uint32_t> newidx;
tmpStorage<complex<T>,2> grid_({gconf.Nu(),gconf.Nv()}); tmpStorage<complex<T>,2> grid_({gconf.Nu(),gconf.Nv()});
auto grid=grid_.getMav(); auto grid=grid_.getMav();
tmpStorage<complex<T>,2> tdirty_(dirty.shape()); tmpStorage<complex<T>,2> tdirty_(dirty.shape());
......
Markdown is supported
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