Demo: Multiplicação de Matriz por Escalar

/usr/local/lib/python2.6/dist-packages/pycuda-0.93-py2.6-linux-x86_64.egg/pycuda/compiler.py:192: UserWarning: Reading 'lmem' from cubin failed--SourceModule metadata may be unavailable.
  warn("Reading '%s' from cubin failed--SourceModule metadata may be unavailable." % key)
/usr/local/lib/python2.6/dist-packages/pycuda-0.93-py2.6-linux-x86_64.egg/pycuda/compiler.py:192: UserWarning: Reading 'smem' from cubin failed--SourceModule metadata may be unavailable.
  warn("Reading '%s' from cubin failed--SourceModule metadata may be unavailable." % key)
/usr/local/lib/python2.6/dist-packages/pycuda-0.93-py2.6-linux-x86_64.egg/pycuda/compiler.py:192: UserWarning: Reading 'reg' from cubin failed--SourceModule metadata may be unavailable.
  warn("Reading '%s' from cubin failed--SourceModule metadata may be unavailable." % key)
Input image shape: (2048, 2048)

CPU:  9.514 ms
GPU: 13.450 ms
     memory allocation:  0.144
     copying to GPU:     3.676
     processing:         0.479
     copying from GPU:   9.150

>>> 0.0
[[ -8.83014321e-01  -4.89354461e-01   1.86427251e-01 ...,  -1.21940339e+00
    8.89727831e-01  -1.35003880e-01]
 [ -4.25251037e-01  -9.98283386e-01   8.90634358e-01 ...,  -3.34051937e-01
    1.41212016e-01  -4.73794162e-01]
 [ -1.60375810e+00  -1.59811437e-01   1.10097075e+00 ...,   8.44359457e-01
    5.87694585e-01   1.85315835e+00]
 ..., 
 [ -2.21461952e-01  -1.29625186e-01  -8.03773344e-01 ...,  -3.18305939e-02
   -4.09608662e-01   1.55922235e-03]
 [ -3.83083344e-01   8.74573290e-01   6.01026714e-01 ...,   1.43122566e+00
   -1.26992393e+00  -7.08273768e-01]
 [  3.12611669e-01  -1.45980895e+00  -3.66526484e-01 ...,  -2.08339006e-01
   -6.13252103e-01  -1.46634233e+00]]
[[ -1.76602864e+00  -9.78708923e-01   3.72854501e-01 ...,  -2.43880677e+00
    1.77945566e+00  -2.70007759e-01]
 [ -8.50502074e-01  -1.99656677e+00   1.78126872e+00 ...,  -6.68103874e-01
    2.82424033e-01  -9.47588325e-01]
 [ -3.20751619e+00  -3.19622874e-01   2.20194149e+00 ...,   1.68871891e+00
    1.17538917e+00   3.70631671e+00]
 ..., 
 [ -4.42923903e-01  -2.59250373e-01  -1.60754669e+00 ...,  -6.36611879e-02
   -8.19217324e-01   3.11844470e-03]
 [ -7.66166687e-01   1.74914658e+00   1.20205343e+00 ...,   2.86245131e+00
   -2.53984785e+00  -1.41654754e+00]
 [  6.25223339e-01  -2.91961789e+00  -7.33052969e-01 ...,  -4.16678011e-01
   -1.22650421e+00  -2.93268466e+00]]