Fix remaining errors, hopefully compiling now.
parent
7200229af3
commit
2df21a675a
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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].
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue