File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 1
1
"""
2
- Rambo benchmark
2
+ Transpose benchmark
3
+
4
+ Matrix transpose benchmark for sharpy and numpy backends.
3
5
4
6
Examples:
5
7
6
- # run 1000 iterations of 10 events and 100 outputs on sharpy backend
7
- python rambo .py -nevts 10 -nout 100 -b sharpy -i 1000
8
+ # Run 1000 iterations of 1000*1000 matrix on sharpy backend
9
+ python transpose .py -r 10 -c 1000 -b sharpy -i 1000
8
10
9
11
# MPI parallel run
10
- mpiexec -n 3 python rambo .py -nevts 64 -nout 64 -b sharpy -i 1000
12
+ mpiexec -n 3 python transpose .py -r 1000 -c 1000 -b sharpy -i 1000
11
13
12
14
"""
13
15
@@ -43,7 +45,7 @@ def sp_transpose(arr):
43
45
44
46
45
47
def np_transpose (arr ):
46
- return arr .transpose ()
48
+ return numpy . ravel ( arr .transpose ()). reshape ( arr . shape )
47
49
48
50
49
51
def initialize (np , row , col , dtype ):
You can’t perform that action at this time.
0 commit comments