Fix remaining errors, hopefully compiling now.

CQTexperiment
Chris Moeller 2016-05-19 12:00:41 -07:00
parent 7200229af3
commit 2df21a675a
4 changed files with 21 additions and 3 deletions

View File

@ -92,7 +92,7 @@ WaveformGenerator::WaveformGenerator()
// MOS 8580: 2R/R ~ 2.00, correct termination.
build_dac_table(model_dac[1], 12, 2.00, true);
class_init = true;
g_class_init = true;
}
}

View File

@ -24,6 +24,7 @@
#include <cmath>
#include <cassert>
#include <mutex>
#include "Integrator.h"
#include "OpAmp.h"
@ -90,9 +91,11 @@ const Spline::Point opamp_voltage[OPAMP_SIZE] =
};
std::unique_ptr<FilterModelConfig> FilterModelConfig::instance(nullptr);
static std::mutex g_FilterModelConfig_mutex;
FilterModelConfig* FilterModelConfig::getInstance()
{
std::lock_guard<std::mutex> guard(g_FilterModelConfig_mutex);
if (!instance.get())
{
instance.reset(new FilterModelConfig());

View File

@ -22,16 +22,28 @@
#include "WaveformCalculator.h"
#include <cmath>
#include <mutex>
namespace reSIDfp
{
// Doing it this way somehow prevents race conditions
std::unique_ptr<WaveformCalculator> WaveformCalculator::instance(nullptr);
static std::mutex g_WaveformCalculator_mutex;
WaveformCalculator* WaveformCalculator::getInstance()
{
static WaveformCalculator instance;
return &instance;
std::lock_guard<std::mutex> guard(g_WaveformCalculator_mutex);
if (!instance.get())
{
instance.reset(new WaveformCalculator());
}
return instance.get();
}
/**
* Parameters derived with the Monte Carlo method based on
* samplings by kevtris. Code and data available in the project repository [1].

View File

@ -92,6 +92,9 @@ typedef struct
*/
class WaveformCalculator
{
private:
static std::unique_ptr<WaveformCalculator> instance;
private:
typedef std::map<const CombinedWaveformConfig*, matrix_t> cw_cache_t;