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

tweaks

parent c34b08c1
......@@ -610,7 +610,7 @@ MRUTIL_NOINLINE void sharp_job::execute()
vector<dcmplx> phasebuffer;
//FIXME: needs to be changed to "nm"
alloc_phase(mmax+1,chunksize, phasebuffer);
std::atomic<unsigned long long> a_opcnt = 0;
std::atomic<unsigned long long> a_opcnt(0);
/* chunk loop */
for (int chunk=0; chunk<nchunks; ++chunk)
......
......@@ -39,7 +39,7 @@ class GL_Integrator
vector<double> x, w;
static inline double one_minus_x2 (double x)
{ return (abs(x)>0.1) ? (1.+x)*(1.-x) : 1.-x*x; }
{ return (std::abs(x)>0.1) ? (1.+x)*(1.-x) : 1.-x*x; }
public:
GL_Integrator(int n, size_t nthreads=1)
......@@ -86,7 +86,7 @@ class GL_Integrator
x0 = x1;
if (dobreak) break;
if (abs(dx)<=eps) dobreak=1;
if (std::abs(dx)<=eps) dobreak=1;
MR_assert(++j<100, "convergence problem");
}
......@@ -132,6 +132,8 @@ class GL_Integrator
}
return res;
}
const vector<double> &coordsSymmetric() const
{ return x; }
vector<double> weights() const
{
......@@ -140,6 +142,13 @@ class GL_Integrator
res[i]=res[n_-1-i]=w[w.size()-1-i];
return res;
}
vector<double> weightsSymmetric() const
{
auto res = w;
if (n_&1) res[0]*=0.5;
for (auto &v:res) v*=2;
return res;
}
};
}
......
......@@ -27,9 +27,7 @@
namespace mr {
namespace mav {
namespace detail {
namespace detail_mav {
using namespace std;
......@@ -114,11 +112,11 @@ template<typename T, size_t ndim> const_mav<T, ndim> nullmav()
}
using detail::mav;
using detail::const_mav;
using detail::cmav;
using detail::nullmav;
using detail_mav::mav;
using detail_mav::const_mav;
using detail_mav::cmav;
using detail_mav::nullmav;
}}
}
#endif
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