src/hmmmr/batched_functions.py
def massive_vector_sums(As_gpu, handle=None):
    """
    Uses matrix multiplication to compute the sum of each individual vector
    :param As_gpu: Array of m vectors of n elements (in reality matrices Nx1) matrices
    :param handle: pycuda handle
    :return: Array of matrices (1x1) containing the sum of each vector
    """
    handle = handle if handle else cublas.cublasCreate()
    ones_shape = (As_gpu.shape[0], As_gpu.shape[2], As_gpu.shape[1])
    ones = np.ones(ones_shape, As_gpu.dtype)
    ones_gpu = gpuarray.to_gpu(ones.astype(ones.dtype))
    return massive_product_row_major(handle, ones_gpu, As_gpu)

    Uses matrix multiplication to compute the sum of each individual vector
    :param As_gpu: Array of m vectors of n elements (in reality matrices Nx1) matrices
    :param handle: pycuda handle
    :return: Array of matrices (1x1) containing the sum of each vector
    
Uses matrix multiplication to compute the sum of each individual vector
Uses matrix multiplication to compute the sum of each individual vector
def massive_vector_sums(As_gpu, handle=None):
    handle = handle if handle else cublas.cublasCreate()
    ones_shape = (As_gpu.shape[0], As_gpu.shape[2], As_gpu.shape[1])
    ones = np.ones(ones_shape, As_gpu.dtype)
    ones_gpu = gpuarray.to_gpu(ones.astype(ones.dtype))
    return massive_product_row_major(handle, ones_gpu, As_gpu)
def massive_vector_sums ( As_gpu , handle = None ) : handle = handle if handle else cublas . cublasCreate ( ) ones_shape = ( As_gpu . shape [ 0 ] , As_gpu . shape [ 2 ] , As_gpu . shape [ 1 ] ) ones = np . ones ( ones_shape , As_gpu . dtype ) ones_gpu = gpuarray . to_gpu ( ones . astype ( ones . dtype ) ) return massive_product_row_major ( handle , ones_gpu , As_gpu )
Uses matrix multiplication to compute the sum of each individual vector
Uses matrix multiplication to compute the sum of each individual vector
"""
    Uses matrix multiplication to compute the sum of each individual vector
    :param As_gpu: Array of m vectors of n elements (in reality matrices Nx1) matrices
    :param handle: pycuda handle
    :return: Array of matrices (1x1) containing the sum of each vector
    """
Array of matrices (1x1) containing the sum of each vector
Array of matrices ( 1x1 ) containing the sum of each vector
As_gpu
Array of m vectors of n elements (in reality matrices Nx1) matrices
Array of m vectors of n elements ( in reality matrices Nx1 ) matrices
handle
None