warp.fem.cache.dynamic_kernel#

warp.fem.cache.dynamic_kernel(suffix, kernel_options=None, allow_overloads=False)[source]#

Return a decorator that caches a specialized wp.Kernel.

Parameters:
  • suffix (Any) – Hashable key used to specialize and cache the kernel.

  • kernel_options (dict[str, Any] | None) – Optional kernel options merged into the generated module.

  • allow_overloads – Whether to include argument types in the cache key.

Returns:

A decorator that registers and returns a cached wp.Kernel.