Struct arrayfire::Array [] [src]

pub struct Array { /* fields omitted */ }

A multidimensional data container

Currently, Array objects can store only data until four dimensions

NOTE

All operators(traits) from std::ops module implemented for Array object carry out element wise operations. For example, * does multiplication of elements at corresponding locations in two different Arrays.

Methods

impl Array
[src]

Constructs a new Array object

Examples

use arrayfire::{Array, Dim4, print};
let values: [f32; 3] = [1.0, 2.0, 3.0];
let indices = Array::new(&values, Dim4::new(&[3, 1, 1, 1]));
print(&indices);

Constructs a new Array object from strided data

The data pointed by the slice passed to this function can possibily be offseted using an additional offset parameter.

Constructs a new Array object of specified dimensions and type

Examples

use arrayfire::{Array, Dim4, DType};
let garbageVals = Array::new_empty(Dim4::new(&[3, 1, 1, 1]), DType::F32);

Returns the backend of the Array

Return Values

Returns an value of type Backend which indicates which backend was active when Array was created.

Returns the device identifier(integer) on which the Array was created

Return Values

Return the device id on which Array was created.

Returns the number of elements in the Array

Returns the Array data type

Returns the dimensions of the Array

Returns the strides of the Array

Returns the number of dimensions of the Array

Returns the offset to the pointer from where data begins

Returns the native FFI handle for Rust object Array

Copies the data from the Array to the mutable slice data

Evaluates any pending lazy expressions that represent the data in the Array object

Makes an copy of the Array

This does a deep copy of the data into a new Array

Check if Array is empty

Check if Array is scalar

Check if Array is a row

Check if Array is a column

Check if Array is a vector

Check if Array is of complex type

Check if Array's numerical type is of double precision

Check if Array's numerical type is of single precision

Check if Array is of real type

Check if Array is of single precision

Check if Array is of integral type

Check if Array is of boolean type

Check if Array's memory layout is continuous and one dimensional

Check if Array's memory is owned by it and not a view of another Array

Cast the Array data type to target_type

Find if the current array is sparse

Lock the device buffer in the memory manager

Locked buffers are not freed by memory manager until unlock is called.

Unlock the device buffer in the memory manager

This function will give back the control over the device pointer to the memory manager.

Get the device pointer and lock the buffer in memory manager

The device pointer is not freed by memory manager until unlock is called.

Get the size of physical allocated bytes.

This function will return the size of the parent/owner if the current Array object is an indexed Array.

Trait Implementations

impl From<i64> for Array
[src]

Used for creating Array object from native resource id

Performs the conversion.

impl Clone for Array
[src]

Returns a new Array object after incrementing the reference count of native resource

Cloning an Array does not do a deep copy of the underlying array data. It increments the reference count of native resource and returns you the new reference in the form a new Array object.

To create a deep copy use copy()

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Drop for Array
[src]

To free resources when Array goes out of scope

A method called when the value goes out of scope. Read more

impl AddAssign<Array> for Array
[src]

The method for the += operator

impl SubAssign<Array> for Array
[src]

The method for the -= operator

impl MulAssign<Array> for Array
[src]

The method for the *= operator

impl DivAssign<Array> for Array
[src]

The method for the /= operator

impl RemAssign<Array> for Array
[src]

The method for the %= operator

impl ShlAssign<Array> for Array
[src]

The method for the <<= operator

impl ShrAssign<Array> for Array
[src]

The method for the >>= operator

impl BitAndAssign<Array> for Array
[src]

The method for the &= operator

impl BitOrAssign<Array> for Array
[src]

The method for the |= operator

impl BitXorAssign<Array> for Array
[src]

The method for the ^= operator

impl<'f> Not for &'f Array
[src]

Enables use of ! on objects of type Array

The resulting type after applying the ! operator

The method for the unary ! operator

impl Convertable for Array
[src]

Get an Array from given type

impl<'f> Add<Complex<f64>> for &'f Array
[src]

The resulting type after applying the + operator

The method for the + operator

impl Add<Complex<f64>> for Array
[src]

The resulting type after applying the + operator

The method for the + operator

