pub trait HasAfEnum {
type InType: HasAfEnum;
type BaseType: HasAfEnum;
type AbsOutType: HasAfEnum;
type ArgOutType: HasAfEnum;
type UnaryOutType: HasAfEnum;
type ComplexOutType;
type MeanOutType: HasAfEnum;
type AggregateOutType: HasAfEnum;
type ProductOutType: HasAfEnum;
type SobelOutType: HasAfEnum;
// Required method
fn get_af_dtype() -> DType;
}Expand description
Types of the data that can be generated using ArrayFire data generation functions.
The trait HasAfEnum has been defined internally for the following types. We strongly suggest not to implement this trait in your program for user defined types because ArrayFire functions will only work for the following data types currently. Any such trait implementation for types other than the ones listed below will result in undefined behavior.
- f32
- f64
- num::Complex<f32>
- num::Complex<f64>
- bool
- i32
- u32
- u8
- i64
- u64
- i16
- u16
Required Associated Types§
Sourcetype BaseType: HasAfEnum
type BaseType: HasAfEnum
This type alias points to the data type used to hold real part of a
complex number. For real valued numbers, this points to Self.
Sourcetype AbsOutType: HasAfEnum
type AbsOutType: HasAfEnum
This type alias points to f32 for all 32 bit size types and f64 for
larger 64-bit size types.
Sourcetype ArgOutType: HasAfEnum
type ArgOutType: HasAfEnum
This type alias points to f64/f32 for floating point types and
Self otherwise.
Sourcetype UnaryOutType: HasAfEnum
type UnaryOutType: HasAfEnum
This type alias is used to define the output Array type for unary
operations. It points to Self for floating point types, either
real or complex. It points to f32 for rest of the input types.
Sourcetype ComplexOutType
type ComplexOutType
This type alias points to complex type created from a given input type.
This alias always points to either std::Complex<f32> or std::Complex<f64>
Sourcetype MeanOutType: HasAfEnum
type MeanOutType: HasAfEnum
This type alias points to a data type that can store the mean value for
a given input type. This alias points to f32/Complex<f32> for all 32
bit size types and f64/Complex<f64> for larger 64-bit size types.
Sourcetype AggregateOutType: HasAfEnum
type AggregateOutType: HasAfEnum
This type alias points to a data type that can store the result of aggregation of set of values for a given input type. Aggregate type alias points to below types for given input types:
Selffor input types:Complex<64>,Complex<f32>,f64,f32,i64,u64u32for input types:boolu32for input types:u8i32for input types:i16u32for input types:u16i32for input types:i32u32for input types:u32
Sourcetype ProductOutType: HasAfEnum
type ProductOutType: HasAfEnum
This type is different for b8 input type
Sourcetype SobelOutType: HasAfEnum
type SobelOutType: HasAfEnum
This type alias points to the output type for given input type of sobel filter operation. Sobel filter output alias points to below types for given input types:
f32for input types:Complex<f32>,f32f64for input types:Complex<f64>,f64i32for input types:bool,u8,i16,u16,i32,u32i64for input types:i64,u64
Required Methods§
Sourcefn get_af_dtype() -> DType
fn get_af_dtype() -> DType
Return trait implmentors corresponding DType
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.