Module ciphercore_base::ops
source · Expand description
Implementation of several custom operations. A custom operation can be thought of as a polymorphic function, i.e., where the number of inputs and their types can vary.
Modules
- Binary adder that adds two bitstrings.
- AUC score metric, functionally equivalent to sklearn.metrics.roc_auc_score.
- Clip function that returns a given value if it is inside of the interval [0,2k] and clips values outside this interval to its edges.
- Various comparison functions for signed and unsigned integers including greater-than, less-than, greater-than-equal-to, less-than-equal-to, equal, not-equal.
- Division via the Goldschmidt method.
- Sort by integer key.
- Inverse square root approximation via the Newton-Raphson method.
- Long division for bitstrings of arbitrary length.
- Minimum and maximum operations. They operate on unsigned integers represented as bitstrings.
- Multiplexer (Mux) operation that takes three inputs a, b, c and returns b if a is 1 or c if a is 0.
- Multiplicative inversion via the Newton-Raphson method.
- Exp(x) approximation relying on Taylor series expansion.