A high-performance general-purpose compute library
ArrayFire Functions

Topics

 abs
 Calculate the absolute value.
 
 accum
 Evaluate the cumulative sum (inclusive) along a given dimension.
 
 acos
 Evaluate the inverse cosine function (arc cosine).
 
 acosh
 Evaluate the inverse hyperbolic cosine function (area hyperbolic cosine).
 
 add
 Elementwise addition.
 
 allTrue
 Check if all values along a given dimension are true.
 
 allTrueByKey
 Check if all values along a given dimension are true, according to an array of keys.
 
 allocHost
 Allocate memory on host
 
 allocV2
 Allocate memory using the ArrayFire memory manager
 
 and
 Evaluate the logical AND of two arrays.
 
 anisotropicDiffusion
 Anisotropic Smoothing Filter
 
 anyTrueByKey
 Check if any values along a given dimension are true, according to an array of keys.
 
 anytrue
 Check if any values along a given dimension are true.
 
 approx1
 Interpolation across a single dimension
 
 approx2
 Interpolation along two dimensions
 
 arg
 Calculate the phase angle (in radians) of a complex array.
 
 asin
 Evaluate the inverse sine function (arc sine).
 
 asinh
 Evaluate the inverse hyperbolic sine function (area hyperbolic sine).
 
 assign
 Copy and write values in the locations specified by the sequences
 
 atan/atan2
 Evaluate the inverse tangent function (arc tangent).
 
 atanh
 Evaluate the inverse hyperbolic tangent function (area hyperbolic tangent).
 
 bilateral
 Bilateral Filter
 
 bitand
 Evaluate the bitwise AND of two arrays.
 
 bitnot
 Evaluate the bitwise NOT of an array.
 
 bitor
 Evaluate the bitwise OR of two arrays.
 
 bitshiftl
 Shift the bits of integer arrays left.
 
 bitshiftr
 Shift the bits of integer arrays right.
 
 bitxor
 Evaluate the bitwise XOR of two arrays.
 
 canny
 Canny Edge Detector
 
 cast
 Cast an array from one type to another.
 
 cbrt
 Evaluate the cube root.
 
 ceil
 Rounds up to the least integer greater than or equal to x.
 
 cholesky
 
 
 clamp
 Clamp an array between an upper and a lower limit.
 
 col/cols
 Gets a reference of a col in a 2D af::array
 
 colorSpace
 Colorspace conversion function
 
 complex
 Create complex arrays.
 
 confidenceCC
 Segment image based on similar pixel characteristics
 
 conjg
 Evaluate the complex conjugate of an input array.
 
 constant
 
 
 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
 Evaluate the cosine function.
 
 cosh
 Evaluate the hyperbolic cosine function.
 
 count
 Count non-zero values in an array along a given dimension.
 
 countByKey
 Count non-zero values in an array, according to an array of keys.
 
 cov
 
 
 deleteImageMem
 Delete memory created by saveImageMem and af_save_image_memory function.
 
 dense
 
 
 det
 
 
 deviceInfo
 Gets the information about device and platform as strings
 
 deviceMemInfo
 Memory manager related functions
 
 diag
 
 
 diff1
 Calculate the first order difference in an array over a given dimension.
 
 diff2
 Calculate the second order difference in an array over a given dimension.
 
 dilate
 Dilation(morphological operator) for images
 
 dilate3d
 Dilation(morphological operator) for volumes
 
 div
 Elementwise division.
 
 dog
 Difference of Gaussians
 
 dot
 
 
 eq
 Equal to, an elementwise comparison of two arrays.
 
 erf
 Evaluate the error function.
 
 erfc
 Evaluate the complementary error function.
 
 erode
 Erosion(morphological operator) for images
 
 erode3d
 Erosion(morphological operator) for volumes
 
 exp
 Evaluate the exponential function.
 
 expm1
 Evaluate the exponential function of an array minus 1, exp(in) - 1.
 
 factorial
 Evaluate the factorial.
 
 fast
 FAST feature detector
 
 features
 
 
 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
 
 
 flip
 
 
 floor
 Rounds down to the greatest integer less than or equal to x.
 
 freeHost
 Free memory allocated on host internally by ArrayFire
 
 freePinned
 Free pinned memory allocated by ArrayFire's memory manager
 
 freeV2
 Returns memory to ArrayFire's memory manager.
 
 gaussiankernel
 Creates a Gaussian Kernel
 
 ge
 Greater than or equal to, an elementwise comparison of two arrays.
 
 getActiveBackend
 
 
 getAvailableBackends
 
 
 getBackendCount
 
 
 getBackendId
 
 
 getDefaultRandomEngine
 
 
 getDevice
 Get the current device ID
 
 getDeviceCount
 Gets the number of compute devices on the system
 
 getDeviceId
 
 
 getSeed
 
 
 gloh
 SIFT feature detector and GLOH descriptor extractor
 
 grad
 Calculate the gradients of the input
 
 gray2rgb
 Grayscale to RGB colorspace converter
 
 gt
 Greater than comparison, an elementwise comparison of two arrays.
 
 hammingMatcher
 Hamming Matcher
 
 harris
 Harris corner detector
 
 histequal
 Histogram equalization of input image
 
 histogram
 Histogram of input data
 
 homography
 Homography Estimation
 
 hsv2rgb
 HSV to RGB colorspace converter
 
 hypot
 Evaluate the length of the hypotenuse of two inputs.
 
 identity
 
 
 ifft
 Fast Fourier Transform
 
 ifft2
 Fast Fourier Transform
 
 ifft3
 Fast Fourier Transform
 
 iir
 This function implements a Infinite Impulse Filter
 
 imag
 Returns the imaginary part of a complex array.
 
 index
 Lookup values of an array based on sequences and/or arrays
 
 info
 
 
 infoString
 
 
 inverse
 
 
 inverseDeconv
 Inverse Deconvolution
 
 iota
 
 
 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
 Returns true if ArrayFire was compiled with ImageIO (FreeImage) support
 
 isLAPACKAvailable
 
 
 isinf
 Check if values are infinite.
 
 isnan
 Check if values are NaN.
 
 iszero
 Check if values are zero.
 
 iterativeDeconv
 Iterative Deconvolution
 
 join
 
 
 le
 Less than or equal to, an elementwise comparison of two arrays.
 
 lgamma
 Evaluate the logarithm of the absolute value of the gamma function.
 
 loadImage
 Load an image from disk to an array
 
 loadImageMem
 Load an image from memory which is stored as a FreeImage stream (FIMEMORY).
 
 log
 Evaluate the natural logarithm.
 
 log10
 Evaluate the base 10 logarithm.
 
 log1p
 Evaluate the natural logarithm of 1 + input, ln(1+in).
 
 log2
 Evaluate the base 2 logarithm.
 
 lookup
 Lookup values of an array by indexing with another array.
 
 lower
 
 
 lt
 Less than, an elementwise comparison of two arrays.
 
 lu
 
 
 matchTemplate
 Template Matching
 
 matmul
 
 
 max
 Return the maximum along a given dimension.
 
 max
 Returns the elementwise maximum between two arrays.
 
 maxByKey
 Return the maximum along a given dimension, according to an array of keys.
 
 maxfilt
 Find maximum value from a window
 
 mean
 
 
 meanshift
 Meanshift Filter
 
 medfilt
 Median Filter
 
 median
 
 
 min
 Return the minimum along a given dimension.
 
 min
 Returns the elementwise minimum between two arrays.
 
 minByKey
 Return the minimum along a given dimension, according to an array of keys.
 
 minfilt
 Find minimum value from a window
 
 mod
 Calculate the modulus.
 
 moddims
 
 
 moments
 The af::moments() function allows for finding different properties of image regions.
 
 mul
 Elementwise multiply.
 
 nearestNeighbour
 Determine the nearest neighbouring points to a given set of points
 
 neg
 Negate an array.
 
 neq
 Not equal to, an elementwise comparison of two arrays.
 
 norm
 
 
 not
 Evaluate the logical NOT of an 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.
 
 or
 Evaluate the logical OR of two arrays.
 
 orb
 ORB Feature descriptor
 
 pad
 
 
 pinned
 Allocate pinned memory using ArrayFire's memory manager.
 
 pinverse
 
 
 pow
 Raise a base to a power (or exponent).
 
 pow2
 Raise 2 to a power (or exponent).
 
 print
 
 
 product
 Multiply array elements over a given dimension.
 
 productByKey
 Multiply array elements over a given dimension, according to an array of keys.
 
 qr
 
 
 randn
 
 
 randomEngine
 
 
 randu
 
 
 range
 
 
 rank
 
 
 readArray
 
 
 real
 Returns the real part of a complex array.
 
 regions
 Find blobs in given image.
 
 rem
 Calculate the remainder of a division.
 
 reorder
 
 
 replace
 
 
 resize
 Resize an input image
 
 rgb2gray
 RGB to Grayscale colorspace converter
 
 rgb2hsv
 RGB to HSV colorspace converter
 
 rgb2ycbcr
 RGB to YCbCr colorspace converter
 
 root
 Evaluate the nth root.
 
 rotate
 Rotate an input image or array
 
 round
 Round numbers to the nearest integer.
 
 row/rows
 Gets a reference of a row in a 2D af::array
 
 rsqrt
 Evaluate the reciprocal square root.
 
 sat
 Summed Area Tables
 
 saveArray
 
 
 saveImage
 Save an array to disk as an image
 
 saveImageMem
 Save an array to memory as an image using FreeImage stream (FIMEMORY).
 
 scale
 Scale an input image
 
 scan
 Scan an array (generalized) over a given dimension.
 
 scanByKey
 Scan an array (generalized) over a given dimension, according to an array of keys.
 
 select
 
 
 setBackend
 
 
 setDefaultRandomEngineType
 
 
 setDevice
 Change current device to specified device
 
 setSeed
 
 
 setintersect
 Evaluate the intersection of two arrays.
 
 setunion
 Evaluate the union of two arrays.
 
 setunique
 Return the unique values in an array.
 
 shift
 
 
 sift
 SIFT feature detector and descriptor extractor
 
 sigmoid
 Evaluate the logistical sigmoid function.
 
 sign
 Return the sign of elements in an array.
 
 sin
 Evaluate the sine function.
 
 sinh
 Evaluate the hyperbolic sine function.
 
 skew
 Skew an input image
 
 slice/slices
 Gets a reference of a matrix in a 3D af::array
 
 sobel
 Sobel Operators
 
 solve
 
 
 solveLU
 
 
 sort
 Sort an array over a given dimension.
 
 sortByKey
 Sort an array over a given dimension, according to an array of keys.
 
 sortIndex
 Sort an array over a given dimension and return the original indices.
 
 sparse
 
 
 sparseConvertTo
 
 
 sparseGetColdx
 
 
 sparseGetInfo
 
 
 sparseGetNNZ
 
 
 sparseGetRowIdx
 
 
 sparseGetStorage
 
 
 sparseGetValues
 
 
 sqrt
 Evaluate the square root.
 
 stdev
 
 
 sub
 Elementwise subtraction.
 
 sum
 Sum array elements over a given dimension.
 
 sumByKey
 Sum array elements over a given dimension, according to an array of keys.
 
 susan
 SUSAN corner detector
 
 svd
 
 
 sync
 Blocks until all operations on device are finished
 
 tan
 Evaluate the tangent function.
 
 tanh
 Evaluate the hyperbolic tangent function.
 
 tgamma
 Evaluate the gamma function.
 
 tile
 
 
 toString
 
 
 topk
 
 
 transform
 Transform an input image
 
 transformCoordinates
 Transform input coordinates
 
 translate
 Translate an input image
 
 transpose
 
 
 trunc
 Truncate numbers to nearest integer.
 
 unwrap
 Rearrange windowed sections of an array into columns (or rows)
 
 upper
 
 
 var
 
 
 where
 Locate the indices of the non-zero values in an array.
 
 wrap
 Performs the opposite of af::unwrap().
 
 ycbcr2rgb
 YCbCr to RGB colorspace converter
 

Detailed Description