diff options
author | Steve Reinhardt <stever@eecs.umich.edu> | 2006-12-02 22:22:58 -0800 |
---|---|---|
committer | Steve Reinhardt <stever@eecs.umich.edu> | 2006-12-02 22:22:58 -0800 |
commit | 6f94c3c8d755d1cdd3854fde5741305afcd44b19 (patch) | |
tree | 61fb04c9072ed39cd68eeacde3445cb1466f48b4 /src/base/compression/null_compression.hh | |
parent | d2a71f6b2aaad36c6420204266f006304d364ad7 (diff) | |
download | gem5-6f94c3c8d755d1cdd3854fde5741305afcd44b19.tar.xz |
Make cache compression policy a runtime virtual thing
instead of a template policy.
--HG--
extra : convert_revision : 6a4ac7a189a950390a973fdfce94f56190de92db
Diffstat (limited to 'src/base/compression/null_compression.hh')
-rw-r--r-- | src/base/compression/null_compression.hh | 28 |
1 files changed, 5 insertions, 23 deletions
diff --git a/src/base/compression/null_compression.hh b/src/base/compression/null_compression.hh index 5a582d828..ff110807a 100644 --- a/src/base/compression/null_compression.hh +++ b/src/base/compression/null_compression.hh @@ -38,41 +38,23 @@ */ #include "base/misc.hh" // for fatal() -#include "sim/host.hh" +#include "base/compression/base.hh" /** * A dummy compression class to use when no data compression is desired. */ -class NullCompression +class NullCompression : public CompressionAlgorithm { public: - /** - * Uncompress the data, causes a fatal since no data should be compressed. - * @param dest The output buffer. - * @param src The compressed data. - * @param size The number of bytes in src. - * - * @retval The size of the uncompressed data. - */ - static int uncompress(uint8_t * dest, uint8_t *src, int size) + int uncompress(uint8_t * dest, uint8_t *src, int size) { fatal("Can't uncompress data"); } - /** - * Compress the data, just returns the source data. - * @param dest The output buffer. - * @param src The data to be compressed. - * @param size The number of bytes in src. - * - * @retval The size of the compressed data. - */ - - static int compress(uint8_t *dest, uint8_t *src, int size) + int compress(uint8_t *dest, uint8_t *src, int size) { - memcpy(dest,src,size); - return size; + fatal("Can't compress data"); } }; |