impl<'f> Sub<Complex<f64>> for &'f Array
[src]

The resulting type after applying the - operator

The method for the - operator

impl Sub<Complex<f64>> for Array
[src]

The resulting type after applying the - operator

The method for the - operator

impl<'f> Mul<Complex<f64>> for &'f Array
[src]

The resulting type after applying the * operator

The method for the * operator

impl Mul<Complex<f64>> for Array
[src]

The resulting type after applying the * operator

The method for the * operator

impl<'f> Div<Complex<f64>> for &'f Array
[src]

The resulting type after applying the / operator

The method for the / operator

impl Div<Complex<f64>> for Array
[src]

The resulting type after applying the / operator

The method for the / operator

impl<'f> Add<Complex<f32>> for &'f Array
[src]

The resulting type after applying the + operator

The method for the + operator

impl Add<Complex<f32>> for Array
[src]

The resulting type after applying the + operator

The method for the + operator

impl<'f> Sub<Complex<f32>> for &'f Array
[src]

The resulting type after applying the - operator

The method for the - operator

impl Sub<Complex<f32>> for Array
[src]

The resulting type after applying the - operator

The method for the - operator

impl<'f> Mul<Complex<f32>> for &'f Array
[src]

The resulting type after applying the * operator

The method for the * operator

impl Mul<Complex<f32>> for Array
[src]

The resulting type after applying the * operator

The method for the * operator

impl<'f> Div<Complex<f32>> for &'f Array
[src]

The resulting type after applying the / operator

The method for the / operator

impl Div<Complex<f32>> for Array
[src]

The resulting type after applying the / operator

The method for the / operator

impl<'f> Add<f64> for &'f Array
[src]

The resulting type after applying the + operator

The method for the + operator

impl Add<f64> for Array
[src]

The resulting type after applying the + operator

The method for the + operator

impl<'f> Sub<f64> for &'f Array
[src]

The resulting type after applying the - operator

The method for the - operator

impl Sub<f64> for Array
[src]

The resulting type after applying the - operator

The method for the - operator

impl<'f> Mul<f64> for &'f Array
[src]

The resulting type after applying the * operator

The method for the * operator

impl Mul<f64> for Array
[src]

The resulting type after applying the * operator

The method for the * operator

impl<'f> Div<f64> for &'f Array
[src]

The resulting type after applying the / operator

The method for the / operator

impl Div<f64> for Array
[src]

The resulting type after applying the / operator

The method for the / operator

impl<'f> Add<f32> for &'f Array
[src]

The resulting type after applying the + operator

The method for the + operator

impl Add<f32> for Array
[src]

The resulting type after applying the + operator

The method for the + operator

impl<'f> Sub<f32> for &'f Array
[src]

The resulting type after applying the - operator

The method for the - operator

impl Sub<f32> for Array
[src]

The resulting type after applying the - operator

The method for the - operator

impl<'f> Mul<f32> for &'f Array
[src]

The resulting type after applying the * operator

The method for the * operator

impl Mul<f32> for Array
[src]

The resulting type after applying the * operator

The method for the * operator

impl<'f> Div<f32> for &'f Array
[src]

The resulting type after applying the / operator

The method for the / operator

impl Div<f32> for Array
[src]

The resulting type after applying the / operator

The method for the / operator

impl<'f> Add<u64> for &'f Array
[src]

The resulting type after applying the + operator

The method for the + operator

impl Add<u64> for Array
[src]

The resulting type after applying the + operator

The method for the + operator

impl<'f> Sub<u64> for &'f Array
[src]

The resulting type after applying the - operator

The method for the - operator

impl Sub<u64> for Array
[src]

The resulting type after applying the - operator

The method for the - operator

impl<'f> Mul<u64> for &'f Array
[src]

The resulting type after applying the * operator

The method for the * operator

impl Mul<u64> for Array
[src]

The resulting type after applying the * operator

The method for the * operator

impl<'f> Div<u64> for &'f Array
[src]

The resulting type after applying the / operator

The method for the / operator

impl Div<u64> for Array
[src]

The resulting type after applying the / operator

