Skip to content

add clone and partialeq to all enums #69

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 21, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions src/defines.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::fmt::Error as FmtError;

/// Error codes
#[repr(C)]
#[derive(Clone, Copy, Debug)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum AfError {
/// The function returned successfully
SUCCESS = 0,
Expand Down Expand Up @@ -106,7 +106,7 @@ impl Error for AfError {
}

/// Types of Array data type
#[derive(Copy, Clone)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum Aftype {
/// 32 bit float
F32 = 0,
Expand Down Expand Up @@ -135,7 +135,7 @@ pub enum Aftype {
}

/// Dictates the interpolation method to be used by a function
#[derive(Copy, Clone)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum InterpType {
/// Nearest Neighbor interpolation method
NEAREST = 0,
Expand All @@ -148,7 +148,7 @@ pub enum InterpType {
}

/// Helps determine how to pad kernels along borders
#[derive(Copy, Clone)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum BorderType {
/// Pad using zeros
ZERO = 0,
Expand All @@ -157,7 +157,7 @@ pub enum BorderType {
}

/// Used by `regions` function to identify type of connectivity
#[derive(Copy, Clone)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum Connectivity {
/// North-East-South-West (N-E-S-W) connectivity from given pixel/point
FOUR = 4,
Expand All @@ -166,7 +166,7 @@ pub enum Connectivity {
}

/// Helps determine the size of output of convolution
#[derive(Copy, Clone)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ConvMode {
/// Default convolution mode where output size is same as input size
DEFAULT = 0,
Expand All @@ -175,7 +175,7 @@ pub enum ConvMode {
}

/// Helps determine if convolution is in Spatial or Frequency domain
#[derive(Copy, Clone)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ConvDomain {
/// ArrayFire chooses whether the convolution will be in spatial domain or frequency domain
AUTO = 0,
Expand All @@ -186,7 +186,7 @@ pub enum ConvDomain {
}

/// Error metric used by `matchTemplate` function
#[derive(Copy, Clone)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum MatchType {
/// Sum of Absolute Differences
SAD = 0,
Expand All @@ -209,7 +209,7 @@ pub enum MatchType {
}

/// Identify the color space of given image(Array)
#[derive(Copy, Clone)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ColorSpace {
/// Grayscale color space
GRAY = 0,
Expand All @@ -220,7 +220,7 @@ pub enum ColorSpace {
}

/// Helps determine the type of a Matrix
#[derive(Copy, Clone)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum MatProp {
/// Default (no-op)
NONE,
Expand Down Expand Up @@ -248,7 +248,7 @@ pub enum MatProp {

/// Norm type
#[allow(non_camel_case_types)]
#[derive(Copy, Clone)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum NormType {
/// Treats input as a vector and return sum of absolute values
VECTOR_1 = 0,
Expand All @@ -270,7 +270,7 @@ pub enum NormType {

/// Dictates what color map is used for Image rendering
#[repr(C)]
#[derive(Copy, Clone)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ColorMap {
/// Default color map is grayscale range [0-1]
DEFAULT = 0,
Expand All @@ -290,7 +290,7 @@ pub enum ColorMap {

/// YCbCr Standards
#[repr(C)]
#[derive(Copy, Clone)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum YCCStd {
/// ITU-R BT.601 (formerly CCIR 601) standard
YCC_601 = 601,
Expand All @@ -302,7 +302,7 @@ pub enum YCCStd {

/// Homography type
#[repr(C)]
#[derive(Copy, Clone)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum HomographyType {
/// RANdom SAmple Consensus algorithm
RANSAC = 0,
Expand All @@ -312,7 +312,7 @@ pub enum HomographyType {

/// Plotting markers
#[repr(C)]
#[derive(Copy, Clone)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum MarkerType {
NONE = 0,
POINT = 1,
Expand Down