comparison base/MatrixFileCache.h @ 90:c4e163f911dd

* Switch spectrogram layer over to using the new rudimentary disk-backed FFT cache
author Chris Cannam
date Wed, 03 May 2006 14:26:26 +0000
parents 7de62a884810
children 4988de098b25
comparison
equal deleted inserted replaced
89:6a1803d578e0 90:c4e163f911dd
35 size_t getHeight() const; 35 size_t getHeight() const;
36 36
37 void resize(size_t width, size_t height); 37 void resize(size_t width, size_t height);
38 void reset(); 38 void reset();
39 39
40 void setRangeOfInterest(size_t x, size_t width); 40 void setRegionOfInterest(size_t x, size_t width);
41 void clearRegionOfInterest();
41 42
42 float getValueAt(size_t x, size_t y) const; 43 float getValueAt(size_t x, size_t y) const;
43 void getColumnAt(size_t x, float *values) const; 44 void getColumnAt(size_t x, float *values) const;
44 // float getColumnMaximum(size_t x) const;
45 // float getColumnMinimum(size_t x) const;
46 45
47 void setValueAt(size_t x, size_t y, float value); 46 void setValueAt(size_t x, size_t y, float value);
48 void setColumnAt(size_t x, float *values); 47 void setColumnAt(size_t x, float *values);
49 48
50 protected: 49 protected:
51 int m_fd; 50 int m_fd;
52 Mode m_mode; 51 Mode m_mode;
53 size_t m_width; 52 size_t m_width;
54 size_t m_height; 53 size_t m_height;
55 size_t m_rx;
56 size_t m_rw;
57 float **m_range;
58 size_t m_headerSize; 54 size_t m_headerSize;
55 size_t m_autoRegionWidth;
59 56
60 mutable off_t m_off; 57 mutable off_t m_off;
58 mutable size_t m_rx;
59 mutable size_t m_rw;
60 mutable bool m_userRegion;
61 mutable float *m_region;
62 mutable bool m_mmapped;
63 mutable size_t m_mmapSize;
64 mutable size_t m_mmapOff;
65 mutable bool m_preferMmap;
66 float *getRegionPtr(size_t x, size_t y) const;
67
68 bool autoSetRegion(size_t x) const;
69 bool setRegion(size_t x, size_t width, bool user) const;
61 70
62 bool seekTo(size_t x, size_t y) const; 71 bool seekTo(size_t x, size_t y) const;
63 }; 72 };
64 73
65 #endif 74 #endif