# tree_d_3d.kernels.soften_pairs.soften_pairs_metal

*module*

The Metal version (Apple-silicon GPU, float32) of the ``soften_pairs`` kernel.

``soften_pairs_pyccel.py`` next to this file is the CPU version with the same
arguments. One thread per pair adds into zeroed atomic float32 delta arrays (see
:mod:`tree_d_3d.kernels._metal_atomic`); the host adds those to ``phi`` and ``field`` in
float64. A pair at zero separation sets ``status[0]`` to its index + 1 (the first
such pair; the other pairs are still applied).

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

## tree_d_3d.kernels.soften_pairs.soften_pairs_metal.soften_pairs

*function*

```python
def soften_pairs(pos: Array, charge: Array, pairs: Array, eps2: float, with_potential: int, phi: Array, field: Array, status: Array) -> None
```

Add the softened-minus-bare kernel of the listed pairs to both partners.

[View source](https://github.com/max-models/tree-d-3d/blob/devel/src/tree_d_3d/kernels/soften_pairs/soften_pairs_metal.py#L51-L78)
