[−][src]Struct arrayfire::Dim4
Dim4 is used to store Array dimensions
Implementations
impl Dim4
[src]
pub fn new(dims: &[u64; 4]) -> Self
[src]
pub fn elements(&self) -> u64
[src]
Get the number of elements represented by Dim4 object
pub fn ndims(&self) -> usize
[src]
Get the number of dimensions of Dim4
pub fn get(&self) -> &[u64; 4]
[src]
Get the dimensions as a slice of 4 values
Trait Implementations
impl Clone for Dim4
[src]
impl Copy for Dim4
[src]
impl Debug for Dim4
[src]
impl Default for Dim4
[src]
Default trait for Dim4 returns an Array of dimensions [1, 1, 1, 1]
impl Display for Dim4
[src]
Enables use of Dim4 objects for printing it to display
Examples
use arrayfire::Dim4; let dims = Dim4::new(&[4, 4, 2, 1]); println!("0th Dimension length is {}", dims[0]); // -> 4
impl Index<usize> for Dim4
[src]
Enables index operation for Dim4
Examples
use arrayfire::Dim4; let dims = Dim4::new(&[4, 4, 2, 1]); println!("0th Dimension length is {}", dims[0]); // -> 4 println!("1th Dimension length is {}", dims[1]); // -> 4 println!("2th Dimension length is {}", dims[2]); // -> 2 println!("3th Dimension length is {}", dims[3]); // -> 1
impl IndexMut<usize> for Dim4
[src]
Enables index operation for Dim4 to modify dimensions
Examples
use arrayfire::Dim4; let mut dims = Dim4::new(&[4, 4, 2, 1]); dims[2] = 4; println!("Dimensions: {}", dims); // note that third dimension changed to 4
impl PartialEq<Dim4> for Dim4
[src]
impl StructuralPartialEq for Dim4
[src]
Auto Trait Implementations
impl RefUnwindSafe for Dim4
impl Send for Dim4
impl Sync for Dim4
impl Unpin for Dim4
impl UnwindSafe for Dim4
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,