pub enum IRTransform {
    AppendAdd(TransformNodeIndexTransformNodeIndex),
    AppendMultiply(TransformNodeIndexTransformNodeIndex),
    AppendInputCiphertext(usize),
    AppendInputPlaintext(usize),
    AppendOutputCiphertext(TransformNodeIndex),
    AppendRelinearize(TransformNodeIndex),
    AppendSub(TransformNodeIndexTransformNodeIndex),
    RemoveNode(TransformNodeIndex),
    AppendNegate(TransformNodeIndex),
    RemoveEdge(TransformNodeIndexTransformNodeIndex),
    AddEdge(TransformNodeIndexTransformNodeIndexEdgeInfo),
}
Expand description

A transform for an FheProgram. Callbacks in FheProgram::forward_traverse and FheProgram::reverse_traverse should emit these to update the graph.

Each of these variants use a TransformNodeIndex to reference either a node that currently exists in the graph (i.e. TransformNodeIndex::NodeIndex), or a node that will result from a previous transform in the TransformList. I.e. TransformNodeIndex::DeferredIndex

Variants

AppendAdd(TransformNodeIndexTransformNodeIndex)

Appends an add node.

AppendMultiply(TransformNodeIndexTransformNodeIndex)

Appends a multiply node.

AppendInputCiphertext(usize)

Appends an input ciphertext

AppendInputPlaintext(usize)

Appends an input plaintext

AppendOutputCiphertext(TransformNodeIndex)

Appends an output ciphertext node.

AppendRelinearize(TransformNodeIndex)

Appends a relinearize node.

AppendSub(TransformNodeIndexTransformNodeIndex)

Appends a subtract node.

RemoveNode(TransformNodeIndex)

Removes a node.

AppendNegate(TransformNodeIndex)

Appends a negate node.

RemoveEdge(TransformNodeIndexTransformNodeIndex)

Remove a graph edge between two nodes..

AddEdge(TransformNodeIndexTransformNodeIndexEdgeInfo)

Add a graph edge between two nodes.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.