diff options
| author | sspenst <[email protected]> | 2016-06-13 01:08:36 -0700 |
|---|---|---|
| committer | sspenst <[email protected]> | 2016-06-13 01:08:36 -0700 |
| commit | 547ce656018a6439e658be3c283721a961b0217f (patch) | |
| tree | cbd81e6b3d3fdee79ce9f934fe4c92a5c984cc36 /src/cuda-sim/cuda-sim.cc | |
| parent | 7356669b66425ee73ba61466f37fe25b886a3641 (diff) | |
If ptxas notices any duplicate errors, they now automatically get resolved and the program continues with the duplicate function/variable declarations removed.
Diffstat (limited to 'src/cuda-sim/cuda-sim.cc')
| -rw-r--r-- | src/cuda-sim/cuda-sim.cc | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/cuda-sim/cuda-sim.cc b/src/cuda-sim/cuda-sim.cc index 15417d1..fba3a59 100644 --- a/src/cuda-sim/cuda-sim.cc +++ b/src/cuda-sim/cuda-sim.cc @@ -1864,10 +1864,14 @@ unsigned translate_pc_to_ptxlineno(unsigned pc) // ptxinfo parser +extern std::map<unsigned,const char*> get_duplicate(); + int g_ptxinfo_error_detected; static char *g_ptxinfo_kname = NULL; static struct gpgpu_ptx_sim_info g_ptxinfo; +static std::map<unsigned,const char*> g_duplicate; +static const char *g_last_dup_type; const char *get_ptxinfo_kname() { @@ -1897,6 +1901,21 @@ struct gpgpu_ptx_sim_info get_ptxinfo() return g_ptxinfo; } +std::map<unsigned,const char*> get_duplicate() +{ + return g_duplicate; +} + +void ptxinfo_linenum( unsigned linenum ) +{ + g_duplicate[linenum] = g_last_dup_type; +} + +void ptxinfo_dup_type( const char *dup_type ) +{ + g_last_dup_type = dup_type; +} + void ptxinfo_function(const char *fname ) { clear_ptxinfo(); |
