tree_d_3d.kernels.pair_csr.pair_csr_pyccel
The Pyccel version (CPU) of the pair_csr kernel of the FMM.
pair_csr_numpy.py next to this file is the version for machines without Pyccel,
with the same arguments; the folder’s __init__.py declares the kernel (see
tree_d_3d.kernels).
Functions
| Name | Description |
|---|---|
pair_csr | Rows by node of pairs[:count]. |
pair_csrfunction#
def pair_csr(pairs: int64[:, :], count: int, mutual: int, row_start: int64[:], partner: int64[:], cursor: int64[:]) -> NoneRows by node of pairs[:count].
row_start (node_count + 1, zero on entry) becomes the offsets and
partner[row_start[n]:row_start[n + 1]] the partners of node n, in pair
order. With mutual nonzero, a pair (a, b) lists b under a and a
under b (once if a == b); otherwise b under a only. cursor
(node_count) is scratch.