The method for the / operator

impl<'f> Add<i64> for &'f Array
[src]

The resulting type after applying the + operator

The method for the + operator

impl Add<i64> for Array
[src]

The resulting type after applying the + operator

The method for the + operator

impl<'f> Sub<i64> for &'f Array
[src]

The resulting type after applying the - operator

The method for the - operator

impl Sub<i64> for Array
[src]

The resulting type after applying the - operator

The method for the - operator

impl<'f> Mul<i64> for &'f Array
[src]

The resulting type after applying the * operator

The method for the * operator

impl Mul<i64> for Array
[src]

The resulting type after applying the * operator

The method for the * operator

impl<'f> Div<i64> for &'f Array
[src]

The resulting type after applying the / operator

The method for the / operator

impl Div<i64> for Array
[src]

The resulting type after applying the / operator

The method for the / operator

impl<'f> Add<u32> for &'f Array
[src]

The resulting type after applying the + operator

The method for the + operator

impl Add<u32> for Array
[src]

The resulting type after applying the + operator

The method for the + operator

impl<'f> Sub<u32> for &'f Array
[src]

The resulting type after applying the - operator

The method for the - operator

impl Sub<u32> for Array
[src]

The resulting type after applying the - operator

The method for the - operator

impl<'f> Mul<u32> for &'f Array
[src]

The resulting type after applying the * operator

The method for the * operator

impl Mul<u32> for Array
[src]

The resulting type after applying the * operator

The method for the * operator

impl<'f> Div<u32> for &'f Array
[src]

The resulting type after applying the / operator

The method for the / operator

impl Div<u32> for Array
[src]

The resulting type after applying the / operator

The method for the / operator

impl<'f> Add<i32> for &'f Array
[src]

The resulting type after applying the + operator

The method for the + operator

impl Add<i32> for Array
[src]

The resulting type after applying the + operator

The method for the + operator

impl<'f> Sub<i32> for &'f Array
[src]

The resulting type after applying the - operator

The method for the - operator

impl Sub<i32> for Array
[src]

The resulting type after applying the - operator

The method for the - operator

impl<'f> Mul<i32> for &'f Array
[src]

The resulting type after applying the * operator

The method for the * operator

impl Mul<i32> for Array
[src]

The resulting type after applying the * operator

The method for the * operator

impl<'f> Div<i32> for &'f Array
[src]

The resulting type after applying the / operator

The method for the / operator

impl Div<i32> for Array
[src]

The resulting type after applying the / operator

The method for the / operator

impl<'f> Add<u8> for &'f Array
[src]

The resulting type after applying the + operator

The method for the + operator

impl Add<u8> for Array
[src]

The resulting type after applying the + operator

The method for the + operator

impl<'f> Sub<u8> for &'f Array
[src]

The resulting type after applying the - operator

The method for the - operator

impl Sub<u8> for Array
[src]

The resulting type after applying the - operator

The method for the - operator

impl<'f> Mul<u8> for &'f Array
[src]

The resulting type after applying the * operator

The method for the * operator

impl Mul<u8> for Array
[src]

The resulting type after applying the * operator

The method for the * operator

impl<'f> Div<u8> for &'f Array
[src]

The resulting type after applying the / operator

The method for the / operator

impl Div<u8> for Array
[src]

The resulting type after applying the / operator

The method for the / operator

impl Add<Array> for Array
[src]

The resulting type after applying the + operator

The method for the + operator

impl<'a> Add<&'a Array> for Array
[src]

The resulting type after applying the + operator

The method for the + operator

impl<'a> Add<Array> for &'a Array
[src]

The resulting type after applying the + operator

The method for the + operator

impl<'a, 'b> Add<&'a Array> for &'b Array
[src]

The resulting type after applying the + operator

The method for the + operator

impl Sub<Array> for Array
[src]

The resulting type after applying the - operator

The method for the - operator

impl<'a> Sub<&'a Array> for Array
[src]

The resulting type after applying the - operator

The method for the - operator

impl<'a> Sub<Array> for &'a Array
[src]

The resulting type after applying the - operator

The method for the - operator

