brainevent.binary_csrmv_indexed

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 gather data[perm] is fused into the scatter kernel so that only weights of active rows/columns are read. For homogeneous weights (data.size == 1) perm is 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 slot j to the canonical weight index perm[j]. Shape (nse,) with the same integer dtype as indices.

  • v (Array | ndarray | Quantity | Number) – Dense event vector. Shape (shape[0],) when transpose=True or (shape[1],) when transpose=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, and status attributes.

  • transpose (bool) – If True, compute the transposed (scatter) product. Default False.

  • backend (str | None) – Compute backend. Default None (auto-select).

Returns:

y – Result vector, preserving units of data and v.

Return type:

Array | ndarray | Quantity | Number

See also

brainevent._csr.binary.binary_csrmv

The non-indexed event-driven product.