Functions

Documentation grouped by category:

[detail level 12345]

ArrayFire Classes | |

►ArrayFire Functions | |

abs | Absolute value |

accum | Cumulative sum (inclusive). Also known as a scan |

acos | Inverse cosine |

acosh | Inverse hyperbolic cosine |

add | |

allTrue | Test if all values in an array are true |

allTrueByKey | Calculate if all values that share the same consecutive keys are true |

alloc | Allocate memory using the ArrayFire memory manager |

allocHost | Allocate memory on host |

and | Logical AND |

anisotropicDiffusion | Anisotropic Smoothing Filter |

anyTrueByKey | Calculate if any values that share the same consecutive keys are true |

anytrue | Calculate if any values in an array are true |

approx1 | Interpolation across a single dimension |

approx2 | Interpolation along two dimensions |

arg | Phase of a number in the complex plane |

asin | |

asinh | |

assign | Copy and write values in the locations specified by the sequences |

atan/atan2 | |

atanh | |

bilateral | Bilateral Filter |

bitand | |

bitor | |

bitshiftl | |

bitshiftr | |

bitxor | |

canny | Canny Edge Detector |

cast | |

cbrt | |

ceil | |

cholesky | Perform Cholesky decomposition |

col/cols | Gets a reference of a col in a 2D af::array |

colorSpace | |

complex | |

confidenceCC | Segment image based on similar pixel characteristics |

conjg | |

constant | Create a array from a scalar input value |

convolve (Non-separable) | Convolution Integral for any(one through three) dimensional data |

convolve (Separable) | Separable Convolution |

convolve1 | Convolution Integral for one dimensional data |

convolve2 | Convolution Integral for two dimensional data |

convolve3 | Convolution Integral for three dimensional data |

corrcoef | |

cos | |

cosh | |

count | |

countByKey | |

cov | |

deleteImageMem | |

dense | Returns a dense array from a sparse input |

det | Find the determinant of the input matrix |

deviceInfo | Gets the information about device and platform as strings |

deviceMemInfo | Memory manager related functions |

diag | Extract diagonal from a matrix when `extract` is set to true. Create a diagonal matrix from input array when `extract` is set to false |

diff1 | |

diff2 | |

dilate | Dilation(morphological operator) for images |

dilate3d | Dilation(morphological operator) for volumes |

div | |

dog | Difference of Gaussians |

dot | Calculate the dot product of a vector |

eq | |

erf | |

erfc | |

erode | Erosion(morphological operator) for images |

erode3d | Erosion(morphological operator) for volumes |

exp | |

expm1 | |

factorial | |

fast | FAST feature detector |

features | Lookup values of an array based on sequences and/or arrays |

fft | Fast Fourier Transform |

fft2 | Fast Fourier Transform |

fft3 | Fast Fourier Transform |

fftC2R | Complex to Real Fast Fourier Transform |

fftR2C | Real to Complex Fast Fourier Transform |

fir | This function implements a Finite Impulse Filter |

flat | Flatten the input to a single dimension |

flip | Flip the input along specified dimension |

floor | |

free | Free device memory allocated by ArrayFire's memory manager |

freeHost | Free memory allocated on host internally by ArrayFire |

freePinned | Free pinned memory allocated by ArrayFire's memory manager |

gaussiankernel | Creates a Gaussian Kernel |

ge | |

getActiveBackend | Get's the backend enum for the active backend |

getAvailableBackends | Returns an integer indicating the backends loaded successfully |

getBackendCount | Get the number of backends whose libraries were successfully loaded |

getBackendId | Get's the backend enum for an array |

getDefaultRandomEngine | Returns the default random engine object |

getDevice | Get the current device ID |

getDeviceCount | Gets the number of compute devices on the system |

getDeviceId | Get's the id of the device an array was created on |

getSeed | Returns the seed for random number generation |

gloh | SIFT feature detector and GLOH descriptor extractor |

grad | |

gray2rgb | |

gt | |

hammingMatcher | Hamming Matcher |

harris | Harris corner detector |

histequal | Histogram equalization of input image |

histogram | Histogram of input data |

homography | Homography Estimation |

hsv2rgb | |

hypot | |

identity | Create an identity array with diagonal values 1 |

ifft | Fast Fourier Transform |

ifft2 | Fast Fourier Transform |

ifft3 | Fast Fourier Transform |

iir | This function implements a Infinite Impulse Filter |

imag | |

index | Lookup values of an array based on sequences and/or arrays |

info | Display ArrayFire and device info |

infoString | Get af::info() as a string |

inverse | Invert a matrix |

inverseDeconv | |

