[src] Crate arrayfire
ArrayFire is a high performance software library for parallel computing with an easy-to-use API. ArrayFire abstracts away much of the details of programming parallel architectures by providing a high-level container object, the Array, that represents data stored on a CPU, GPU, FPGA, or other type of accelerator. This abstraction permits developers to write massively parallel applications in a high-level language where they need not be concerned about low-level optimizations that are frequently required to achieve high throughput on most parallel architectures. This crate provides Rust bindings for the ArrayFire library. Given below table shows the rust bindings compatability with ArrayFire upstream. If you find any bugs, please report them on github.
| arrayfire-rust crate | ArrayFire Upstream |
|---|---|
| M.m.p1 | M.m.p2 |
Only, Major(M) & Minor(m) version numbers need to match. p1 and p2 are patch/fix updates
for arrayfire-rust & ArrayFire respectively, and they don't need to match.
Please go through our tutorials book for more explanations on how to use ArrayFire to speedup your code.
Macros
Print given message before printing out the Array to standard output
Create an array of given shape filled with a single value a.k.a constant array
Create a dim4 object from provided dimensions
Macro to evaluate individual Arrays or assignment operations
Join multiple Arrays along a given dimension
Macro to print the current stats of ArrayFire's memory manager.
Create an array of given shape sampled from normal distribution
Create an array of given shape sampled from uniform distribution
Create a sequence object
Indexing into an existing Array
Structs
A multidimensional data container
Structure holding handle to callback function
RAII construct to manage ArrayFire events
A set of Array objects (usually, used in Computer vision context)
Struct to manage an array of resources of type af_indexer_t(ArrayFire C struct)
Random number generator engine
Sequences are used for indexing Arrays
Enums
Error codes
Compute/Acceleration Backend
Binary operation types for generalized scan functions
Helps determine how to pad kernels along borders
Canny edge detector threshold operations types
Dictates what color map is used for Image rendering
Identify the color space of given image(Array)
Used by regions function to identify type of connectivity
Helps determine if convolution is in Spatial or Frequency domain
Gradient mode for convolution
Helps determine the size of output of convolution
Gradient mode for convolution
Types of Array data type
Anisotropic diffusion flux equation types
Diffusion equation types
Homography type
Dictates the interpolation method to be used by a function
Inverse Deconvolution Algorithm
Iterative Deconvolution Algorithm
Plotting markers
Helps determine the type of a Matrix
Error metric used by matchTemplate function
Image moment types
Norm type
Random engine types
Scalar value types
Sparse storage format type
topk function ordering
Gradient mode for convolution
YCbCr Standards
Constants
Default RandomEngine that defaults to PHILOX
Default Mersenne RandomEngine that points to MERSENNE_GP11213
Default Philon RandomEngine that points to PHILOX_4X32_10
Default Threefry RandomEngine that points to THREEFRY_2X32_16
Traits
Trait qualifier to accept complex data(numbers)
Trait qualifier for confidence connected components input
Type Trait to generate a constant Array of given size
Type Trait to convert to an Array
Trait qualifier for given type indicating computability of covariance
Trait qualifier for confidence connected components input
Trait qualifier for given type indicating if edge calculations such as derivates etc. can be performed
Trait qualifier to accept either real or complex typed data
Trait to convert reduction's scalar output to appropriate output type
Trait qualifier for given type indicating conversion capability between grayscale and RGB triplets of data
Types of the data that can be generated using ArrayFire data generation functions.
Trait qualifier for type of Array's that are accepted by image processing functions especially filtering algorithms
Trait qualifier for type of Array's that are accepted by native image load/save functions.
This is an internal trait defined and implemented by ArrayFire create for rust's built-in types to figure out the data type binary operation's results.
Trait bound indicating indexability
Trait qualifier for the type of Arrays accepted by scan operations
Trait qualifier for given type indicating computability of covariance
Trait qualifier for given type indicating computability of Median
Trait qualifier for given type indicating computability of Moments
Trait qualifier to accept real data(numbers)
Trait qualifier indicating it can hold real numbers only
Trait qualifier for Reduction Key type
Trait qualifier for the type of Arrays accepted by scan operations
Functions
Default error handler for error code returned by ArrayFire FFI calls
Computes absolute value
Perform exclusive sum of elements along a given dimension
Compute acos
Compute acosh
Addition of two Arrays
Find if all of the values along a given dimension in the Array are true
Find if all values of Array are non-zero
Key based AND of elements along a given dimension
Allocates space using Arrayfire allocator in host memory
Elementwise logical and operation of two Arrays
Anisotropic smoothing filter
Find if any of the values along a given dimension in the Array are true
Find if any value of Array is non-zero
Key based OR of elements along a given dimension
Perform signal interpolation for 1d signals
Perform signal interpolation for 1d signals along specified dimension
Same as approx1_uniform but uses existing Array as output
Same as approx1 but uses existing Array as output
Perform signal interpolation for 2d signals
Perform signal interpolation for 2d signals along a specified dimension
Same as approx2_uniform but uses existing Array as output
Same as approx2 but uses existing Array as output
Computes phase value
Compute asin
Compute asinh
Assign an Array to another after indexing it using any combination of Array's and Sequence's
Assign(copy) content of an Array to another Array indexed by Sequences
Compute atan
Calculate atan2 of two Arrays
Compute atanh
Bilateral Filter.
Elementwise AND(bit) operation of two Arrays
Perform bitwise complement on all values of Array
Elementwise OR(bit) operation of two Arrays
Elementwise XOR(bit) operation of two Arrays
Canny edge detection operator
Compute the cube root
Ceil the values in an Array
Perform Cholesky decomposition
Perform inplace Cholesky decomposition
Clamp the values of Array
Extract col_num col from input Array
Color space conversion
Get all cols from first to last in the input Array
Segment image based on similar pixel characteristics
Compute the complex conjugate
Create an Array with constant value
1d convolution
2d convolution
Backward pass gradient of 2D convolution
Convolution Integral for two dimensional data
Separable convolution for 2d signals
3d convolution
Compute correlation coefficient
Compute cos
Compute cosh
Count number of non-zero elements along a given dimension
Count number of non-zero values in the Array
Find total count of elements with similar keys along a given dimension
Compute covariance of two Arrays
Create a complex Array from real Array
Create complex array from two Arrays
Find the determinant of the matrix
Get total number of available devices
Call the garbage collection routine
Gets the information about device and platform as strings.
Get memory information from the memory manager for the current active device
Create a diagonal matrix
Extract diagonal from a given Matrix
Calculate first order numerical difference along a given dimension
Calculate second order numerical difference along a given dimension
Dilate an Image
Dilate a Volume
Division of two Arrays
Difference of Gaussians.
Calculate the dot product of vectors.
Perform equals comparison operation
Compute error function value
Compute the complementary error function value
Erode an Image
Erode a Volume
evaluate multiple arrays
Compute e raised to the power of value
Compute e raised to the power of value -1
Compute the factorial
Fast feature detector
Fast fourier transform for 1d signals
Fast fourier transform for 2d signals
2d Complex to Real fast fourier transform
In place 2d dimensional Fast fourier transform
2d Real to Complex fast fourier transform
Fast fourier transform for 3d signals
3d Complex to Real fast fourier transform
In place 3d dimensional Fast fourier transform
3d Real to Complex fast fourier transform
1d Complex to Real fast fourier transform
1d convolution using fast-fourier transform
2d convolution using fast-fourier transform
3d convolution using fast-fourier transform
In place 1d dimensional Fast fourier transform
1d Real to Complex fast fourier transform
Finite impulse filter
Flatten the multidimensional Array to an 1D Array
Flip the Array
Floor the values in an Array
Frees memory allocated by Arrayfire allocator in host memory
Creates a Gaussian Kernel.
Perform greater than equals comparison operation
BLAS general matrix multiply (GEMM) of two Array objects
Get current active backend
Get the available backends
Get the available backend count
Get default random engine
Get the current active device id
Fetch last error description as String
Get the minimum memory chunk size
Get ArrayFire Revision (commit) information of the library.
Get the seed of random number generator
Get size, in bytes, of the arrayfire native type
Get ArrayFire Version Number
Calculate the gradients
Grayscale to Color(RGB) conversion
Perform greater than comparison operation
Hamming feature matcher
Default error handling callback provided by ArrayFire crate
Harris corner detector.
Histogram Equalization
Compute Histogram of an Array
Homography estimation
HSV to RGB color space conversion
Compute length of hypotenuse of two Arrays
Create an identity array with 1's in diagonal
Inverse fast fourier transform for 1d signals
Inverse fast fourier transform for 2d signals
In place 2d dimensional inverse fast fourier transform
Inverse fast fourier transform for 3d signals
In place 3d dimensional inverse fast fourier transform
In place 1d dimensional inverse fast fourier transform
Infinite impulse response filter
Extract imaginary values from a complex Array
Find maximum value along given dimension and their corresponding indices
Find maximum and it's index in the whole Array
Find minimum value along given dimension and their corresponding indices
Find minimum and it's index in the whole Array
Indexes the input Array using seqs Sequences
Index an Array using any combination of Array's and Sequence's
Print library meta-info
Return library meta-info as String
Initialize ArrayFire library
Compute inverse of a matrix
Inverse deconvolution
Create a range of values
Check if a device has double support
Get eval flag value
Check if a device has half support
Function to check if Image I/O is available
Function to check if lapack support is available
Check if values are infinity
Check if values are NaN
Check if values are zero
Iterative Deconvolution
Join two arrays
Join multiple arrays
Perform less than equals comparison operation
Compute the logarithm of absolute values of gamma function
Load Image into Array
Load Image into Array in it's native type
Locate the indices of non-zero elements.
Compute the natural logarithm
Compute the logarithm of input Array + 1
Compute logarithm base 2
Compute logarithm base 10
Lookup(hash) an Array using another Array
Create lower triangular matrix
Perform less than comparison operation
Perform LU decomposition
Perform inplace LU decomposition
Image matching
Matrix multiple of two Arrays
Find maximum among elements of given dimension
Find maximum among all values of the Array
Find maximum among values of similar keys along a given dimension
Max reduction along given axis as per ragged lengths provided
Box filter with maximum as box operation
Elementwise maximum operation of two Arrays
Mean along specified dimension
Compute mean of all data
Compute weighted mean of all data
Meanshift Filter.
Weighted mean along specified dimension
Calculate mean and variance in single API call
Median filter
One dimensional median filter on image
Find the median along a given dimension
Compute median of all data
Find minimum among elements of given dimension
Find minimum among all values of the Array
Find minimum among values of similar keys along a given dimension
Box filter with minimum as box operation
Elementwise minimum operation of two Arrays
Change the shape of the Array
Compute modulo of two Arrays
Find Image moments
Find Image moment for whole image
Multiplication of two Arrays
Nearest Neighbour.
Elementwise not equals comparison of two Arrays
Find the norm of a matrix
Elementwise logical or operation of two Arrays
ORB feature descriptor
Pad input Array along borders
Psuedo Inverse of Matrix
Computer power
Compute two raised to the power of value
Print data in the Array
Generalized Array print function
Print buffer details from the ArrayFire device manager
Compute product of elements along a given dimension
Product of all values of the Array
Find product of all values with similar keys along a given dimension
Compute product of all values with similar keys along a given dimension
Product of elements along specific dimension using user specified value instead of NAN values
Product of all values using user provided value for NAN
Perform QR decomposition
Perform inplace QR decomposition
Create random numbers from normal distribution
Generate array of normal numbers using a random engine
Generate array of uniform numbers using a random engine
Create random numbers from uniform distribution
Create a Range of values
Find rank of a matrix
Extract real values from a complex Array
Find blobs in given image.
Register user provided error handler
Compute remainder from two Arrays
Reorder the array according to the new specified axes
Inplace replace in Array based on a condition
Inplace replace in Array based on a condition
Resize an Image
Color(RGB) to Grayscale conversion
RGB to HSV color space conversion
RGB to YCbCr colorspace converter.
Compute root
Rotate an Image
Round the values in an Array
Extract row_num row from input Array
Get an Array with all rows from first to last in the input Array
Compute the reciprocal square root
Summed area table of an Image
Save an Array to an image file
Save an Array without modifications to an image file
Scale an Image
Generalized scan
Generalized scan by key
Element wise conditional operator for Arrays
Element wise conditional operator for Arrays
Element wise conditional operator for Arrays
Toggle backends between cuda, opencl or cpu
Set col_num^th col in inout Array to a new Array new_col
Set cols from first to last in inout Array with cols from Array new_cols
Sets the cuBLAS math mode for the internal handle.
Set the random engine type for default random number generator
Set active device
Set fft plan cache size
Find intersection of two sets
Set eval flag value
Set the minimum memory chunk size
Set row_num^th row in inout Array to a new Array new_row
Set rows from first to last in inout Array with rows from Array new_rows
Set seed for random number generation
Set slice slice_num in inout Array to a new Array new_slice
Set first to last slices of inout Array to a new Array new_slices
Find union of two sets
Find unique values from a Set
"Circular shift of values along specified dimension
Compute left shift
Compute right shift
Compute sigmoid function
Computes the sign of input Array values
Compute sin
Compute sinh
Skew an image
Get slice_num^th slice from input Array
Get slices from first to last in input Array
Sobel Operator
Solve a system of equations
Solve a system of equations
Sort the values in input Arrays
Sort the values in input Arrays
Sort the values in input Arrays
Create sprase matrix from arrays
Convert between sparse formats
Convert dense array to sparse array
Create sprase matrix from data on host memory
Get cololumn indices Array
Get sparse format
Get sparse Array information
Get number of non-zero elements in sparse array
Get row indices Array
Get values of sparse Array
Convert sparse array to dense array
Compute the square root
Compute standard deviation of all data
Compute standard deviation of all data
Standard deviation along given axis
Subtraction of two Arrays
Sum elements along a given dimension
Sum all values of the Array
Find sum of all values with similar keys along a given dimension
Compute sum of all values with similar keys along a given dimension
Sum along specific dimension using user specified value instead of NAN values
Sum all values using user provided value for NAN
SUSAN corner detector.
Perform Singular Value Decomposition
Perform Singular Value Decomposition inplace
Sync all operations on given device
Compute tan
Compute tanh
Compute gamma function
Tile the input array along specified dimension
Find top k elements along a given dimension
Transform(Affine) an Image
Transform input coordinates
Translate an Image
Transpose of a matrix.
Inplace transpose of a matrix.
Truncate the values in an Array
Generate an array with image windows as columns
Create upper triangular matrix
Compute Variance of all elements
Compute weighted variance of all data
Compute Variance along a specific dimension
Weight variance along specified dimension
Converts unwrapped image to an image
YCbCr to RGB colorspace converter.
Type Definitions
Signature of error handling callback function
ArrayFire FFI Type alias for af_array
ArrayFire FFI Type alias for af_event
ArrayFire FFI Type alias for af_features
ArrayFire FFI Type alias for af_indexers_t
ArrayFire FFI Type alias for af_random_engine
ArrayFire FFI Type alias for af_window
Short type alias for Complex single precision type
Short type alias for Complex double precision type
ArrayFire FFI Type alias for libc's signed long long
ArrayFire FFI Type alias for libc's unsigned long long
ArrayFire FFI Type alias for libc's void*