Struct ocl_convolution::FeatureMap
source · pub struct FeatureMap<'a, T> { /* private fields */ }
Expand description
Feature map, i.e., a signal or output of the convolution operation.
Internally, a FeatureMap
is a thin wrapper around ArrayView
that additionally indicates the memory layout of the map.
Implementations§
source§impl<'a, T: ConvElement> FeatureMap<'a, T>
impl<'a, T: ConvElement> FeatureMap<'a, T>
sourcepub fn nchw(array: impl Into<ArrayView4<'a, T>>) -> Self
pub fn nchw(array: impl Into<ArrayView4<'a, T>>) -> Self
Constructs a map from an NCHW-ordered tensor.
Panics
- Panics if
array
dimensions do not fit intou32
integers.
sourcepub fn nhwc(array: impl Into<ArrayView4<'a, T>>) -> Self
pub fn nhwc(array: impl Into<ArrayView4<'a, T>>) -> Self
Constructs a map from an NHWC-ordered tensor.
Panics
- Panics if
array
dimensions do not fit intou32
integers.
sourcepub fn shape(self) -> FeatureMapShape
pub fn shape(self) -> FeatureMapShape
Gets the shape of this map.
Trait Implementations§
source§impl<'a, T: Clone> Clone for FeatureMap<'a, T>
impl<'a, T: Clone> Clone for FeatureMap<'a, T>
source§fn clone(&self) -> FeatureMap<'a, T>
fn clone(&self) -> FeatureMap<'a, T>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'a, T: Debug> Debug for FeatureMap<'a, T>
impl<'a, T: Debug> Debug for FeatureMap<'a, T>
source§impl<'a, T: PartialEq> PartialEq<FeatureMap<'a, T>> for FeatureMap<'a, T>
impl<'a, T: PartialEq> PartialEq<FeatureMap<'a, T>> for FeatureMap<'a, T>
source§fn eq(&self, other: &FeatureMap<'a, T>) -> bool
fn eq(&self, other: &FeatureMap<'a, T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<'a, T: Copy> Copy for FeatureMap<'a, T>
impl<'a, T: Eq> Eq for FeatureMap<'a, T>
impl<'a, T> StructuralEq for FeatureMap<'a, T>
impl<'a, T> StructuralPartialEq for FeatureMap<'a, T>
Auto Trait Implementations§
impl<'a, T> RefUnwindSafe for FeatureMap<'a, T>where T: RefUnwindSafe,
impl<'a, T> Send for FeatureMap<'a, T>where T: Sync,
impl<'a, T> Sync for FeatureMap<'a, T>where T: Sync,
impl<'a, T> Unpin for FeatureMap<'a, T>
impl<'a, T> UnwindSafe for FeatureMap<'a, T>where T: RefUnwindSafe,
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