# tree_d_3d.kernels.pair_csr.pair_csr_pyccel

*module*

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`).

[View source](https://github.com/max-models/tree-d-3d/blob/devel/src/tree_d_3d/kernels/pair_csr/pair_csr_pyccel.py#L1-L1)

## tree_d_3d.kernels.pair_csr.pair_csr_pyccel.pair_csr

*function*

```python
def pair_csr(pairs: int64[:, :], count: int, mutual: int, row_start: int64[:], partner: int64[:], cursor: int64[:]) -> None
```

Rows 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.

[View source](https://github.com/max-models/tree-d-3d/blob/devel/src/tree_d_3d/kernels/pair_csr/pair_csr_pyccel.py#L12-L45)
