skcuda.misc.mult_matvec¶
-
skcuda.misc.
mult_matvec
(x_gpu, a_gpu, axis=None, out=None, stream=None)[source]¶ Multiplies a vector elementwise with each column/row of the matrix.
The numpy broadcasting rules apply so this would yield the same result as x_gpu.get() * a_gpu.get() in host-code.
Parameters: - x_gpu (pycuda.gpuarray.GPUArray) – Matrix to multiply by the vector a_gpu.
- a_gpu (pycuda.gpuarray.GPUArray) – The matrix x_gpu will be multiplied by this vector.
- axis (int (optional)) – The axis on which multiplication occurs. By default this is determined automatically by using the first axis with the correct dimensionality.
- out (pycuda.gpuarray.GPUArray (optional)) – Optional destination matrix.
- stream (pycuda.driver.Stream (optional)) – Optional Stream in which to perform this calculation.
Returns: out – result of x_gpu * a_gpu
Return type: