summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew M. B. Boktor <[email protected]>2011-10-06 09:03:00 -0800
committerAndrew Boktor <[email protected]>2014-08-14 13:18:23 -0700
commit258ad919a4d584a665c1b1d40d7c5e00831d7288 (patch)
tree23599f71109297083e4481bd1c11230f541f53c5 /src
parent7d16063813977f8aab4e01ff754c046eb12b6262 (diff)
Integrated 9556:
Fixed gpu_sim_cycle for sequential kernels. Now it resets after each kernel launch [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 10547]
Diffstat (limited to 'src')
-rw-r--r--src/gpgpusim_entrypoint.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gpgpusim_entrypoint.cc b/src/gpgpusim_entrypoint.cc
index ba3b9aa..add9a22 100644
--- a/src/gpgpusim_entrypoint.cc
+++ b/src/gpgpusim_entrypoint.cc
@@ -87,7 +87,7 @@ bool g_sim_done = true;
void *gpgpu_sim_thread_concurrent(void*)
{
// concurrent kernel execution simulation thread
- g_the_gpu->init();
+
do {
if(g_debug_execution >= 3) {
printf("GPGPU-Sim: *** simulation thread starting and spinning waiting for work ***\n");
@@ -105,6 +105,7 @@ void *gpgpu_sim_thread_concurrent(void*)
pthread_mutex_unlock(&g_sim_lock);
bool active = false;
bool sim_cycles = false;
+ g_the_gpu->init();
do {
// check if a kernel has completed
unsigned grid_uid = g_the_gpu->finished_kernel();
@@ -202,7 +203,7 @@ void start_sim_thread(int api)
{
if( g_sim_done ) {
g_sim_done = false;
- if( g_the_gpu_config.get_max_concurrent_kernel() > 1 && api == 1 ) {
+ if( api == 1 ) {
pthread_create(&g_simulation_thread,NULL,gpgpu_sim_thread_concurrent,NULL);
} else {
pthread_create(&g_simulation_thread,NULL,gpgpu_sim_thread_sequential,NULL);