diff src/EM.h @ 114:b2f0967cb8d1 bqvec-openmp

Pull out shifted templates into separate arrays with proper alignment (trading off memory occupied against getting the alignments right)
author Chris Cannam
date Wed, 07 May 2014 09:43:15 +0100
parents c4eae816bdb3
children
line wrap: on
line diff
--- a/src/EM.h	Wed May 07 09:08:52 2014 +0100
+++ b/src/EM.h	Wed May 07 09:43:15 2014 +0100
@@ -24,6 +24,8 @@
     EM(bool useShifts);
     ~EM();
 
+    static void initialise();
+
     int getBinCount() const { return m_binCount; } // size of input column
     int getNoteCount() const { return m_noteCount; } // size of pitch column
     int getSourceCount() const { return m_sourceCount; }
@@ -51,6 +53,9 @@
 
     double *m_estimate;
     double *m_q;
+
+    static bool m_initialised;
+    static double ****m_templates; // [source][note][shift][bin]
     
     const int m_noteCount;
     const int m_shiftCount; // 1 + 2 * max template shift