aboutsummaryrefslogtreecommitdiff
path: root/src/gpgpu-sim/traffic_breakdown.h
diff options
context:
space:
mode:
authorNick <[email protected]>2019-09-13 07:48:08 -0400
committerNick <[email protected]>2019-09-13 07:48:08 -0400
commit9b1e6dba9f721c772e801abc4851a88aa61929da (patch)
treeed12425be898e85e01e7a3997a9b8d5efba6ef50 /src/gpgpu-sim/traffic_breakdown.h
parent5c99f0fa58caf45f4d457894413aa11c03afdb7d (diff)
Revert "Add src/gpgpu-sim formatting"
This reverts commit 9c9b1341613e767f306b2b73b5b8a5317b6ee563.
Diffstat (limited to 'src/gpgpu-sim/traffic_breakdown.h')
-rw-r--r--src/gpgpu-sim/traffic_breakdown.h48
1 files changed, 25 insertions, 23 deletions
diff --git a/src/gpgpu-sim/traffic_breakdown.h b/src/gpgpu-sim/traffic_breakdown.h
index a898519..c9b8df5 100644
--- a/src/gpgpu-sim/traffic_breakdown.h
+++ b/src/gpgpu-sim/traffic_breakdown.h
@@ -1,35 +1,37 @@
-#pragma once
+#pragma once
#include <stdio.h>
#include <map>
-#include <string>
+#include <string>
// Breakdown traffic through the network according to category
-class traffic_breakdown {
- public:
- traffic_breakdown(const std::string& network_name)
- : m_network_name(network_name) {}
+class traffic_breakdown
+{
+public:
+ traffic_breakdown(const std::string &network_name)
+ : m_network_name(network_name)
+ { }
- // print the stats
- void print(FILE* fout);
+ // print the stats
+ void print(FILE* fout);
- // record the amount and type of traffic introduced by this mem_fetch object
- void record_traffic(class mem_fetch* mf, unsigned int size);
+ // record the amount and type of traffic introduced by this mem_fetch object
+ void record_traffic(class mem_fetch * mf, unsigned int size);
- protected:
- std::string m_network_name;
+protected:
- /// helper functions to identify the type of traffic sent
- std::string classify_memfetch(class mem_fetch* mf);
+ std::string m_network_name;
- /// helper functions to identify the size of traffic sent
- unsigned int packet_size(class mem_fetch* mf);
+ /// helper functions to identify the type of traffic sent
+ std::string classify_memfetch(class mem_fetch * mf);
- typedef std::string
- mf_packet_type; // use string so that it remains extensible
- typedef unsigned int mf_packet_size;
- typedef std::map<mf_packet_size, unsigned int> traffic_class_t;
- typedef std::map<mf_packet_type, traffic_class_t> traffic_stat_t;
+ /// helper functions to identify the size of traffic sent
+ unsigned int packet_size(class mem_fetch * mf);
- traffic_stat_t m_stats;
-};
+ typedef std::string mf_packet_type; // use string so that it remains extensible
+ typedef unsigned int mf_packet_size;
+ typedef std::map < mf_packet_size, unsigned int > traffic_class_t;
+ typedef std::map < mf_packet_type, traffic_class_t > traffic_stat_t;
+
+ traffic_stat_t m_stats;
+};