Mercurial > hg > svcore
diff data/fft/FFTMemoryCache.cpp @ 383:94fc0591ea43 1.2-stable
* merge from trunk (1.2 ended up being tracked from trunk, but we may want
this branch for fixes later)
author | Chris Cannam |
---|---|
date | Wed, 27 Feb 2008 10:32:45 +0000 |
parents | aa8dbac62024 |
children |
line wrap: on
line diff
--- a/data/fft/FFTMemoryCache.cpp Fri Nov 30 17:36:14 2007 +0000 +++ b/data/fft/FFTMemoryCache.cpp Wed Feb 27 10:32:45 2008 +0000 @@ -18,6 +18,8 @@ #include <iostream> +//#define DEBUG_FFT_MEMORY_CACHE 1 + FFTMemoryCache::FFTMemoryCache(StorageType storageType) : m_width(0), m_height(0), @@ -30,13 +32,17 @@ m_factor(0), m_storageType(storageType) { +#ifdef DEBUG_FFT_MEMORY_CACHE std::cerr << "FFTMemoryCache[" << this << "]::FFTMemoryCache (type " << m_storageType << ")" << std::endl; +#endif } FFTMemoryCache::~FFTMemoryCache() { -// std::cerr << "FFTMemoryCache[" << this << "]::~FFTMemoryCache" << std::endl; +#ifdef DEBUG_FFT_MEMORY_CACHE + std::cerr << "FFTMemoryCache[" << this << "]::~FFTMemoryCache" << std::endl; +#endif for (size_t i = 0; i < m_width; ++i) { if (m_magnitude && m_magnitude[i]) free(m_magnitude[i]); @@ -59,7 +65,9 @@ void FFTMemoryCache::resize(size_t width, size_t height) { -// std::cerr << "FFTMemoryCache[" << this << "]::resize(" << width << "x" << height << " = " << width*height << ")" << std::endl; +#ifdef DEBUG_FFT_MEMORY_CACHE + std::cerr << "FFTMemoryCache[" << this << "]::resize(" << width << "x" << height << " = " << width*height << ")" << std::endl; +#endif if (m_width == width && m_height == height) return; @@ -81,7 +89,9 @@ m_width = width; m_height = height; -// std::cerr << "done, width = " << m_width << " height = " << m_height << std::endl; +#ifdef DEBUG_FFT_MEMORY_CACHE + std::cerr << "done, width = " << m_width << " height = " << m_height << std::endl; +#endif } void