# tree_d_3d.kernels.quadtree_scatter.quadtree_scatter_metal

*module*

The Metal version (Apple-silicon GPU) of the ``quadtree_scatter`` kernel.

``quadtree_scatter_pyccel.py`` next to this file is the CPU version with the same
arguments. One thread per sorted slot, each writing its own target slot (the targets
are a permutation); integer only, so exact. See :mod:`tree_d_3d.kernels._metal`.

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

## tree_d_3d.kernels.quadtree_scatter.quadtree_scatter_metal.quadtree_scatter

*function*

```python
def quadtree_scatter(perm: Array, slot_node: Array, quadrant: Array, below: Array, node_start: Array, node_child: Array, new_perm: Array, new_slot_node: Array) -> None
```

Move every particle of a split node into its child, stably.

[View source](https://github.com/max-models/tree-d-3d/blob/devel/src/tree_d_3d/kernels/quadtree_scatter/quadtree_scatter_metal.py#L39-L59)
