warp.fem.cache.dynamic_func#

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

Return a decorator that caches a specialized wp.Function.

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

  • code_transformers – Optional list of code transformers applied during code generation.

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

Returns:

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