iota | Create an sequence [0, dims.elements() - 1] and modify to specified dimensions dims and then tile it according to tile_dims |

isDoubleAvailable | Check if double precision support is available for specified device |

isHalfAvailable | Check if half(16-bit) precision floating point support is available for specified device |

isImageIoAvailable | |

isLAPACKAvailable | Returns true is ArrayFire is compiled with LAPACK support |

isNan | |

isinf | |

iszero | |

iterativeDeconv | |

join | Join up to 4 arrays along specified dimension |

le | |

lgamma | |

loadImage | |

loadImageMem | |

log | |

log10 | |

log1p | |

lookup | Lookup values of an array by indexing with another array |

lower | Create a lower triangular matrix from input array |

lt | |

lu | Perform LU decomposition |

matchTemplate | Template Matching |

matmul | Matrix multiplication using array |

max | |

max | |

maxByKey | |

maxfilt | Find maximum value from a window |

mean | |

meanshift | Meanshift Filter |

medfilt | Median Filter |

median | |

min | |

min | |

minByKey | |

minfilt | Find minimum value from a window |

mod | |

moddims | Modify the input dimensions without changing the data order |

moments | |

mul | |

nearestNeighbour | Determine the nearest neighbouring points to a given set of points |

neg | |

neq | |

norm | Find the norm of the input matrix |

not | |

operator() | Gets a reference to a set of elements |

operator(star)= | Multiplies and assigns the value(s) of val to the elements of the af::array |

operator+= | Adds and assigns the value(s) of val to the elements of the af::array |

operator-= | Subtracts and assigns the value(s) of val to the elements of the af::array |

operator/= | Divides and assigns the value(s) of val to the elements of the af::array |

operator= | Assignes the value(s) of val to the elements of the af::array |

or | |

orb | ORB Feature descriptor |

pad | Pad an array |

pinned | Allocate pinned memory using ArrayFire's memory manager |

pinverse | Pseudo-invert a matrix |

pow | |

Print the array to screen | |

product | |

productByKey | |

qr | Perform QR decomposition |

randn | Create a random array sampled from normal distribution |

randomEngine | Functions to create, modify, use, and destroy randomEngine objects |

randu | Create a random array sampled from uniform distribution |

range | Creates an array with [0, n] values along the seq_dim which is tiled across other dimensions |

rank | Find the rank of the input matrix |

readArray | Load an array from a file |

real | |

regions | Find blobs in given image |

rem | |

reorder | Reorder an array according to the specified dimensions |

replace | Replace elements of an array based on a conditional array |

resize | |

rgb2gray | |

rgb2hsv | |

rgb2ycbcr | |

root | |

rotate | Rotate an input image or array |

round | |

row/rows | Gets a reference of a row in a 2D af::array |

rsqrt | |

sat | Summed Area Tables |

saveArray | Save an array to a binary file |

saveImage | |

saveImageMem | |

scale | |

scan | |

scanByKey | |

select | Selects elements from two arrays based on the values of a binary conditional array |

setBackend | Set the current backend when using Unified backend |

setDefaultRandomEngineType | Set the default random engine type |

setDevice | Change current device to specified device |

setSeed | Set the seed for random number generation |

setintersect | |

setunion | |

setunique | |

shift | Circular shift slong specified dimensions |

sift | SIFT feature detector and descriptor extractor |

sign | |

sin | |

sinh | |

skew | |

slice/slices | Gets a reference of a matrix in a 3D af::array |

sobel | Sobel Operators |

solve | Solve a system of equations |

solveLU | Solve a system of equations |

sort | |

sortByKey | |

sortIndex | |

sparse | Create a sparse array |

sparseConvertTo | Convert an existing sparse array into a different storage format |

sparseGetColdx | Returns reference to the column indices component of the sparse array |

sparseGetInfo | Returns reference to components of the input sparse array |

sparseGetNNZ | Returns the number of non zero elements in the sparse array |

sparseGetRowIdx | Returns reference to the row indices component of the sparse array |

sparseGetStorage | Returns the storage type of a sparse array |

sparseGetValues | Returns reference to the values component of the sparse array |

sqrt | |

stdev | |

sub | |

sum | |

sumByKey | |

susan | SUSAN corner detector |

svd | Computes the singular value decomposition of a matrix |

sync | Blocks until all operations on device are finished |

tan/tan2 | |

tanh | |

tgamma | |

tile | Repeat the contents of the input array along the specified dimensions |

toString | Print the array to a string instead of the screen |

topk | |

transform | |

transformCoordinates | |

translate | |

transpose | Matrix Transpose |

trunc | |

unwrap | Rearrange windowed sections of an array into columns (or rows) |

