Skip to content

Commit

Permalink
All warnings except missing hdf.h are handled.
Browse files Browse the repository at this point in the history
  • Loading branch information
anderskaestner committed Dec 20, 2024
1 parent c813901 commit 3924400
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 16 deletions.
14 changes: 7 additions & 7 deletions core/kipl/kipl/src/fft/fftbase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ FFTBase::FFTBase(const std::vector<size_t> &_dims) :
cBufferA(nullptr),
cBufferB(nullptr),
rBuffer(nullptr),
Ndata(std::accumulate(_dims.begin(), _dims.end(), 1UL, std::multiplies<size_t>())),
Ndata(std::accumulate(_dims.begin(), _dims.end(), static_cast<size_t>(1), std::multiplies<size_t>())),
dims(_dims)
{
ndim=dims.size();
Expand Down Expand Up @@ -64,8 +64,8 @@ int FFTBase::operator() ( std::complex<double> *inCdata, std::complex<double> *
if (!cBufferB)
cBufferB = new std::complex<double>[Ndata];

std::fill_n(cBufferA,0,Ndata);
std::fill_n(cBufferB,0,Ndata);
std::fill_n(cBufferA,Ndata, std::complex<double>(0.0));
std::fill_n(cBufferB,Ndata, std::complex<double>(0.0));

if (sign<0)
{
Expand Down Expand Up @@ -157,8 +157,8 @@ int FFTBase::operator() (double *inRdata, std::complex<double> *outCdata)
if (!rBuffer)
rBuffer = new double[Ndata];

std::fill_n(cBufferA,0, Ndata);
std::fill_n(rBuffer, 0, Ndata);
std::fill_n(cBufferA, Ndata, std::complex<double>(0.0));
std::fill_n(rBuffer, Ndata, 0.0);

if (!have_r2cPlan)
{
Expand Down Expand Up @@ -208,8 +208,8 @@ int FFTBase::operator() ( std::complex<double> *inCdata, double *outRdata)
if (!rBuffer)
rBuffer = new double[Ndata];

std::fill_n(cBufferA, 0, Ndata);
std::fill_n(rBuffer, 0, Ndata);
std::fill_n(cBufferA, Ndata, std::complex<double>(0.0));
std::fill_n(rBuffer, Ndata, 0.0);

if (!have_c2rPlan)
{
Expand Down
14 changes: 7 additions & 7 deletions core/kipl/kipl/src/fft/fftbasef.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ FFTBaseFloat::FFTBaseFloat(const std::vector<size_t> _dims) :
cBufferA(nullptr),
cBufferB(nullptr),
rBuffer(nullptr),
Ndata(std::accumulate(_dims.begin(), _dims.end(), 1, std::multiplies<size_t>())),
Ndata(std::accumulate(_dims.begin(), _dims.end(), static_cast<size_t>(1), std::multiplies<size_t>())),
dims(_dims)
{
ndim=dims.size();
Expand Down Expand Up @@ -75,8 +75,8 @@ int FFTBaseFloat::operator() ( std::complex<float> *inCdata, std::complex<float
if (!cBufferB)
cBufferB = new std::complex<float>[Ndata];

std::fill_n(cBufferA,0,Ndata);
std::fill_n(cBufferB,0,Ndata);
std::fill_n(cBufferA,Ndata, std::complex<float>(0.0f));
std::fill_n(cBufferB,Ndata, std::complex<float>(0.0f));

if (sign<0)
{
Expand Down Expand Up @@ -167,8 +167,8 @@ int FFTBaseFloat::operator() (float *inRdata, std::complex<float> *outCdata)
if (!rBuffer)
rBuffer = new float[2*Ndata];

std::fill_n(cBufferA,0,Ndata);
std::fill_n(rBuffer,0,2*Ndata);
std::fill_n(cBufferA,Ndata, std::complex<float>(0.0));
std::fill_n(rBuffer,2*Ndata,0.0f);

if (!have_r2cPlan)
{
Expand Down Expand Up @@ -220,8 +220,8 @@ int FFTBaseFloat::operator() ( std::complex<float> *inCdata, float *outRdata)
if (!rBuffer)
rBuffer=new float[2*Ndata];

std::fill_n(cBufferA, 0, Ndata);
std::fill_n(rBuffer, 0, 2*Ndata);
std::fill_n(cBufferA, Ndata, std::complex<float>(0.0f));
std::fill_n(rBuffer, 2*Ndata, 0.0f);

if (!have_c2rPlan)
{
Expand Down
5 changes: 3 additions & 2 deletions core/kipl/kipl/src/profile/Timer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ Timer::Timer() :
/// \brief Starts the timer
void Timer::Tic()
{
std::chrono::high_resolution_clock::now();
m_nToc=m_nTic=std::chrono::high_resolution_clock::now();
auto now = std::chrono::high_resolution_clock::now();
m_nTic = now;
m_nToc = now;
}

/// \brief Stops the timer. Can be called multiple times, in this case the time from the most resent call to Tic() is measured.
Expand Down

0 comments on commit 3924400

Please sign in to comment.