Expand description
Metal and CUDA backends for silvic.
The kernels are written once (kernels/kernels.kern) against a small macro vocabulary that
kernels/prelude_metal.h and kernels/prelude_cuda.h define for Metal Shading Language and CUDA C++, and are
compiled at run time (Metal newLibraryWithSource, NVRTC). GpuBackend implements silvic_core::Backend once
over the GpuDevice primitives, so the Metal and CUDA backends differ only in their device layer.
Structs§
- GpuBackend
silvic_core::Backendover anyGpuDevice.
Enums§
- Arg
- A kernel argument. Buffer arguments bind at their position (Metal
[[buffer(i)]], CUDA positional parameter);Bytesis a#[repr(C)]parameter struct passed by value (MetalsetBytes, at most 4 KiB).
Traits§
Functions§
- kernel_
source - The complete kernel source for one API:
prelude, the shared capacities as#defines,common.handkernels.kern.