sys-sage
Loading...
Searching...
No Matches
cccbench.hpp
1#ifndef CCCBENCH_PARSER
2#define CCCBENCH_PARSER
3
4#include <vector>
5
6#include "enums.hpp"
7
8#include "Component.hpp"
9#include "Node.hpp"
10
11
12
13
14namespace sys_sage {
15 int parseCccbenchOutput(Node* , std::string );
16
17 template <typename T>class Vec2DArray
18 {
19 Vec2DArray(){}
20 std::vector<T> *array;
21 unsigned int size, xdim, ydim;
22 public:
23 Vec2DArray(unsigned xdim, unsigned ydim);
24 std::vector<T> *operator [](unsigned int xindex);
25 };
26
27 template <typename T>Vec2DArray<T>::Vec2DArray(unsigned int _xdim, unsigned int _ydim)
28 {
29 this->size = _xdim * _ydim;
30 this->xdim = _xdim;
31 this->ydim = _ydim;
32 this->array = new std::vector<T> [this->size];
33 }
34
35 template <typename T>std::vector<T> *Vec2DArray<T>::operator [](unsigned int xindex)
36 {
37 return &(this->array[this->xdim*xindex]);
38 }
39
41 unsigned int firstCore;
42 unsigned int lastCore;
43 unsigned int lines;
44 const char *metric_name = "xylat";
45 const char *xcore_name = "xcore";
46 const char *ycore_name = "ycore";
47 Vec2DArray<float> *c2cDatapoints;
48 CccbenchParser():c2cDatapoints((Vec2DArray<float> *)0){}
49 public:
50 virtual ~CccbenchParser(){if(this->c2cDatapoints) {delete [] c2cDatapoints;}}
51 unsigned int xtoi(unsigned int _x){return _x - this->firstCore;}
52 unsigned int ytoi(unsigned int _y){return _y - this->firstCore;}
53 CccbenchParser(const char *csv_path);
54 void applyDataPaths(Component *root);
55 };
56
57} //namespace sys_sage
58#endif
Definition cccbench.hpp:40
Generic class for all hardware and logical components in sys-sage.
Definition Component.hpp:36
Definition cccbench.hpp:18