Skip to content
Projects

mpifield.kernels.scatter_quadratic_2d.scatter_quadratic_2d_metal

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

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

Functions

NameDescription
scatter_quadratic_2dQuadratic B-spline deposit of values (components, N) onto field on the GPU.

scatter_quadratic_2dfunction#

def scatter_quadratic_2d(positions: Array, values: Array, field: 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

Quadratic B-spline deposit of values (components, N) onto field on the GPU.