warp.Scalar#

warp.Scalar#

Generic annotation for any Warp integer or floating-point scalar type.

Use Scalar to annotate parameters of generic Warp kernels and functions, either directly or as the dtype of a generic array, vector, or matrix. Scalar matches the types that Int and Float match:

bool doesn’t match Scalar.

For more on writing generic kernels and functions with Scalar, see Generic Type Annotations.