summaryrefslogtreecommitdiff
path: root/src/abstract_hardware_model.cc
blob: b943a7615329d97a66a1f39034c100ebacbe0b04 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include "abstract_hardware_model.h"
#include "cuda-sim/memory.h"
#include <algorithm>

unsigned mem_access_t::next_access_uid = 0;   

void move_warp( warp_inst_t *&dst, warp_inst_t *&src )
{
   assert( dst->empty() );
   warp_inst_t* temp = dst;
   dst = src;
   src = temp;
   src->clear();
}

gpgpu_t::gpgpu_t()
{
   m_global_mem = new memory_space_impl<8192>("global",64*1024);
   m_param_mem = new memory_space_impl<8192>("param",64*1024);
   m_tex_mem = new memory_space_impl<8192>("tex",64*1024);
   m_surf_mem = new memory_space_impl<8192>("surf",64*1024);

   m_dev_malloc=GLOBAL_HEAP_START; 
}

void warp_inst_t::sort_accessq( unsigned qbegin )
{
    std::stable_sort( m_accessq.begin()+qbegin,m_accessq.end());
}