MCPcopy Create free account
hub / github.com/ciphermodelabs/ciphercore / preprocess_input

Function preprocess_input

ciphercore-base/src/ops/comparisons.rs:356–363  ·  view source on GitHub ↗

This function pulls out bits to outermost dimension, and flips MSB for signed comparisons. See [`flip_msb`] and [`ComparisonResult`] for details.

(signed_comparison: bool, node: Node)

Source from the content-addressed store, hash-verified

354///
355/// See [`flip_msb`] and [`ComparisonResult`] for details.
356fn preprocess_input(signed_comparison: bool, node: Node) -> Result<Node> {
357 let node = if signed_comparison {
358 flip_msb(node)?
359 } else {
360 node
361 };
362 pull_out_bits(node)
363}
364
365fn preprocess_inputs(signed_comparison: bool, a: Node, b: Node) -> Result<(Node, Node)> {
366 let (a, b) = expand_to_same_dims(a, b)?;

Callers 1

preprocess_inputsFunction · 0.85

Calls 2

flip_msbFunction · 0.85
pull_out_bitsFunction · 0.85

Tested by

no test coverage detected