@@ -106,6 +106,7 @@ impl Error for AfError {
106106}
107107
108108/// Types of Array data type
109+ #[ repr( C ) ]
109110#[ derive( Clone , Copy , Debug , PartialEq ) ]
110111pub enum DType {
111112 /// 32 bit float
@@ -135,6 +136,7 @@ pub enum DType {
135136}
136137
137138/// Dictates the interpolation method to be used by a function
139+ #[ repr( C ) ]
138140#[ derive( Clone , Copy , Debug , PartialEq ) ]
139141pub enum InterpType {
140142 /// Nearest Neighbor interpolation method
@@ -148,6 +150,7 @@ pub enum InterpType {
148150}
149151
150152/// Helps determine how to pad kernels along borders
153+ #[ repr( C ) ]
151154#[ derive( Clone , Copy , Debug , PartialEq ) ]
152155pub enum BorderType {
153156 /// Pad using zeros
@@ -157,6 +160,7 @@ pub enum BorderType {
157160}
158161
159162/// Used by `regions` function to identify type of connectivity
163+ #[ repr( C ) ]
160164#[ derive( Clone , Copy , Debug , PartialEq ) ]
161165pub enum Connectivity {
162166 /// North-East-South-West (N-E-S-W) connectivity from given pixel/point
@@ -166,6 +170,7 @@ pub enum Connectivity {
166170}
167171
168172/// Helps determine the size of output of convolution
173+ #[ repr( C ) ]
169174#[ derive( Clone , Copy , Debug , PartialEq ) ]
170175pub enum ConvMode {
171176 /// Default convolution mode where output size is same as input size
@@ -175,6 +180,7 @@ pub enum ConvMode {
175180}
176181
177182/// Helps determine if convolution is in Spatial or Frequency domain
183+ #[ repr( C ) ]
178184#[ derive( Clone , Copy , Debug , PartialEq ) ]
179185pub enum ConvDomain {
180186 /// ArrayFire chooses whether the convolution will be in spatial domain or frequency domain
@@ -186,6 +192,7 @@ pub enum ConvDomain {
186192}
187193
188194/// Error metric used by `matchTemplate` function
195+ #[ repr( C ) ]
189196#[ derive( Clone , Copy , Debug , PartialEq ) ]
190197pub enum MatchType {
191198 /// Sum of Absolute Differences
@@ -209,6 +216,7 @@ pub enum MatchType {
209216}
210217
211218/// Identify the color space of given image(Array)
219+ #[ repr( C ) ]
212220#[ derive( Clone , Copy , Debug , PartialEq ) ]
213221pub enum ColorSpace {
214222 /// Grayscale color space
@@ -220,6 +228,7 @@ pub enum ColorSpace {
220228}
221229
222230/// Helps determine the type of a Matrix
231+ #[ repr( C ) ]
223232#[ derive( Clone , Copy , Debug , PartialEq ) ]
224233pub enum MatProp {
225234 /// Default (no-op)
@@ -248,6 +257,7 @@ pub enum MatProp {
248257
249258/// Norm type
250259#[ allow( non_camel_case_types) ]
260+ #[ repr( C ) ]
251261#[ derive( Clone , Copy , Debug , PartialEq ) ]
252262pub enum NormType {
253263 /// Treats input as a vector and return sum of absolute values
0 commit comments