brainevent.binary_csrmv_indexed#
- brainevent.binary_csrmv_indexed = <NameScope(brainevent.binary_csrmv_indexed)>#
Event-driven CSR matrix-vector product with a fused weight gather index.
Equivalent to
binary_csrmv(data[perm], indices, indptr, v, ...)for heterogeneous weights, but the gatherdata[perm]is fused into the scatter kernel so that only weights of active rows/columns are read. For homogeneous weights (data.size == 1)permis ignored.- Parameters:
data (
Array|ndarray|Quantity|Number) – Non-zero weight values in their canonical order. Shape(nse,)for heterogeneous weights or(1,)for a homogeneous weight.indices (
Array|ndarray) – Secondary-axis indices of the (transposed) structure being traversed. Shape(nse,)with integer dtype.indptr (
Array|ndarray) – Pointer array of the traversed structure. Shape(shape[0] + 1,).perm (
Array|ndarray) – Permutation mapping structural slotjto the canonical weight indexperm[j]. Shape(nse,)with the same integer dtype asindices.v (
Array|ndarray|Quantity|Number) – Dense event vector. Shape(shape[0],)whentranspose=Trueor(shape[1],)whentranspose=False. Boolean or floating dtype.shape (
Tuple[int,int]) – Logical shape(m, k)of the traversed structure.workspace – Explicit binary task workspace with
task_capacity,task_begin,task_end, andstatusattributes.transpose (
bool) – IfTrue, compute the transposed (scatter) product. DefaultFalse.backend (
str|None) – Compute backend. DefaultNone(auto-select).
- Returns:
y – Result vector, preserving units of
dataandv.- Return type:
Array|ndarray|Quantity|Number
See also
brainevent._csr.binary.binary_csrmvThe non-indexed event-driven product.