Module custom_ops

Source
Expand description

Structs and traits necessary to implement 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. Two basic examples of custom operations are provided: Not and Or.

Structs§

CustomOperation
A structure that stores a pointer to a custom operation.
Not
A structure that defines the custom operation Not that inverts elementwise a binary array or scalar (individual bit).
Or
A structure that defines the custom operation Or that is equivalent to the binary Or applied elementwise.

Traits§

CustomOperationBody
A trait that must be implemented by any custom operation struct.