#include <stdbool.h>
#include <stdlib.h>
#include <af/version.h>
Go to the source code of this file.
|  | 
| enum | af_err { AF_SUCCESS = 0, 
AF_ERR_NO_MEM = 101, 
AF_ERR_DRIVER = 102, 
AF_ERR_RUNTIME = 103,
 AF_ERR_INVALID_ARRAY = 201, 
AF_ERR_ARG = 202, 
AF_ERR_SIZE = 203, 
AF_ERR_TYPE = 204,
 AF_ERR_DIFF_TYPE = 205, 
AF_ERR_BATCH = 207, 
AF_ERR_NOT_SUPPORTED = 301, 
AF_ERR_NOT_CONFIGURED = 302,
 AF_ERR_NONFREE = 303, 
AF_ERR_NO_DBL = 401, 
AF_ERR_NO_GFX = 402, 
AF_ERR_LOAD_LIB = 501,
 AF_ERR_LOAD_SYM = 502, 
AF_ERR_ARR_BKND_MISMATCH = 503, 
AF_ERR_INTERNAL = 998, 
AF_ERR_UNKNOWN = 999
 }
 | 
|  | 
| enum | af_dtype { f32, 
c32, 
f64, 
c64,
 b8, 
s32, 
u32, 
u8,
 s64, 
u64, 
s16, 
u16
 }
 | 
|  | 
| enum | af_source { afDevice, 
afHost
 } | 
|  | 
| enum | af_interp_type { AF_INTERP_NEAREST, 
AF_INTERP_LINEAR, 
AF_INTERP_BILINEAR, 
AF_INTERP_CUBIC,
 AF_INTERP_LOWER
 }
 | 
|  | 
| enum | af_border_type { AF_PAD_ZERO = 0, 
AF_PAD_SYM
 } | 
|  | 
| enum | af_connectivity { AF_CONNECTIVITY_4 = 4, 
AF_CONNECTIVITY_8 = 8
 } | 
|  | 
| enum | af_conv_mode { AF_CONV_DEFAULT, 
AF_CONV_EXPAND
 } | 
|  | 
| enum | af_conv_domain { AF_CONV_AUTO, 
AF_CONV_SPATIAL, 
AF_CONV_FREQ
 } | 
|  | 
| enum | af_match_type { AF_SAD = 0, 
AF_ZSAD, 
AF_LSAD, 
AF_SSD,
 AF_ZSSD, 
AF_LSSD, 
AF_NCC, 
AF_ZNCC,
 AF_SHD
 }
 | 
|  | 
| enum | af_ycc_std { AF_YCC_601 = 601, 
AF_YCC_709 = 709, 
AF_YCC_2020 = 2020
 } | 
|  | 
| enum | af_cspace_t { AF_GRAY = 0, 
AF_RGB, 
AF_HSV, 
AF_YCbCr
 } | 
|  | 
| enum | af_mat_prop { AF_MAT_NONE = 0, 
AF_MAT_TRANS = 1, 
AF_MAT_CTRANS = 2, 
AF_MAT_CONJ = 4,
 AF_MAT_UPPER = 32, 
AF_MAT_LOWER = 64, 
AF_MAT_DIAG_UNIT = 128, 
AF_MAT_SYM = 512,
 AF_MAT_POSDEF = 1024, 
AF_MAT_ORTHOG = 2048, 
AF_MAT_TRI_DIAG = 4096, 
AF_MAT_BLOCK_DIAG = 8192
 }
 | 
|  | 
| enum | af_norm_type { AF_NORM_VECTOR_1, 
AF_NORM_VECTOR_INF, 
AF_NORM_VECTOR_2, 
AF_NORM_VECTOR_P,
 AF_NORM_MATRIX_1, 
AF_NORM_MATRIX_INF, 
AF_NORM_MATRIX_2, 
AF_NORM_MATRIX_L_PQ,
 AF_NORM_EUCLID = AF_NORM_VECTOR_2
 }
 | 
|  | 
| enum | af_colormap { AF_COLORMAP_DEFAULT = 0, 
AF_COLORMAP_SPECTRUM = 1, 
AF_COLORMAP_COLORS = 2, 
AF_COLORMAP_RED = 3,
 AF_COLORMAP_MOOD = 4, 
AF_COLORMAP_HEAT = 5, 
AF_COLORMAP_BLUE = 6
 }
 | 
|  | 
| enum | af_image_format { AF_FIF_BMP = 0, 
AF_FIF_ICO = 1, 
AF_FIF_JPEG = 2, 
AF_FIF_JNG = 3,
 AF_FIF_PNG = 13, 
AF_FIF_PPM = 14, 
AF_FIF_PPMRAW = 15, 
AF_FIF_TIFF = 18,
 AF_FIF_PSD = 20, 
AF_FIF_HDR = 26, 
AF_FIF_EXR = 29, 
AF_FIF_JP2 = 31,
 AF_FIF_RAW = 34
 }
 | 
|  | 
| enum | af_homography_type { AF_HOMOGRAPHY_RANSAC = 0, 
AF_HOMOGRAPHY_LMEDS = 1
 } | 
