File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -53,30 +53,30 @@ class HostAccessor(Accessor):
53
53
54
54
def memory_range (self , dim ):
55
55
eval_string = "((" + str (self .obj .type ) + ")" + str (self .obj ) + ")->getMemoryRange()"
56
- return gdb .parse_and_eval (eval_string )["common_array" ][dim ];
56
+ return gdb .parse_and_eval (eval_string )["common_array" ][dim ]
57
57
58
58
def offset (self , dim ):
59
59
eval_string = "((" + str (self .obj .type ) + ")" + str (self .obj ) + ")->getOffset()"
60
- return gdb .parse_and_eval (eval_string )["common_array" ][dim ];
60
+ return gdb .parse_and_eval (eval_string )["common_array" ][dim ]
61
61
62
62
def data (self ):
63
63
eval_string = "((" + str (self .obj .type ) + ")" + str (self .obj ) + ")->getPtr()"
64
- return gdb .parse_and_eval (eval_string );
64
+ return gdb .parse_and_eval (eval_string )
65
65
66
66
class HostAccessorLocal (HostAccessor ):
67
67
"""For Host device memory layout"""
68
68
69
69
def memory_range (self , dim ):
70
70
eval_string = "((" + str (self .obj .type ) + ")" + str (self .obj ) + ")->getSize()"
71
- return gdb .parse_and_eval (eval_string )["common_array" ][dim ];
71
+ return gdb .parse_and_eval (eval_string )["common_array" ][dim ]
72
72
73
73
def index (self , arg ):
74
74
if arg .type .code == gdb .TYPE_CODE_INT :
75
75
return int (arg )
76
76
result = 0
77
77
for dim in range (self .depth ):
78
78
result = (
79
- result * self .memory_range () + arg ["common_array" ][dim ]
79
+ result * self .memory_range (dim ) + arg ["common_array" ][dim ]
80
80
)
81
81
return result
82
82
You can’t perform that action at this time.
0 commit comments