Mercurial > hg > svcore
diff data/fft/FFTFileCache.cpp @ 170:b23eea68357e
* flesh out StorageAdviser
author | Chris Cannam |
---|---|
date | Tue, 26 Sep 2006 12:58:12 +0000 |
parents | 4b2ea82fd0ed |
children | 146eb9e35baa |
line wrap: on
line diff
--- a/data/fft/FFTFileCache.cpp Mon Sep 25 20:32:44 2006 +0000 +++ b/data/fft/FFTFileCache.cpp Tue Sep 26 12:58:12 2006 +0000 @@ -286,3 +286,11 @@ m_mfc->setColumnAt(x, m_writebuf); } +size_t +FFTFileCache::getCacheSize(size_t width, size_t height, StorageType type) +{ + return (height * 2 + 1) * width * + (type == Compact ? sizeof(uint16_t) : sizeof(float)) + + 2 * sizeof(size_t); // matrix file header size +} +