Struct ocl_convolution::FiltersConvolution
source · pub struct FiltersConvolution<T: ConvElement>(/* private fields */);
Expand description
Convolution with pinned filters memory. Pinning memory increases efficiency at the cost of making the convolution less flexible.
FiltersConvolution
can be created by calling with_filters()
or with_biased_filters()
methods in Convolution
.
Implementations§
source§impl<T: ConvElement> FiltersConvolution<T>
impl<T: ConvElement> FiltersConvolution<T>
sourcepub fn set_params(&mut self, params: T::Params) -> Result<()>
pub fn set_params(&mut self, params: T::Params) -> Result<()>
Sets convolution parameters.
sourcepub fn pin(self, signal_shape: FeatureMapShape) -> Result<PinnedConvolution<T>>
pub fn pin(self, signal_shape: FeatureMapShape) -> Result<PinnedConvolution<T>>
Pins signal and output memory for this convolution.
sourcepub fn compute(&self, signal: FeatureMap<'_, T>) -> Result<Array4<T>>
pub fn compute(&self, signal: FeatureMap<'_, T>) -> Result<Array4<T>>
Computes the convolution on the provided signal.
Trait Implementations§
Auto Trait Implementations§
impl<T> !RefUnwindSafe for FiltersConvolution<T>
impl<T> Send for FiltersConvolution<T>where <T as ConvElement>::Params: Send,
impl<T> !Sync for FiltersConvolution<T>
impl<T> Unpin for FiltersConvolution<T>where T: Unpin, <T as ConvElement>::Acc: Unpin, <T as ConvElement>::Params: Unpin,
impl<T> UnwindSafe for FiltersConvolution<T>where T: UnwindSafe, <T as ConvElement>::Acc: UnwindSafe, <T as ConvElement>::Params: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more