Computing a sketch : sparse data
-
template<typename T, SparseMatrix SpMat, typename RNG>
inline void RandBLAS::sketch_sparse(blas::Layout layout, blas::Op opS, blas::Op opA, int64_t d, int64_t n, int64_t m, T alpha, DenseSkOp<T, RNG> &S, int64_t ro_s, int64_t co_s, SpMat &A, int64_t ro_a, int64_t co_a, T beta, T *B, int64_t ldb) Sketch from the left in an SpMM-like operation
\[\operatorname{mat}(B) = \alpha \cdot \underbrace{\operatorname{op}(\operatorname{submat}(S))}_{d \times m} \cdot \underbrace{\operatorname{op}(\operatorname{submat}(A))}_{m \times n} + \beta \cdot \underbrace{\operatorname{mat}(B)}_{d \times n}, \tag{$\star$}\]where \(\alpha\) and \(\beta\) are real scalars, \(\operatorname{op}(X)\) either returns a matrix \(X\) or its transpose, \(A\) is a sparse matrix, and \(S\) is a dense sketching operator.
-
template<typename T, SparseMatrix SpMat, typename RNG>
inline void RandBLAS::sketch_sparse(blas::Layout layout, blas::Op opA, blas::Op opS, int64_t m, int64_t d, int64_t n, T alpha, SpMat &A, int64_t ro_a, int64_t co_a, DenseSkOp<T, RNG> &S, int64_t ro_s, int64_t co_s, T beta, T *B, int64_t ldb) Sketch from the right in an SpMM-like operation
\[\operatorname{mat}(B) = \alpha \cdot \underbrace{\operatorname{op}(\operatorname{submat}(A))}_{m \times n} \cdot \underbrace{\operatorname{op}(\operatorname{submat}(S))}_{n \times d} + \beta \cdot \underbrace{\operatorname{mat}(B)}_{m \times d}, \tag{$\star$}\]where \(\alpha\) and \(\beta\) are real scalars, \(\operatorname{op}(X)\) either returns a matrix \(X\) or its transpose, \(A\) is a sparse matrix, and \(S\) is a dense sketching operator.