| Copyright | David Johnson (c) 2019-2026 |
|---|---|
| License | BSD3 |
| Maintainer | David Johnson <code@dmj.io> |
| Stability | Experimental |
| Portability | GHC |
| Safe Haskell | None |
| Language | Haskell2010 |
ArrayFire.Types
Description
Various Types related to the ArrayFire API
Synopsis
- data AFException = AFException {}
- data AFExceptionType
- = NoMemoryError
- | DriverError
- | RuntimeError
- | InvalidArrayError
- | ArgError
- | SizeError
- | TypeError
- | DiffTypeError
- | BatchError
- | DeviceError
- | NotSupportedError
- | NotConfiguredError
- | NonFreeError
- | NoDblError
- | NoGfxError
- | LoadLibError
- | LoadSymError
- | BackendMismatchError
- | InternalError
- | UnknownError
- | UnhandledError
- data Array a
- data Window
- data RandomEngine
- data Features
- class Storable a => AFType a where
- class AFType a => AFResult a where
- type Scalar a
- toAFResult :: (Double, Double) -> Scalar a
- data TopK
- data VarBias
- data Backend
- data MatchType
- data BinaryOp
- data MatProp
- data HomographyType
- data RandomEngineType
- data Cell = Cell {}
- data MarkerType
- data InterpType
- data Connectivity
- data CSpace
- data YccStd
- data MomentType
- = M00
- | M01
- | M10
- | M11
- | FirstOrder
- data CannyThreshold
- data FluxFunction
- data DiffusionEq
- data IterativeDeconvAlgo
- data InverseDeconvAlgo
- data Seq = Seq {}
- data Index
- seqIdx :: Seq -> Bool -> Index
- arrIdx :: Array Int -> Bool -> Index
- range :: Int -> Int -> Index
- rangeStep :: Int -> Int -> Int -> Index
- at :: Int -> Index
- data NormType
- data ConvMode
- data ConvDomain
- data BorderType
- data Storage
- data AFDType
- newtype AFDtype = AFDtype {}
- data ColorMap
Documentation
data AFException Source #
Exception type for ArrayFire API
Constructors
| AFException | |
Fields
| |
Instances
| Exception AFException Source # | |
Defined in ArrayFire.Exception Methods toException :: AFException -> SomeException # fromException :: SomeException -> Maybe AFException # displayException :: AFException -> String # backtraceDesired :: AFException -> Bool # | |
| Show AFException Source # | |
Defined in ArrayFire.Exception Methods showsPrec :: Int -> AFException -> ShowS # show :: AFException -> String # showList :: [AFException] -> ShowS # | |
| Eq AFException Source # | |
Defined in ArrayFire.Exception | |
data AFExceptionType Source #
ArrayFire exception type
Constructors
Instances
| Show AFExceptionType Source # | |
Defined in ArrayFire.Exception Methods showsPrec :: Int -> AFExceptionType -> ShowS # show :: AFExceptionType -> String # showList :: [AFExceptionType] -> ShowS # | |
| Eq AFExceptionType Source # | |
Defined in ArrayFire.Exception Methods (==) :: AFExceptionType -> AFExceptionType -> Bool # (/=) :: AFExceptionType -> AFExceptionType -> Bool # | |
ArrayFire Array
Instances
| NFData (Array a) Source # | |
Defined in ArrayFire.Orphans | |
| (Ord a, AFType a, Fractional a) => Floating (Array a) Source # | |
| (Num a, AFType a) => Num (Array a) Source # | Elementwise Note that
|
| (Fractional a, AFType a) => Fractional (Array a) Source # | |
| Show (Array a) Source # | |
| (AFType a, Eq a) => Eq (Array a) Source # | Structural equality on Both inputs are
Caveat: comparisons follow IEEE semantics elementwise, so an array
containing |
data RandomEngine Source #
ArrayFire RandomEngine
class Storable a => AFType a where Source #
Mapping of Haskell types to ArrayFire types
Instances
class AFType a => AFResult a where Source #
Maps an ArrayFire element type to the scalar type returned by whole-array
reductions (e.g. meanAll, det). Real and integral element types yield
Double; complex element types yield 'Complex Double'.
Methods
toAFResult :: (Double, Double) -> Scalar a Source #
Convert the raw (real, imag) pair returned by the C API to the
appropriate Haskell scalar.
Instances
| AFResult CBool Source # | |
Defined in ArrayFire.Internal.Types | |
| AFResult Int16 Source # | |
Defined in ArrayFire.Internal.Types | |
| AFResult Int32 Source # | |
Defined in ArrayFire.Internal.Types | |
| AFResult Int64 Source # | |
Defined in ArrayFire.Internal.Types | |
| AFResult Word16 Source # | |
Defined in ArrayFire.Internal.Types | |
| AFResult Word32 Source # | |
Defined in ArrayFire.Internal.Types | |
| AFResult Word64 Source # | |
Defined in ArrayFire.Internal.Types | |
| AFResult Word8 Source # | |
Defined in ArrayFire.Internal.Types | |
| AFResult Double Source # | |
Defined in ArrayFire.Internal.Types | |
| AFResult Float Source # | |
Defined in ArrayFire.Internal.Types | |
| AFResult Int Source # | |
Defined in ArrayFire.Internal.Types | |
| AFResult Word Source # | |
Defined in ArrayFire.Internal.Types | |
| AFResult (Complex Double) Source # | |
| AFResult (Complex Float) Source # | |
Order for topk results
Constructors
| TopKDefault | Default order (same as |
| TopKMin | Return the k smallest values |
| TopKMax | Return the k largest values |
Variance bias correction method
Constructors
| VarianceDefault | Default (same as |
| VarianceSample | Sample variance (divides by N-1; Bessel's correction) |
| VariancePopulation | Population variance (divides by N) |
Instances
| Enum VarBias Source # | |
| Show VarBias Source # | |
| Eq VarBias Source # | |
| Ord VarBias Source # | |
Defined in ArrayFire.Internal.Types | |
ArrayFire backends
Constructors
| Default | Use the default backend (determined by ArrayFire) |
| CPU | CPU backend (always available) |
| CUDA | NVIDIA CUDA GPU backend |
| OpenCL | OpenCL backend (AMD, Intel, NVIDIA) |
Template matching metric type
Constructors
| MatchTypeSAD | Sum of Absolute Differences |
| MatchTypeZSAD | Zero-mean Sum of Absolute Differences |
| MatchTypeLSAD | Locally scaled Sum of Absolute Differences |
| MatchTypeSSD | Sum of Squared Differences |
| MatchTypeZSSD | Zero-mean Sum of Squared Differences |
| MatchTypeLSSD | Locally scaled Sum of Squared Differences |
| MatchTypeNCC | Normalized Cross Correlation |
| MatchTypeZNCC | Zero-mean Normalized Cross Correlation |
| MatchTypeSHD | Sum of Hamming Distances |
Instances
| Enum MatchType Source # | |
Defined in ArrayFire.Internal.Types Methods succ :: MatchType -> MatchType # pred :: MatchType -> MatchType # fromEnum :: MatchType -> Int # enumFrom :: MatchType -> [MatchType] # enumFromThen :: MatchType -> MatchType -> [MatchType] # enumFromTo :: MatchType -> MatchType -> [MatchType] # enumFromThenTo :: MatchType -> MatchType -> MatchType -> [MatchType] # | |
| Show MatchType Source # | |
| Eq MatchType Source # | |
| Ord MatchType Source # | |
Binary operation support (used with scan-by-key and similar operations)
Matrix properties
Constructors
| None | No property |
| Trans | Data needs to be transposed |
| CTrans | Data needs to be conjugate transposed |
| Conj | Data needs to be conjugated |
| Upper | Matrix is upper triangular |
| Lower | Matrix is lower triangular |
| DiagUnit | Diagonal contains units; used with triangular solvers |
| Sym | Matrix is symmetric |
| PosDef | Matrix is positive definite |
| Orthog | Matrix is orthogonal |
| TriDiag | Matrix is tri-diagonal |
| BlockDiag | Matrix is block diagonal |
data HomographyType Source #
Homography estimation method
Constructors
| RANSAC | Random Sample Consensus — robust to outliers |
| LMEDS | Least Median of Squares — robust to up to 50% outliers |
Instances
data RandomEngineType Source #
Type for different RandomEngines
Instances
| Show RandomEngineType Source # | |
Defined in ArrayFire.Internal.Types Methods showsPrec :: Int -> RandomEngineType -> ShowS # show :: RandomEngineType -> String # showList :: [RandomEngineType] -> ShowS # | |
| Eq RandomEngineType Source # | |
Defined in ArrayFire.Internal.Types Methods (==) :: RandomEngineType -> RandomEngineType -> Bool # (/=) :: RandomEngineType -> RandomEngineType -> Bool # | |
Cell type, used in Graphics module to describe a subplot position
Constructors
| Cell | |
data MarkerType Source #
Marker shape for scatter plots
Constructors
| MarkerTypeNone | No marker |
| MarkerTypePoint | Single pixel point |
| MarkerTypeCircle | Circle |
| MarkerTypeSquare | Square |
| MarkerTypeTriangle | Triangle |
| MarkerTypeCross | X cross |
| MarkerTypePlus | Plus sign |
| MarkerTypeStar | Star |
Instances
data InterpType Source #
Interpolation type
Constructors
| Nearest | Nearest-neighbor interpolation |
| Linear | Linear interpolation |
| Bilinear | Bilinear interpolation |
| Cubic | Cubic interpolation |
| LowerInterp | Floor interpolation (rounds down to nearest integer) |
| LinearCosine | Cosine-windowed linear interpolation |
| BilinearCosine | Cosine-windowed bilinear interpolation |
| Bicubic | Bicubic interpolation |
| CubicSpline | Cubic spline interpolation |
| BicubicSpline | Bicubic spline interpolation |
Instances
data Connectivity Source #
Connectivity Type
Instances
Color Space type
Constructors
| Gray | Grayscale |
| RGB | Red-Green-Blue |
| HSV | Hue-Saturation-Value |
| YCBCR | Luminance + chroma (blue-difference, red-difference) |
YCbCr standard
Constructors
| Ycc601 | ITU-R BT.601 (standard definition) |
| Ycc709 | ITU-R BT.709 (high definition) |
| Ycc2020 | ITU-R BT.2020 (ultra high definition) |
data MomentType Source #
Image moment types
Constructors
| M00 | Zeroth-order moment (image area / mass) |
| M01 | First-order moment about x-axis |
| M10 | First-order moment about y-axis |
| M11 | Mixed first-order moment |
| FirstOrder | All first-order moments (M00, M01, M10, M11) |
Instances
| Show MomentType Source # | |
Defined in ArrayFire.Internal.Types Methods showsPrec :: Int -> MomentType -> ShowS # show :: MomentType -> String # showList :: [MomentType] -> ShowS # | |
| Eq MomentType Source # | |
Defined in ArrayFire.Internal.Types | |
| Ord MomentType Source # | |
Defined in ArrayFire.Internal.Types Methods compare :: MomentType -> MomentType -> Ordering # (<) :: MomentType -> MomentType -> Bool # (<=) :: MomentType -> MomentType -> Bool # (>) :: MomentType -> MomentType -> Bool # (>=) :: MomentType -> MomentType -> Bool # max :: MomentType -> MomentType -> MomentType # min :: MomentType -> MomentType -> MomentType # | |
data CannyThreshold Source #
Threshold mode for Canny edge detection
Constructors
| Manual | User-supplied low and high threshold values |
| AutoOtsu | Thresholds computed automatically via Otsu's method |
Instances
data FluxFunction Source #
Flux function for anisotropic diffusion
Constructors
| FluxDefault | Default flux function (same as |
| FluxQuadratic | Quadratic flux function (Perona-Malik) |
| FluxExponential | Exponential flux function (Perona-Malik) |
Instances
data DiffusionEq Source #
Diffusion equation type for anisotropic smoothing
Constructors
| DiffusionDefault | Default (same as |
| DiffusionGrad | Gradient-based diffusion (Perona-Malik) |
| DiffusionMCDE | Mean curvature diffusion equation |
Instances
data IterativeDeconvAlgo Source #
Iterative deconvolution algorithm
Constructors
| DeconvDefault | Default algorithm (same as |
| DeconvLandweber | Landweber iteration (gradient descent on least squares) |
| DeconvRichardsonLucy | Richardson-Lucy algorithm (maximum likelihood for Poisson noise) |
Instances
data InverseDeconvAlgo Source #
Inverse (non-iterative) deconvolution algorithm
Constructors
| InverseDeconvDefault | Default algorithm (same as |
| InverseDeconvTikhonov | Tikhonov regularized Wiener filter |
Instances
Index Type
Instances
| ToIndexList Index Source # | |
Defined in ArrayFire.Index Methods toIndexList :: Index -> [Index] Source # | |
| ToIndexList (Index, Index) Source # | |
Defined in ArrayFire.Index | |
| ToIndexList (Index, Index, Index) Source # | |
Defined in ArrayFire.Index | |
| ToIndexList (Index, Index, Index, Index) Source # | |
Defined in ArrayFire.Index | |
Norm Type
Constructors
| NormVectorOne | treats the input as a vector and returns the sum of absolute values |
| NormVectorInf | treats the input as a vector and returns the max of absolute values |
| NormVector2 | treats the input as a vector and returns euclidean norm |
| NormVectorP | treats the input as a vector and returns the p-norm |
| NormMatrix1 | return the max of column sums |
| NormMatrixInf | return the max of row sums |
| NormMatrix2 | returns the max singular value). Currently NOT SUPPORTED |
| NormMatrixLPQ | returns Lpq-norm |
| NormEuclid | The default. Same as AF_NORM_VECTOR_2 |
Instances
| Enum NormType Source # | |
Defined in ArrayFire.Internal.Types | |
| Show NormType Source # | |
| Eq NormType Source # | |
Convolution Mode
Constructors
| ConvDefault | Output of the convolution is the same size as input |
| ConvExpand | Output of the convolution is signal_len + filter_len - 1 |
Instances
| Enum ConvMode Source # | |
Defined in ArrayFire.Internal.Types | |
| Show ConvMode Source # | |
| Eq ConvMode Source # | |
data ConvDomain Source #
Convolution Domain
Constructors
| ConvDomainAuto | ArrayFire automatically picks the right convolution algorithm |
| ConvDomainSpatial | Perform convolution in spatial domain |
| ConvDomainFreq | Perform convolution in frequency domain |
Instances
| Enum ConvDomain Source # | |
Defined in ArrayFire.Internal.Types Methods succ :: ConvDomain -> ConvDomain # pred :: ConvDomain -> ConvDomain # toEnum :: Int -> ConvDomain # fromEnum :: ConvDomain -> Int # enumFrom :: ConvDomain -> [ConvDomain] # enumFromThen :: ConvDomain -> ConvDomain -> [ConvDomain] # enumFromTo :: ConvDomain -> ConvDomain -> [ConvDomain] # enumFromThenTo :: ConvDomain -> ConvDomain -> ConvDomain -> [ConvDomain] # | |
| Show ConvDomain Source # | |
Defined in ArrayFire.Internal.Types Methods showsPrec :: Int -> ConvDomain -> ShowS # show :: ConvDomain -> String # showList :: [ConvDomain] -> ShowS # | |
| Eq ConvDomain Source # | |
Defined in ArrayFire.Internal.Types | |
data BorderType Source #
Border Type
Instances
Storage type used for Sparse arrays
Constructors
| Dense | Dense storage (not sparse) |
| CSR | Compressed Sparse Row format |
| CSC | Compressed Sparse Column format |
| COO | Coordinate list (COO) format |
Instances
| Enum Storage Source # | |
| Show Storage Source # | |
| Eq Storage Source # | |
| Ord Storage Source # | |
Defined in ArrayFire.Internal.Types | |
ArrayFire element types (mirrors af_dtype)
Constructors
| F32 | 32-bit IEEE 754 float |
| C32 | Complex number of two 32-bit floats |
| F64 | 64-bit IEEE 754 double |
| C64 | Complex number of two 64-bit doubles |
| B8 | 8-bit boolean |
| S32 | 32-bit signed integer |
| U32 | 32-bit unsigned integer |
| U8 | 8-bit unsigned integer |
| S64 | 64-bit signed integer |
| U64 | 64-bit unsigned integer |
| S16 | 16-bit signed integer |
| U16 | 16-bit unsigned integer |
Instances
Instances
| Storable AFDtype Source # | |
| Show AFDtype Source # | |
| Eq AFDtype Source # | |
Color map for rendering
Constructors
| ColorMapDefault | Default grayscale color map |
| ColorMapSpectrum | Rainbow spectrum (violet to red) |
| ColorMapColors | Distinct colors |
| ColorMapRed | Red gradient |
| ColorMapMood | Mood color map (cool tones) |
| ColorMapHeat | Heat map (black to red to yellow to white) |
| ColorMapBlue | Blue gradient |
| ColorMapInferno | Perceptually uniform: black-purple-orange-yellow |
| ColorMapMagma | Perceptually uniform: black-purple-pink-white |
| ColorMapPlasma | Perceptually uniform: blue-purple-yellow |
| ColorMapViridis | Perceptually uniform: purple-teal-yellow |
Instances
| Enum ColorMap Source # | |
Defined in ArrayFire.Internal.Types | |
| Show ColorMap Source # | |
| Eq ColorMap Source # | |
| Ord ColorMap Source # | |
Defined in ArrayFire.Internal.Types | |