Skip to content
fn

trunc_op

int trunc_op(const int & a)

Python wrappers

Public Python APIs implemented by this engine symbol.

Element-wise truncation toward zero; same shape, dtype and device as a. Differentiable with a zero gradient, as the reference keeps it.

See Also

floor_op, ceil_op, frac_op.