# tree_d_3d.kernels.quadtree_quadrants.quadtree_quadrants_metal

*module*

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

``quadtree_quadrants_pyccel.py`` next to this file is the CPU version with the same
arguments. One thread per sorted slot; see :mod:`tree_d_3d.kernels._metal`. ``pos`` is
``(2, N)`` (component-major). Positions are compared with the node centres in float32, so a particle within about 1e-7 of a
centre line can fall into the other quadrant than on the CPU.

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

## tree_d_3d.kernels.quadtree_quadrants.quadtree_quadrants_metal.quadtree_quadrants

*function*

```python
def quadtree_quadrants(pos: Array, perm: Array, slot_node: Array, node_center: Array, node_child: Array, quadrant: Array) -> None
```

The child quadrant of every sorted particle (-1: its node does not split).

[View source](https://github.com/max-models/tree-d-3d/blob/devel/src/tree_d_3d/kernels/quadtree_quadrants/quadtree_quadrants_metal.py#L36-L46)
