Skip to content
Projects

mpifield.kernels.gather_linear_2d.gather_linear_2d_metal

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

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

Functions

NameDescription
gather_linear_2dBilinear interpolation of field (nx, ny, components) at the markers on the GPU.

gather_linear_2dfunction#

def gather_linear_2d(positions: Array, field: Array, result: Array, lower_x: float, lower_y: float, cell_size_x: float, cell_size_y: float, num_x: int, num_y: int, periodic_x: int, periodic_y: int) -> None

Bilinear interpolation of field (nx, ny, components) at the markers on the GPU.