summaryrefslogtreecommitdiff
path: root/code/trainer/check_stdp_freq-dep.h
diff options
context:
space:
mode:
Diffstat (limited to 'code/trainer/check_stdp_freq-dep.h')
-rw-r--r--code/trainer/check_stdp_freq-dep.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/code/trainer/check_stdp_freq-dep.h b/code/trainer/check_stdp_freq-dep.h
new file mode 100644
index 0000000..cf429b6
--- /dev/null
+++ b/code/trainer/check_stdp_freq-dep.h
@@ -0,0 +1,46 @@
+#ifndef TRAINER_H
+#define TRAINER_H
+
+#include <stdio.h>
+#include <pthread.h>
+#include <map>
+#include <queue>
+#include "boost/tuple/tuple.hpp"
+
+
+using namespace std;
+
+class Trainer {
+ public:
+ FILE *fd_spike_out,
+ *fd_global_out,
+ *fd_trace_out,
+ *fd_performance_out;
+
+ // init stuff
+ Trainer(int argc, char** argv);
+
+ // main routine
+ void run();
+
+ // state vars
+ long currentEpoch;
+
+ // thread related
+ pthread_t thread_write;
+
+ // configuration
+ double md; // multiplicative difference (>1)
+ double mss; // multiplicative step size (>1)
+ double fs, frd, fad; // number of frequency steps and relative step size
+ double epochDuration;
+ double voltage; // per outgoing (random) spike
+ long neurons;
+};
+
+// seperate thread to read all spikes neccessary because reading and
+// writing to these descriptors could block and thus cause a deadlock
+void *read_spikes(Trainer *t);
+void *write_spikes(Trainer *t);
+
+#endif // TRAINER_H
contact: Jan Huwald // Impressum