# tree_d_3d.kernels.cart_m2l_host.cart_m2l_host_pyccel

*module*

The Pyccel version (CPU) of the ``cart_m2l_host`` kernel of the Coulomb FMM.

``cart_m2l_host_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/cart_m2l_host/cart_m2l_host_pyccel.py#L1-L1)

## tree_d_3d.kernels.cart_m2l_host.cart_m2l_host_pyccel.cart_m2l_host

*function*

```python
def cart_m2l_host(row_start: int64[:], sources: int64[:], dst_center: float[:, :], src_center: float[:, :], moments: float[:, :], softening: float, ex: int64[:], ey: int64[:], rec: int64[:, :], m2l: int64[:, :], m2l_coef: float[:], local: float[:, :]) -> None
```

Add the expansions of cells ``sources[row_start[n]:row_start[n + 1]]`` to cell ``n``.

For ``t = c_dst - c_src`` the Taylor coefficients ``A_g(t)`` of the softened kernel
follow from the recurrence on ``rec``; then ``T_b += m2l_coef * m_a * A_g`` over the
rows ``(b, a, g)`` of ``m2l``. Each destination cell is written by its own row only
(chunks of 64 cells share their scratch).

[View source](https://github.com/max-models/tree-d-3d/blob/devel/src/tree_d_3d/kernels/cart_m2l_host/cart_m2l_host_pyccel.py#L16-L80)
