Trait ComputeHolder

Source
pub trait ComputeHolder<F: Field, HAL: ComputeLayer<F>> {
    type HostComputeAllocator<'a>: ComputeAllocator<F, CpuMemory>
       where Self: 'a;
    type DeviceComputeAllocator<'a>: ComputeAllocator<F, HAL::DevMem>
       where Self: 'a;

    // Required method
    fn to_data<'a, 'b>(
        &'a mut self,
    ) -> ComputeData<'a, F, HAL, Self::HostComputeAllocator<'b>, Self::DeviceComputeAllocator<'b>>
       where 'a: 'b;
}
Expand description

This is a trait for a holder type for the popular triple:

  • a compute layer (HAL),
  • a host memory allocator,
  • a device memory allocator.

Required Associated Types§

Required Methods§

Source

fn to_data<'a, 'b>( &'a mut self, ) -> ComputeData<'a, F, HAL, Self::HostComputeAllocator<'b>, Self::DeviceComputeAllocator<'b>>
where 'a: 'b,

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§