brainevent.binary_csrmm_indexed#
- brainevent.binary_csrmm_indexed = <NameScope(brainevent.binary_csrmm_indexed)>#
Event-driven CSR matrix-matrix product with a fused weight gather index.
Equivalent to
binary_csrmm(data[perm], indices, indptr, B, ...)for heterogeneous weights, but the gatherdata[perm]is fused into the scatter kernel so only weights of active rows/columns are read. For homogeneous weights (data.size == 1)permis ignored.- Parameters:
data (
Array|ndarray|Quantity|Number) – Non-zero weights in canonical order. Shape(nse,)(heterogeneous) or(1,)(homogeneous).indices (
Array|ndarray) – Secondary-axis indices of the traversed (transposed) structure, shape(nse,), integer dtype.indptr (
Array|ndarray) – Pointer array of the traversed structure, shape(shape[0] + 1,).perm (
Array|ndarray) – Permutation mapping structural slotjto canonical weight indexperm[j], shape(nse,), same integer dtype asindices.B (
Array|ndarray|Quantity|Number) – Dense event matrix. Shape(shape[0], n)whentranspose=Trueor(shape[1], n)whentranspose=False. Boolean or floating dtype.shape (
Tuple[int,int]) – Logical(m, k)of the traversed structure.transpose (
bool) – IfTruecompute the transposed (scatter) product. DefaultFalse.backend (
str|None) – Compute backend. DefaultNone(auto-select).
- Returns:
C – Result matrix, preserving units of
dataandB. Shape(shape[1], n)whentranspose=Trueor(shape[0], n).- Return type:
Array|ndarray|Quantity|Number
See also
brainevent._csr.binary.binary_csrmmThe non-indexed event-driven product.
brainevent._csr.binary_indexed.binary_csrmv_indexedThe matvec analog.