diff data/fft/FFTFileCacheWriter.cpp @ 550:107d3f3705c9

* Auto-close write-mode matrix files when all columns written
author Chris Cannam
date Thu, 05 Feb 2009 14:17:11 +0000
parents 3cc4b7cd2aa5
children f9cf4b49b08b
line wrap: on
line diff
--- a/data/fft/FFTFileCacheWriter.cpp	Thu Feb 05 12:53:19 2009 +0000
+++ b/data/fft/FFTFileCacheWriter.cpp	Thu Feb 05 14:17:11 2009 +0000
@@ -44,6 +44,7 @@
            width, height * 2 + m_factorSize))
 {
     std::cerr << "FFTFileCacheWriter: storage type is " << (storageType == FFTCache::Compact ? "Compact" : storageType == FFTCache::Polar ? "Polar" : "Rectangular") << ", size " << width << "x" << height << std::endl;
+    m_mfc->setAutoClose(true);
     m_writebuf = new char[(height * 2 + m_factorSize) * m_mfc->getCellSize()];
 }
 
@@ -73,6 +74,12 @@
     else return 0;
 }
 
+bool
+FFTFileCacheWriter::haveSetColumnAt(size_t x) const
+{
+    return m_mfc->haveSetColumnAt(x);
+}
+
 void
 FFTFileCacheWriter::setColumnAt(size_t x, float *mags, float *phases, float factor)
 {