hugr_llvm::utils::array_op_builder

Trait ArrayOpBuilder

Source
pub trait ArrayOpBuilder: Dataflow {
    // Provided methods
    fn add_new_array(
        &mut self,
        elem_ty: Type,
        values: impl IntoIterator<Item = Wire>,
    ) -> Result<Wire, BuildError> { ... }
    fn add_array_get(
        &mut self,
        elem_ty: Type,
        size: u64,
        input: Wire,
        index: Wire,
    ) -> Result<Wire, BuildError> { ... }
    fn add_array_set(
        &mut self,
        elem_ty: Type,
        size: u64,
        input: Wire,
        index: Wire,
        value: Wire,
    ) -> Result<Wire, BuildError> { ... }
    fn add_array_swap(
        &mut self,
        elem_ty: Type,
        size: u64,
        input: Wire,
        index1: Wire,
        index2: Wire,
    ) -> Result<Wire, BuildError> { ... }
    fn add_array_pop_left(
        &mut self,
        elem_ty: Type,
        size: u64,
        input: Wire,
    ) -> Result<Wire, BuildError> { ... }
    fn add_array_pop_right(
        &mut self,
        elem_ty: Type,
        size: u64,
        input: Wire,
    ) -> Result<Wire, BuildError> { ... }
    fn add_array_discard_empty(
        &mut self,
        elem_ty: Type,
        input: Wire,
    ) -> Result<(), BuildError> { ... }
}

Provided Methods§

Source

fn add_new_array( &mut self, elem_ty: Type, values: impl IntoIterator<Item = Wire>, ) -> Result<Wire, BuildError>

Source

fn add_array_get( &mut self, elem_ty: Type, size: u64, input: Wire, index: Wire, ) -> Result<Wire, BuildError>

Source

fn add_array_set( &mut self, elem_ty: Type, size: u64, input: Wire, index: Wire, value: Wire, ) -> Result<Wire, BuildError>

Source

fn add_array_swap( &mut self, elem_ty: Type, size: u64, input: Wire, index1: Wire, index2: Wire, ) -> Result<Wire, BuildError>

Source

fn add_array_pop_left( &mut self, elem_ty: Type, size: u64, input: Wire, ) -> Result<Wire, BuildError>

Source

fn add_array_pop_right( &mut self, elem_ty: Type, size: u64, input: Wire, ) -> Result<Wire, BuildError>

Source

fn add_array_discard_empty( &mut self, elem_ty: Type, input: Wire, ) -> Result<(), BuildError>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§