Struct ocl_convolution::PinnedConvolution
source · pub struct PinnedConvolution<T: ConvElement>(/* private fields */);
Expand description
Convolution with pinned memory for filters, signal and output. Pinning memory increases efficiency at the cost of making the convolution less flexible.
PinnedConvolution
can be created from a FiltersConvolution
by calling
pin()
.
Implementations§
source§impl<T: ConvElement> PinnedConvolution<T>
impl<T: ConvElement> PinnedConvolution<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 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.
Panics
- Panics if signal dimensions do not agree with the ones provided
to the
pin()
method.
Trait Implementations§
Auto Trait Implementations§
impl<T> !RefUnwindSafe for PinnedConvolution<T>
impl<T> Send for PinnedConvolution<T>where <T as ConvElement>::Params: Send,
impl<T> !Sync for PinnedConvolution<T>
impl<T> Unpin for PinnedConvolution<T>where T: Unpin, <T as ConvElement>::Params: Unpin,
impl<T> UnwindSafe for PinnedConvolution<T>where T: 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