upper | Create a upper triangular matrix from input array |

var | |

where | |

wrap | |

ycbcr2rgb | |

►ArrayFire Functions by Category | |

►Computer Vision | A list of computer vision algorithms |

►Feature descriptors | ORB feature descriptor |

gloh | SIFT feature detector and GLOH descriptor extractor |

orb | ORB Feature descriptor |

sift | SIFT feature detector and descriptor extractor |

►Feature detectors | FAST feature detector |

dog | Difference of Gaussians |

fast | FAST feature detector |

harris | Harris corner detector |

susan | SUSAN corner detector |

►Feature matchers | Feature matchers |

hammingMatcher | Hamming Matcher |

nearestNeighbour | Determine the nearest neighbouring points to a given set of points |

►Template matching | |

matchTemplate | Template Matching |

►Events | Managing ArrayFire Events which allows manipulation of operations on computation queues |

Event API | Af_create_event, af_mark_event, etc |

►Functions to create and modify Arrays | Array constructors, random number generation, transpose, indexing, etc |

►Assignment & Indexing operation on arrays | Access sub regions of an array object |

assign | Copy and write values in the locations specified by the sequences |

col/cols | Gets a reference of a col in a 2D af::array |

index | Lookup values of an array based on sequences and/or arrays |

lookup | Lookup values of an array by indexing with another array |

operator() | Gets a reference to a set of elements |

operator(star)= | Multiplies and assigns the value(s) of val to the elements of the af::array |

operator+= | Adds and assigns the value(s) of val to the elements of the af::array |

operator-= | Subtracts and assigns the value(s) of val to the elements of the af::array |

operator/= | Divides and assigns the value(s) of val to the elements of the af::array |

operator= | Assignes the value(s) of val to the elements of the af::array |

row/rows | Gets a reference of a row in a 2D af::array |

slice/slices | Gets a reference of a matrix in a 3D af::array |

Constructors of array class | Construct an array object |

►Functions to create arrays. | Constant, random, range, etc |

►Random Number Generation | Random Number Generation Functions |

getDefaultRandomEngine | Returns the default random engine object |

getSeed | Returns the seed for random number generation |

randn | Create a random array sampled from normal distribution |

randomEngine | Functions to create, modify, use, and destroy randomEngine objects |

randu | Create a random array sampled from uniform distribution |

setDefaultRandomEngineType | Set the default random engine type |

setSeed | Set the seed for random number generation |

constant | Create a array from a scalar input value |

diag | Extract diagonal from a matrix when `extract` is set to true. Create a diagonal matrix from input array when `extract` is set to false |

identity | Create an identity array with diagonal values 1 |

iota | Create an sequence [0, dims.elements() - 1] and modify to specified dimensions dims and then tile it according to tile_dims |

lower | Create a lower triangular matrix from input array |

pad | Pad an array |

range | Creates an array with [0, n] values along the seq_dim which is tiled across other dimensions |

upper | Create a upper triangular matrix from input array |

►Helper functions for arrays | Iszero, isInf, isNan, etc |

cast | |

isNan | |

isinf | |

iszero | |

►Managing devices in ArrayFire | Getting device pointer, allocating and freeing memory |

alloc | Allocate memory using the ArrayFire memory manager |

allocHost | Allocate memory on host |

deviceInfo | Gets the information about device and platform as strings |

deviceMemInfo | Memory manager related functions |

free | Free device memory allocated by ArrayFire's memory manager |

freeHost | Free memory allocated on host internally by ArrayFire |

freePinned | Free pinned memory allocated by ArrayFire's memory manager |

getDevice | Get the current device ID |

getDeviceCount | Gets the number of compute devices on the system |

info | Display ArrayFire and device info |

infoString | Get af::info() as a string |

isDoubleAvailable | Check if double precision support is available for specified device |

isHalfAvailable | Check if half(16-bit) precision floating point support is available for specified device |

pinned | Allocate pinned memory using ArrayFire's memory manager |

setDevice | Change current device to specified device |

sync | Blocks until all operations on device are finished |

Methods of array class | Get information about the array object |

►Move and Reorder array content | Reorder, transpose, flip, join, tile, etc |

flat | Flatten the input to a single dimension |

flip | Flip the input along specified dimension |

join | Join up to 4 arrays along specified dimension |

moddims | Modify the input dimensions without changing the data order |

reorder | Reorder an array according to the specified dimensions |

replace | Replace elements of an array based on a conditional array |

select | Selects elements from two arrays based on the values of a binary conditional array |

shift | Circular shift slong specified dimensions |

tile | Repeat the contents of the input array along the specified dimensions |

