We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5af4fc4 commit d886e84Copy full SHA for d886e84
examples/transpose.py
@@ -1,13 +1,15 @@
1
"""
2
-Rambo benchmark
+Transpose benchmark
3
+
4
+ Matrix transpose benchmark for sharpy and numpy backends.
5
6
Examples:
7
- # run 1000 iterations of 10 events and 100 outputs on sharpy backend
- 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
10
11
# MPI parallel run
- 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
13
14
15
@@ -43,7 +45,7 @@ def sp_transpose(arr):
43
45
44
46
47
def np_transpose(arr):
- return arr.transpose()
48
+ return numpy.ravel(arr.transpose()).reshape(arr.shape)
49
50
51
def initialize(np, row, col, dtype):
0 commit comments