summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
Diffstat (limited to 'inc')
-rw-r--r--inc/cache.h5
-rw-r--r--inc/storage.h2
2 files changed, 5 insertions, 2 deletions
diff --git a/inc/cache.h b/inc/cache.h
index b7b72cf..0c9b3d7 100644
--- a/inc/cache.h
+++ b/inc/cache.h
@@ -3,6 +3,7 @@
#include "definitions.h"
#include "storage.h"
#include <array>
+#include <ostream>
class Cache : public Storage
{
@@ -30,7 +31,7 @@ class Cache : public Storage
* TODO this doesn't seem like good object-oriented practice.
* @return this->meta
*/
- std::array<std::array<int, 2>, L1_CACHE_SIZE> *get_meta();
+ std::array<std::array<int, 2>, L1_CACHE_SIZE> get_meta() const;
private:
/**
@@ -49,4 +50,6 @@ class Cache : public Storage
std::array<std::array<int, 2>, L1_CACHE_SIZE> meta;
};
+std::ostream &operator<<(std::ostream &os, const Cache &a);
+
#endif /* CACHE_H_INCLUDED */
diff --git a/inc/storage.h b/inc/storage.h
index 0ab16e4..3f113d3 100644
--- a/inc/storage.h
+++ b/inc/storage.h
@@ -45,7 +45,7 @@ class Storage
* @return A matrix of data values, where each row is a line and each column
* is a word.
*/
- std::vector<std::array<signed int, LINE_SIZE>> view(int base, int lines);
+ std::vector<std::array<signed int, LINE_SIZE>> view(int base, int lines) const;
/**
* Advances to the next job if the current job is completed.
*/