transpose | Matrix Transpose |

►Functions to work with internal array layout | Functions to work with arrayfire's internal data structure |

createStridedArray | Create an array with specified strides and offset |

getOffset | Get Offset of the underlying data |

getStrides | Get strides of underlying data |

isLinear | Check if all elements in array are contiguous |

isOwner | Check if underlying data is owned by the current array |

►Image Processing | Image filtering, morphing and transformations |

►Colorspace conversions | RGB to gray, gray to RGB, RGB to HSV, etc |

colorSpace | |

gray2rgb | |

hsv2rgb | |

rgb2gray | |

rgb2hsv | |

rgb2ycbcr | |

ycbcr2rgb | |

►Connected Components & Labeling | Regions |

confidenceCC | Segment image based on similar pixel characteristics |

regions | Find blobs in given image |

►Filters | Bilateral, sobel, mean shift, median / min / max filters etc |

anisotropicDiffusion | Anisotropic Smoothing Filter |

bilateral | Bilateral Filter |

canny | Canny Edge Detector |

inverseDeconv | |

iterativeDeconv | |

maxfilt | Find maximum value from a window |

meanshift | Meanshift Filter |

medfilt | Median Filter |

minfilt | Find minimum value from a window |

sat | Summed Area Tables |

sobel | Sobel Operators |

►Histograms | Image and data histograms |

histequal | Histogram equalization of input image |

histogram | Histogram of input data |

►Image moments | Centroids, areas, etc |

moments | |

►Image transformations | Rotate, skew, etc |

resize | |

rotate | Rotate an input image or array |

scale | |

skew | |

transform | |

transformCoordinates | |

translate | |

►Morphological Operations | Erode, dilate, etc |

dilate | Dilation(morphological operator) for images |

dilate3d | Dilation(morphological operator) for volumes |

erode | Erosion(morphological operator) for images |

erode3d | Erosion(morphological operator) for volumes |

►Utility Functions | LoadImage, saveImage, gaussianKernel |

gaussiankernel | Creates a Gaussian Kernel |

►Wrapping and unwrapping image windows | Wrap, unwrap, etc |

unwrap | Rearrange windowed sections of an array into columns (or rows) |

wrap | |

►Input and Output functions | Functions to read and write data |

►Reading and writing arrays | Printing data to screen / files |

readArray | Load an array from a file |

saveArray | Save an array to a binary file |

►Reading and writing images | Reading and writing images |

deleteImageMem | |

isImageIoAvailable | |

loadImage | |

loadImageMem | |

saveImage | |

saveImageMem | |

►Interface Functions | Backend specific functions |

CUDA specific functions | Accessing ArrayFire's stream, and native device id with other CUDA code |

OpenCL specific functions | Accessing ArrayFire's context, queue, and share data with other OpenCL code |

►Linear Algebra | Matrix multiply, solve, decompositions, sparse matrix |

►BLAS operations | Matrix multiply, dot product, etc |

dot | Calculate the dot product of a vector |

matmul | Matrix multiplication using array |

transpose | Matrix Transpose |

►LAPACK Helper functions | |

isLAPACKAvailable | Returns true is ArrayFire is compiled with LAPACK support |

►Linear solve and least squares | Solve, solveLU, etc |

solve | Solve a system of equations |

solveLU | Solve a system of equations |

►Matrix factorizations and decompositions | LU, QR, Cholesky etc |

cholesky | Perform Cholesky decomposition |

lu | Perform LU decomposition |

qr | Perform QR decomposition |

svd | Computes the singular value decomposition of a matrix |

►Matrix operations | Inverse, det, rank, norm etc |

det | Find the determinant of the input matrix |

inverse | Invert a matrix |

norm | Find the norm of the input matrix |

pinverse | Pseudo-invert a matrix |

rank | Find the rank of the input matrix |

►Sparse functions | Functions to create and handle sparse arrays and matrix operations |

dense | Returns a dense array from a sparse input |

sparse | Create a sparse array |

sparseConvertTo | Convert an existing sparse array into a different storage format |

sparseGetColdx | Returns reference to the column indices component of the sparse array |

sparseGetInfo | Returns reference to components of the input sparse array |

sparseGetNNZ | Returns the number of non zero elements in the sparse array |

sparseGetRowIdx | Returns reference to the row indices component of the sparse array |

sparseGetStorage | Returns the storage type of a sparse array |

sparseGetValues | Returns reference to the values component of the sparse array |

►Machine Learning | Machine learning functions |

Convolutions | Forward and backward convolution passes |

Pooling operations | Pool 2D, ND, maxpooling, minpooling, meanpooling |

