Skip to main content

//clika-runtime/io.clika.runtime/Ops/mod

mod

[common]
fun mod(input: Tensor, other: Tensor, mode: ModMode = ModMode.PYTHON): Tensor

mod(input: Tensor, other: Tensor, mode: ModMode = ModMode.PYTHON): the mod operator. Elementwise modulo with a selectable sign convention. ModMode::Python (default) follows the DIVISOR's sign; ModMode::C follows the DIVIDEND's. ops::remainder is exactly the Python form, ops::fmod exactly the C form. Broadcasts and promotes as add.

[common]
fun mod(input: Tensor, other: Double, mode: ModMode = ModMode.PYTHON): Tensor

mod(input: Tensor, other: Double, mode: ModMode = ModMode.PYTHON): the number form of mod, other as a scalar.