|  | 
| enum | af_backend { AF_BACKEND_DEFAULT = 0, 
AF_BACKEND_CPU = 1, 
AF_BACKEND_CUDA = 2, 
AF_BACKEND_OPENCL = 4
 } | 
|  | 
| enum | af_someenum_t { AF_ID = 0
 } | 
|  | 
      
        
          | #define AFAPI   __attribute__((visibility("default"))) | 
      
 
 
      
        
          | #define DEPRECATED | ( |  | msg | ) | __attribute__((deprecated)) | 
      
 
 
      
        
          | #define SIZE_T_FRMT_SPECIFIER   "%zu" | 
      
 
 
      
        
          | typedef unsigned long long uintl | 
      
 
 
| Enumerator | 
|---|
| AF_BACKEND_DEFAULT | Default backend order: OpenCL -> CUDA -> CPU.  | 
| AF_BACKEND_CPU | CPU a.k.a sequential algorithms.  | 
| AF_BACKEND_CUDA | CUDA Compute Backend.  | 
| AF_BACKEND_OPENCL | OpenCL Compute Backend.  | 
 
 
| Enumerator | 
|---|
| AF_PAD_ZERO | Out of bound values are 0.  | 
| AF_PAD_SYM | Out of bound values are symmetric over the edge.  | 
 
 
| Enumerator | 
|---|
| AF_COLORMAP_DEFAULT | Default grayscale map.  | 
| AF_COLORMAP_SPECTRUM | Spectrum map.  | 
| AF_COLORMAP_COLORS | Colors.  | 
| AF_COLORMAP_RED | Red hue map.  | 
| AF_COLORMAP_MOOD | Mood map.  | 
| AF_COLORMAP_HEAT | Heat map.  | 
| AF_COLORMAP_BLUE | Blue hue map.  | 
 
 
| Enumerator | 
|---|
| AF_CONNECTIVITY_4 | Connectivity includes neighbors, North, East, South and West of current pixel.  | 
| AF_CONNECTIVITY_8 | Connectivity includes 4-connectivity neigbors and also those on Northeast, Northwest, Southeast and Southwest.  | 
 
 
| Enumerator | 
|---|
| AF_CONV_AUTO | ArrayFire automatically picks the right convolution algorithm.  | 
| AF_CONV_SPATIAL | Perform convolution in spatial domain.  | 
| AF_CONV_FREQ | Perform convolution in frequency domain.  | 
 
 
| Enumerator | 
|---|
| AF_CONV_DEFAULT | Output of the convolution is the same size as input.  | 
| AF_CONV_EXPAND | Output of the convolution is signal_len + filter_len - 1.  | 
 
 
| Enumerator | 
|---|
| AF_GRAY | Grayscale.  | 
| AF_RGB | 3-channel RGB  | 
| AF_HSV | 3-channel HSV  | 
| AF_YCbCr | 3-channel YCbCr  | 
 
 
| Enumerator | 
|---|
| f32 | 32-bit floating point values  | 
| c32 | 32-bit complex floating point values  | 
| f64 | 64-bit complex floating point values  | 
| c64 | 64-bit complex floating point values  | 
| b8 | 8-bit boolean values  | 
| s32 | 32-bit signed integral values  | 
| u32 | 32-bit unsigned integral values  | 
| u8 | 8-bit unsigned integral values  | 
| s64 | 64-bit signed integral values  | 
| u64 | 64-bit unsigned integral values  | 
| s16 | 16-bit signed integral values  | 
| u16 | 16-bit unsigned integral values  | 
- Examples: 
- convolve.cpp, fft.cpp, and histogram.cpp.
 
 
| Enumerator | 
|---|
| AF_SUCCESS | The function returned successfully.  | 
| AF_ERR_NO_MEM | The system or device ran out of memory.  | 
| AF_ERR_DRIVER | There was an error in the device driver.  | 
| AF_ERR_RUNTIME | There was an error with the runtime environment.  | 
| AF_ERR_INVALID_ARRAY | The input array is not a valid af_array object.  | 
| AF_ERR_ARG | One of the function arguments is incorrect.  | 
| AF_ERR_SIZE | The size is incorrect.  | 
| AF_ERR_TYPE | The type is not suppported by this function.  | 
| AF_ERR_DIFF_TYPE | The type of the input arrays are not compatible.  | 
| AF_ERR_BATCH | Function does not support GFOR / batch mode.  | 
| AF_ERR_NOT_SUPPORTED | The option is not supported.  | 
| AF_ERR_NOT_CONFIGURED | This build of ArrayFire does not support this feature.  | 
| AF_ERR_NONFREE | This build of ArrayFire is not compiled with "nonfree" algorithms.  | 
| AF_ERR_NO_DBL | This device does not support double.  | 
| AF_ERR_NO_GFX | This build of ArrayFire was not built with graphics or this device does not support graphics.  | 
| AF_ERR_LOAD_LIB | There was an error when loading the libraries.  | 
| AF_ERR_LOAD_SYM | There was an error when loading the symbols.  | 
| AF_ERR_ARR_BKND_MISMATCH | There was a mismatch between the input array and the active backend.  | 
| AF_ERR_INTERNAL | There was an internal error either in ArrayFire or in a project upstream.  | 
| AF_ERR_UNKNOWN | Unknown Error.  | 
 
 
| Enumerator | 
|---|
| AF_HOMOGRAPHY_RANSAC | Computes homography using RANSAC.  | 
| AF_HOMOGRAPHY_LMEDS | Computes homography using Least Median of Squares.  | 
 
 
| Enumerator | 
|---|
| AF_FIF_BMP | FreeImage Enum for Bitmap File.  | 
| AF_FIF_ICO | FreeImage Enum for Windows Icon File.  | 
| AF_FIF_JPEG | FreeImage Enum for JPEG File.  | 
| AF_FIF_JNG | FreeImage Enum for JPEG Network Graphics File.  | 
| AF_FIF_PNG | FreeImage Enum for Portable Network Graphics File.  | 
| AF_FIF_PPM | FreeImage Enum for Portable Pixelmap (ASCII) File.  | 
| AF_FIF_PPMRAW | FreeImage Enum for Portable Pixelmap (Binary) File.  | 
| AF_FIF_TIFF | FreeImage Enum for Tagged Image File Format File.  | 
| AF_FIF_PSD | FreeImage Enum for Adobe Photoshop File.  | 
| AF_FIF_HDR | FreeImage Enum for High Dynamic Range File.  | 
| AF_FIF_EXR | FreeImage Enum for ILM OpenEXR File.  | 
| AF_FIF_JP2 | FreeImage Enum for JPEG-2000 File.  | 
| AF_FIF_RAW | FreeImage Enum for RAW Camera Image File.  | 
 
 
| Enumerator | 
|---|
| AF_INTERP_NEAREST | Nearest Interpolation.  | 
| AF_INTERP_LINEAR | Linear Interpolation.  | 
| AF_INTERP_BILINEAR | Bilinear Interpolation.  | 
| AF_INTERP_CUBIC | Cubic Interpolation.  | 
| AF_INTERP_LOWER | Floor Indexed.  | 
 
 
| Enumerator | 
|---|
| AF_MAT_NONE | Default.  | 
| AF_MAT_TRANS | Data needs to be transposed.  | 
| AF_MAT_CTRANS | Data needs to be conjugate tansposed.  | 
| AF_MAT_CONJ | Data needs to be conjugate.  | 
| AF_MAT_UPPER | Matrix is upper triangular.  | 
| AF_MAT_LOWER | Matrix is lower triangular.  | 
| AF_MAT_DIAG_UNIT | Matrix diagonal contains unitary values.  | 
| AF_MAT_SYM | Matrix is symmetric.  | 
| AF_MAT_POSDEF | Matrix is positive definite.  | 
| AF_MAT_ORTHOG | Matrix is orthogonal.  | 
| AF_MAT_TRI_DIAG | Matrix is tri diagonal.  | 
| AF_MAT_BLOCK_DIAG | Matrix is block diagonal.  | 
 
 
| Enumerator | 
|---|
| AF_SAD | Match based on Sum of Absolute Differences (SAD)  | 
| AF_ZSAD | Match based on Zero mean SAD.  | 
| AF_LSAD | Match based on Locally scaled SAD.  | 
| AF_SSD | Match based on Sum of Squared Differences (SSD)  | 
| AF_ZSSD | Match based on Zero mean SSD.  | 
| AF_LSSD | Match based on Locally scaled SSD.  | 
| AF_NCC | Match based on Normalized Cross Correlation (NCC)  | 
| AF_ZNCC | Match based on Zero mean NCC.  | 
| AF_SHD | Match based on Sum of Hamming Distances (SHD)  | 
 
 
| Enumerator | 
|---|
| AF_NORM_VECTOR_1 | treats the input as a vector and returns the sum of absolute values  | 
| AF_NORM_VECTOR_INF | treats the input as a vector and returns the max of absolute values  | 
| AF_NORM_VECTOR_2 | treats the input as a vector and returns euclidean norm  | 
| AF_NORM_VECTOR_P | treats the input as a vector and returns the p-norm  | 
| AF_NORM_MATRIX_1 | return the max of column sums  | 
| AF_NORM_MATRIX_INF | return the max of row sums  | 
| AF_NORM_MATRIX_2 | returns the max singular value). Currently NOT SUPPORTED  | 
| AF_NORM_MATRIX_L_PQ | returns Lpq-norm  | 
| AF_NORM_EUCLID | The default. Same as AF_NORM_VECTOR_2.  | 
 
 
| Enumerator | 
|---|
| afDevice | Device pointer.  | 
| afHost | Host pointer.  | 
 
 
| Enumerator | 
|---|
| AF_YCC_601 | ITU-R BT.601 (formerly CCIR 601) standard.  | 
| AF_YCC_709 | ITU-R BT.709 standard.  | 
| AF_YCC_2020 | ITU-R BT.2020 standard.  |