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 11"""
2- Rambo benchmark
2+ Transpose benchmark
3+
4+ Matrix transpose benchmark for sharpy and numpy backends.
35
46Examples:
57
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
810
911 # 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
1113
1214"""
1315
@@ -43,7 +45,7 @@ def sp_transpose(arr):
4345
4446
4547def np_transpose (arr ):
46- return arr .transpose ()
48+ return numpy . ravel ( arr .transpose ()). reshape ( arr . shape )
4749
4850
4951def initialize (np , row , col , dtype ):
You can’t perform that action at this time.
0 commit comments