warp.static#
- warp.static(expr)[source]#
Evaluates a static expression and replaces the expression with its result.
- Parameters:
expr – A Python expression to evaluate. Must return a non-null value which must be either a Warp function, a string, or a type that is supported inside Warp kernels and functions (excluding Warp arrays since they cannot be created in a Warp kernel at the moment).
Note
The inner expression must only reference variables that are available from the current scope where the Warp kernel or function containing the expression is defined, which includes constant variables and variables captured in the current closure in which the function or kernel is implemented.