# mpifield.kernels.gather_linear_1d.gather_linear_1d_metal

*module*

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

``gather_linear_1d_pyccel.py`` next to this file is the CPU version with the same
arguments. One thread per marker (``positions`` ``(1, N)``, ``result`` ``(components, N)``); see :mod:`mpifield.kernels._metal_grid`.

[View source](https://github.com/max-models/mpifield/blob/devel/src/mpifield/kernels/gather_linear_1d/gather_linear_1d_metal.py#L1-L1)

## mpifield.kernels.gather_linear_1d.gather_linear_1d_metal.gather_linear_1d

*function*

```python
def gather_linear_1d(positions: Array, field: Array, result: Array, lower_x: float, cell_size_x: float, num_x: int, periodic_x: int) -> None
```

Interpolate ``field`` (nx, components) at the markers into ``result`` (components, N).

[View source](https://github.com/max-models/mpifield/blob/devel/src/mpifield/kernels/gather_linear_1d/gather_linear_1d_metal.py#L38-L53)
