Skip to main content

Module opcode

Module opcode 

Source
Available on crate feature bytecode only.
Expand description

Bytecode opcodes for the bytecode tape.

Each opcode represents an elementary operation. The eval_forward and reverse_partials functions evaluate / differentiate a single opcode.

Enums§

OpCode
Elementary operation codes for the bytecode tape.

Constants§

UNUSED
Sentinel used in arg_indices[1] for unary ops (the second argument slot is unused).

Functions§

eval_forward
Evaluate a single opcode in the forward direction.
forced_reverse_partials
Compute reverse-mode partials with a forced branch choice for nonsmooth ops.
has_nontrivial_subdifferential
Returns true if forced branch choices produce distinct partial derivatives.
is_nonsmooth
Returns true if this opcode is a nonsmooth operation.
powi_exp_decode_raw
Decode a powi exponent directly from the raw u32 in arg_indices[1].
powi_exp_encode
Encode a powi exponent as a value that can be stored in arg_indices[1].
reverse_partials
Compute reverse-mode partial derivatives for a single opcode.