summaryrefslogtreecommitdiff
path: root/src/cuda-sim/cuda-sim.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/cuda-sim/cuda-sim.cc')
-rw-r--r--src/cuda-sim/cuda-sim.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/cuda-sim/cuda-sim.cc b/src/cuda-sim/cuda-sim.cc
index 80aa60b..c28f1a0 100644
--- a/src/cuda-sim/cuda-sim.cc
+++ b/src/cuda-sim/cuda-sim.cc
@@ -904,9 +904,10 @@ unsigned datatype2size( unsigned data_type )
void init_inst_classification_stat()
{
- static bool init=false;
- if( init ) return;
- init=true;
+ static std::set<unsigned> init;
+ if( init.find(g_ptx_kernel_count) != init.end() )
+ return;
+ init.insert(g_ptx_kernel_count);
char kernelname[256] ="";
#define MAX_CLASS_KER 1024
if (!g_inst_classification_stat) g_inst_classification_stat = (void**)calloc(MAX_CLASS_KER, sizeof(void*));