Permalink
Browse files

Some modifications to make it work

  • Loading branch information...
1 parent 549cc4e commit 217989d8247d01eaa65b155497876c362791138a @pksunkara committed Aug 21, 2011
Showing with 2 additions and 66 deletions.
  1. +1 −1 Makefile
  2. +0 −9 block.cpp
  3. +0 −10 block.h
  4. +0 −4 cache.cpp
  5. +1 −3 cache.h
  6. +0 −21 set.cpp
  7. +0 −18 set.h
View
@@ -4,7 +4,7 @@ RM= rm -rf
all: sim
-sim: access.o cache.o memory.o set.o block.o matrix/aware.o matrix/unaware.o matrix/oblivious.o main.cpp
+sim: access.o cache.o memory.o matrix/aware.o matrix/unaware.o matrix/oblivious.o main.cpp
$(CC) $(CFLAGS) $^ -o $@
%.o: %.c
View
@@ -1,9 +0,0 @@
-#include "Block.h"
-
-Block::Block(int block_size) {
-
-}
-
-Block::~Block() {
- // TODO Auto-generated destructor stub
-}
View
10 block.h
@@ -1,10 +0,0 @@
-#ifndef BLOCK_H_
-#define BLOCK_H_
-
-class Block {
-public:
- Block(int block_size);
- ~Block();
-};
-
-#endif /* BLOCK_H_ */
View
@@ -17,10 +17,6 @@ Cache::Cache(int cache_size, int block_size, int set_size) {
this->set_n = this->cache_size / (this->set_size * this->block_size);
//TODO: Introduce blocks later
- for( int i=0; i<set_n; i++) {
- this->memory[i] = new Set(this->set_size, this->block_size);
- }
-
}
int Cache::get_hits(void) {
View
@@ -1,8 +1,6 @@
#ifndef CACHE_H
#define CACHE_H
-#include "set.h"
-
class Cache {
public:
Cache(int cache_size, int block_size, int set_size);
@@ -21,7 +19,7 @@ class Cache {
int hits;
int misses;
- Set** memory;
+ int* memory;
};
#endif
View
21 set.cpp
@@ -1,21 +0,0 @@
-/*
- * Set.cpp
- *
- * Created on: 21-Aug-2011
- * Author: gsiddardha
- */
-
-#include "Set.h"
-
-Set::Set(int set_size, int block_size) {
- this->set_size = set_size;
- this->block_size = block_size;
-
- for(int i=0; i<set_size; i++) {
- this->block[i] = new Block(block_size);
- }
-}
-
-Set::~Set() {
- // TODO Auto-generated destructor stub
-}
View
18 set.h
@@ -1,18 +0,0 @@
-#ifndef SET_H_
-#define SET_H_
-
-#include "block.h"
-
-class Set {
-public:
- Set();
- ~Set();
-
-private:
- int set_size;
- int block_size;
-
- Block** blocks;
-};
-
-#endif /* SET_H_ */

0 comments on commit 217989d

Please sign in to comment.