warp.build_experimental.add_builtin#
- warp.build_experimental.add_builtin(
- name,
- input_types=None,
- value_type=None,
- *,
- native_name=None,
- doc='',
Register an external C++ function for use in Warp kernels.
Experimental: this API may change without deprecation in future releases.
The registered function is available in kernels as
warp.<name>. Calling it directly from Python is not supported.- Parameters:
name (str) – Name used to call the function from Warp kernels.
input_types (Mapping[str, type] | None) – Ordered mapping from parameter names to Warp types.
value_type (type | None) – Warp return type, or
Nonefor a function returningvoid.native_name (str | None) – Exact qualified C++ function name. When omitted,
wp::<name>is used.doc (str) – Description of the function.
- Returns:
The canonical Warp function containing the registered overload.
- Return type: