summaryrefslogtreecommitdiff
path: root/src/abstract_hardware_model.h
diff options
context:
space:
mode:
authorWilson Fung <[email protected]>2012-09-12 20:15:37 -0800
committerAndrew Boktor <[email protected]>2014-08-14 13:48:55 -0700
commit960a55b075be901ca14d1878f886bbea73456663 (patch)
tree2b6ce142fb94e49da208c9b0adf3381c834dc04e /src/abstract_hardware_model.h
parentb9f3352b362e0ea85134cd1e1b2d45322e2145c2 (diff)
Minor refactoring for the SIMT Stack implementation and fixing some indentation
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 14067]
Diffstat (limited to 'src/abstract_hardware_model.h')
-rw-r--r--src/abstract_hardware_model.h32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/abstract_hardware_model.h b/src/abstract_hardware_model.h
index 8a08501..3bde119 100644
--- a/src/abstract_hardware_model.h
+++ b/src/abstract_hardware_model.h
@@ -219,22 +219,6 @@ typedef std::bitset<MAX_WARP_SIZE> active_mask_t;
typedef std::bitset<MAX_WARP_SIZE_SIMT_STACK> simt_mask_t;
typedef std::vector<address_type> addr_vector_t;
-enum stack_entry_type {
- STACK_ENTRY_TYPE_NORMAL = 0,
- STACK_ENTRY_TYPE_CALL
-};
-
-struct simt_stack_entry {
- address_type m_pc;
- unsigned int m_calldepth;
- simt_mask_t m_active_mask;
- address_type m_recvg_pc;
- unsigned long long m_branch_div_cycle;
- stack_entry_type m_type;
- simt_stack_entry() :
- m_pc(-1), m_calldepth(0), m_active_mask(), m_recvg_pc(-1), m_branch_div_cycle(0), m_type(STACK_ENTRY_TYPE_NORMAL) { };
-};
-
class simt_stack {
public:
simt_stack( unsigned wid, unsigned warpSize);
@@ -252,6 +236,22 @@ protected:
unsigned m_warp_id;
unsigned m_warp_size;
+ enum stack_entry_type {
+ STACK_ENTRY_TYPE_NORMAL = 0,
+ STACK_ENTRY_TYPE_CALL
+ };
+
+ struct simt_stack_entry {
+ address_type m_pc;
+ unsigned int m_calldepth;
+ simt_mask_t m_active_mask;
+ address_type m_recvg_pc;
+ unsigned long long m_branch_div_cycle;
+ stack_entry_type m_type;
+ simt_stack_entry() :
+ m_pc(-1), m_calldepth(0), m_active_mask(), m_recvg_pc(-1), m_branch_div_cycle(0), m_type(STACK_ENTRY_TYPE_NORMAL) { };
+ };
+
std::deque<simt_stack_entry> m_stack;
};