impl<'a, 'b> Sub<&'a Array> for &'b Array
[src]

The resulting type after applying the - operator

The method for the - operator

impl Mul<Array> for Array
[src]

The resulting type after applying the * operator

The method for the * operator

impl<'a> Mul<&'a Array> for Array
[src]

The resulting type after applying the * operator

The method for the * operator

impl<'a> Mul<Array> for &'a Array
[src]

The resulting type after applying the * operator

The method for the * operator

impl<'a, 'b> Mul<&'a Array> for &'b Array
[src]

The resulting type after applying the * operator

The method for the * operator

impl Div<Array> for Array
[src]

The resulting type after applying the / operator

The method for the / operator

impl<'a> Div<&'a Array> for Array
[src]

The resulting type after applying the / operator

The method for the / operator

impl<'a> Div<Array> for &'a Array
[src]

The resulting type after applying the / operator

The method for the / operator

impl<'a, 'b> Div<&'a Array> for &'b Array
[src]

The resulting type after applying the / operator

The method for the / operator

impl Rem<Array> for Array
[src]

The resulting type after applying the % operator

The method for the % operator

impl<'a> Rem<&'a Array> for Array
[src]

The resulting type after applying the % operator

The method for the % operator

impl<'a> Rem<Array> for &'a Array
[src]

The resulting type after applying the % operator

The method for the % operator

impl<'a, 'b> Rem<&'a Array> for &'b Array
[src]

The resulting type after applying the % operator

The method for the % operator

impl Shl<Array> for Array
[src]

The resulting type after applying the << operator

The method for the << operator

impl<'a> Shl<&'a Array> for Array
[src]

The resulting type after applying the << operator

The method for the << operator

impl<'a> Shl<Array> for &'a Array
[src]

The resulting type after applying the << operator

The method for the << operator

impl<'a, 'b> Shl<&'a Array> for &'b Array
[src]

The resulting type after applying the << operator

The method for the << operator

impl Shr<Array> for Array
[src]

The resulting type after applying the >> operator

The method for the >> operator

impl<'a> Shr<&'a Array> for Array
[src]

The resulting type after applying the >> operator

The method for the >> operator

impl<'a> Shr<Array> for &'a Array
[src]

The resulting type after applying the >> operator

The method for the >> operator

impl<'a, 'b> Shr<&'a Array> for &'b Array
[src]

The resulting type after applying the >> operator

The method for the >> operator

impl BitAnd<Array> for Array
[src]

The resulting type after applying the & operator

The method for the & operator

impl<'a> BitAnd<&'a Array> for Array
[src]

The resulting type after applying the & operator

The method for the & operator

impl<'a> BitAnd<Array> for &'a Array
[src]

The resulting type after applying the & operator

The method for the & operator

impl<'a, 'b> BitAnd<&'a Array> for &'b Array
[src]

The resulting type after applying the & operator

The method for the & operator

impl BitOr<Array> for Array
[src]

The resulting type after applying the | operator

The method for the | operator

impl<'a> BitOr<&'a Array> for Array
[src]

The resulting type after applying the | operator

The method for the | operator

impl<'a> BitOr<Array> for &'a Array
[src]

The resulting type after applying the | operator

The method for the | operator

impl<'a, 'b> BitOr<&'a Array> for &'b Array
[src]

The resulting type after applying the | operator

The method for the | operator

impl BitXor<Array> for Array
[src]

The resulting type after applying the ^ operator

The method for the ^ operator

impl<'a> BitXor<&'a Array> for Array
[src]

The resulting type after applying the ^ operator

The method for the ^ operator

impl<'a> BitXor<Array> for &'a Array
[src]

The resulting type after applying the ^ operator

The method for the ^ operator

impl<'a, 'b> BitXor<&'a Array> for &'b Array
[src]

The resulting type after applying the ^ operator

The method for the ^ operator

impl Neg for Array
[src]

Implement negation trait for Array

The resulting type after applying the - operator

The method for the unary - operator

impl Indexable for Array
[src]

Enables Array to be used to index another Array

This is used in functions index_gen and assign_gen

Set indexing object for a given dimension Read more