diff options
| author | Wilson Fung <[email protected]> | 2012-11-21 19:32:45 -0800 |
|---|---|---|
| committer | Andrew Boktor <[email protected]> | 2014-08-14 13:49:22 -0700 |
| commit | e80d362d284e19f4c6415284fb0a1d5f4e85f6f8 (patch) | |
| tree | 715e4ae2abb3b77f7fc5d82c189637ec7cf8e1b7 /aerialvision/lexyacctexteditor.py | |
| parent | 6e0aab40706497ef4e3046d5614b0061f538f300 (diff) | |
Fixed .loc directive parsing for PC-Histogram (CFLog) in AerialVision.
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 14635]
Diffstat (limited to 'aerialvision/lexyacctexteditor.py')
| -rw-r--r-- | aerialvision/lexyacctexteditor.py | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/aerialvision/lexyacctexteditor.py b/aerialvision/lexyacctexteditor.py index 757a090..51d3ced 100644 --- a/aerialvision/lexyacctexteditor.py +++ b/aerialvision/lexyacctexteditor.py @@ -63,6 +63,7 @@ import sys +import re sys.path.insert(0,"Lib/site-packages/ply-3.2/ply-3.2") import ply.lex as lex import ply.yacc as yacc @@ -145,15 +146,11 @@ def ptxToCudaMapping(filename): except: map[loc] = [] map[loc].append(count) - try: - line.index('.loc') - try: - line.index('.local') - except: - lineList = line.split('\t') - loc = int(lineList[3]) - except: - pass + + m = re.search('\.loc\s+(\d+)\s+(\d+)\s+(\d+)', line) + if (m != None): + loc = int(m.group(2)) + count += 1 x = map.keys() return map |
