warp.ref#

class warp.ref[source]#

Pass-by-reference parameter annotation: warp.ref[T].

Annotate a @warp.func or @warp.func_native parameter as warp.ref[T] to receive an addressable argument by reference. Mutations to the parameter are visible in the caller’s storage without a return value.

Accepted argument expressions at call sites include local variables, reference parameters, array elements, struct fields, and vector/matrix/quaternion/transform components. Literals, arithmetic temporaries, and function-call results are rejected at compile time.

warp.ref[T] is not allowed in @warp.kernel signatures; pass addressable values into helper functions instead.

__init__()#

Methods