# tree_d_3d.kernels.evaluate_quadtree.evaluate_quadtree_metal

*module*

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

``evaluate_quadtree_pyccel.py`` next to this file is the CPU version with the same
arguments. One thread per target, each walking the tree with a stack in thread
memory (the ``stack`` argument is the CPU's scratch and unused here); a tree too
deep for it reports status -1. See :mod:`tree_d_3d.kernels._metal`.

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

## tree_d_3d.kernels.evaluate_quadtree.evaluate_quadtree_metal.evaluate_quadtree

*function*

```python
def evaluate_quadtree(targets: Array, exclude: Array, pos: Array, charge: Array, perm: Array, node_center: Array, node_half: Array, node_start: Array, node_end: Array, node_child: Array, node_q: Array, node_qabs: Array, node_p: Array, node_s: Array, theta: float, softening: float, stack: Array, phi: Array, field: Array, status: Array) -> None
```

Barnes-Hut potential and field with dipole and quadrupole cells on the GPU.

[View source](https://github.com/max-models/tree-d-3d/blob/devel/src/tree_d_3d/kernels/evaluate_quadtree/evaluate_quadtree_metal.py#L115-L158)
