summaryrefslogtreecommitdiff
path: root/src/abstract_hardware_model.cc
diff options
context:
space:
mode:
authorTor Aamodt <[email protected]>2010-12-28 17:25:52 -0800
committerTor Aamodt <[email protected]>2010-12-28 17:25:52 -0800
commit47afff48be8f59c6cfcb86eded3a337b63130b18 (patch)
tree5cc3510b8712c5846741a370c73d0db6dfdd8693 /src/abstract_hardware_model.cc
parente7b3dd442fceb30eaa8008d97429a1d33dad2044 (diff)
- parameter memory and active threads now part of kernel_info_t:
Parameters are finalized at kernel launch, which means the contents of parameter memory are initialized. Kernel arguement names have a fixed order, hence same address should be assigned on subsequent kernel launches of same kernel in other streams provided the data size param_t::size of arguments for each kernel launch is identical (an assertion has been added to check this is true). - passing regression [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 8303]
Diffstat (limited to 'src/abstract_hardware_model.cc')
-rw-r--r--src/abstract_hardware_model.cc20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/abstract_hardware_model.cc b/src/abstract_hardware_model.cc
index f779e3d..e883455 100644
--- a/src/abstract_hardware_model.cc
+++ b/src/abstract_hardware_model.cc
@@ -52,7 +52,6 @@ gpgpu_t::gpgpu_t( const gpgpu_functional_sim_config &config )
: m_function_model_config(config)
{
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);
@@ -310,6 +309,25 @@ void warp_inst_t::generate_mem_accesses()
unsigned kernel_info_t::m_next_uid = 1;
+kernel_info_t::kernel_info_t( dim3 gridDim, dim3 blockDim, class function_info *entry )
+{
+ m_kernel_entry=entry;
+ m_grid_dim=gridDim;
+ m_block_dim=blockDim;
+ m_next_cta.x=0;
+ m_next_cta.y=0;
+ m_next_cta.z=0;
+ m_next_tid=m_next_cta;
+ m_num_cores_running=0;
+ m_uid = m_next_uid++;
+ m_param_mem = new memory_space_impl<8192>("param",64*1024);
+}
+
+kernel_info_t::~kernel_info_t()
+{
+ assert( m_active_threads.empty() );
+ delete m_param_mem;
+}
std::string kernel_info_t::name() const
{