►Mathematical functions | Functions from standard math library |

►Arithmetic operations | +, -, *, /, >>, << |

add | |

bitshiftl | |

bitshiftr | |

div | |

mul | |

sub | |

►Complex operations | Real, imag, conjugate etc |

complex | |

conjg | |

imag | |

real | |

►Exponential and logarithmic functions | Exp, log, expm1, log1p, etc |

cbrt | |

erf | |

erfc | |

exp | |

expm1 | |

factorial | |

lgamma | |

log | |

log10 | |

log1p | |

pow | |

root | |

rsqrt | |

sqrt | |

tgamma | |

►Hyperbolic functions | Sinh, cosh, tanh, etc |

acosh | Inverse hyperbolic cosine |

asinh | |

atanh | |

cosh | |

sinh | |

tanh | |

►Logical operations | &&, ||, |, &, <, >, <=, >=, ==, ! |

and | Logical AND |

bitand | |

bitor | |

bitxor | |

eq | |

ge | |

gt | |

le | |

lt | |

neq | |

not | |

or | |

►Numeric functions | Floor, round, min, max, etc |

abs | Absolute value |

arg | Phase of a number in the complex plane |

ceil | |

floor | |

hypot | |

max | |

min | |

mod | |

neg | |

rem | |

round | |

sign | |

trunc | |

►Trigonometric functions | Sin, cos, tan, etc |

acos | Inverse cosine |

asin | |

atan/atan2 | |

cos | |

sin | |

tan/tan2 | |

►Memory Management | Interfaces for writing custom memory managers |

Memory Manager API | Functions for defining custom memory managers |

Memory Manager Utils | Set and unset memory managers, set and get manager payloads, function setters |

Native Memory Interface | Native alloc, native free, get device id, etc |

►Signal Processing | Convolutions, FFTs, filters |

►Convolutions | 1D, 2D and 3D convolutions |

convolve (Non-separable) | Convolution Integral for any(one through three) dimensional data |

convolve (Separable) | Separable Convolution |

convolve1 | Convolution Integral for one dimensional data |

convolve2 | Convolution Integral for two dimensional data |

convolve3 | Convolution Integral for three dimensional data |

►Fast Fourier Transforms | 1D, 2D and 3D forward, inverse FFTs |

fft | Fast Fourier Transform |

fft2 | Fast Fourier Transform |

fft3 | Fast Fourier Transform |

fftC2R | Complex to Real Fast Fourier Transform |

fftR2C | Real to Complex Fast Fourier Transform |

ifft | Fast Fourier Transform |

ifft2 | Fast Fourier Transform |

ifft3 | Fast Fourier Transform |

►Filter | Fir, iir, etc |

fir | This function implements a Finite Impulse Filter |

iir | This function implements a Infinite Impulse Filter |

►Interpolation and approximation | 1D and 2D interpolation |

approx1 | Interpolation across a single dimension |

approx2 | Interpolation along two dimensions |

►Statistics | A list of Statistics functions |

►Basic statistics functions | Mean, median, variance, etc |

corrcoef | |

cov | |

mean | |

median | |

stdev | |

topk | |

var | |

►Unified API Functions | Functions to set current backend and utilities |

getActiveBackend | Get's the backend enum for the active backend |

getAvailableBackends | Returns an integer indicating the backends loaded successfully |

getBackendCount | Get the number of backends whose libraries were successfully loaded |

getBackendId | Get's the backend enum for an array |

getDeviceId | Get's the id of the device an array was created on |

setBackend | Set the current backend when using Unified backend |

►Vector Algorithms | Sum, min, max, sort, set operations, etc |

►Inclusive scan operations | Inclusive / cumulative sum, etc |

accum | Cumulative sum (inclusive). Also known as a scan |

scan | |

scanByKey | |

where | |

►Numerical differentiation | Diff, gradient, etc |

diff1 | |

diff2 | |

grad | |

►Reduction operations | Sum, min, max, etc |

allTrue | Test if all values in an array are true |

allTrueByKey | Calculate if all values that share the same consecutive keys are true |

anyTrueByKey | Calculate if any values that share the same consecutive keys are true |

anytrue | Calculate if any values in an array are true |

count | |

countByKey | |

max | |

maxByKey | |

min | |

minByKey | |

product | |

productByKey | |

sum | |

sumByKey | |

►Set operations | Unique, union, intersect |

setintersect | |

setunion | |

setunique | |

►Sort operations | Sort, sort by key, etc |

sort | |

sortByKey | |

sortIndex | |

►Graphics | |

Rendering Functions | Rendering functions to draw images, plots etc |

Window Functions | Window creation, modification and destruction functions |