@@ -106,6 +106,7 @@ impl Error for AfError {
106
106
}
107
107
108
108
/// Types of Array data type
109
+ #[ repr( C ) ]
109
110
#[ derive( Clone , Copy , Debug , PartialEq ) ]
110
111
pub enum DType {
111
112
/// 32 bit float
@@ -135,6 +136,7 @@ pub enum DType {
135
136
}
136
137
137
138
/// Dictates the interpolation method to be used by a function
139
+ #[ repr( C ) ]
138
140
#[ derive( Clone , Copy , Debug , PartialEq ) ]
139
141
pub enum InterpType {
140
142
/// Nearest Neighbor interpolation method
@@ -148,6 +150,7 @@ pub enum InterpType {
148
150
}
149
151
150
152
/// Helps determine how to pad kernels along borders
153
+ #[ repr( C ) ]
151
154
#[ derive( Clone , Copy , Debug , PartialEq ) ]
152
155
pub enum BorderType {
153
156
/// Pad using zeros
@@ -157,6 +160,7 @@ pub enum BorderType {
157
160
}
158
161
159
162
/// Used by `regions` function to identify type of connectivity
163
+ #[ repr( C ) ]
160
164
#[ derive( Clone , Copy , Debug , PartialEq ) ]
161
165
pub enum Connectivity {
162
166
/// North-East-South-West (N-E-S-W) connectivity from given pixel/point
@@ -166,6 +170,7 @@ pub enum Connectivity {
166
170
}
167
171
168
172
/// Helps determine the size of output of convolution
173
+ #[ repr( C ) ]
169
174
#[ derive( Clone , Copy , Debug , PartialEq ) ]
170
175
pub enum ConvMode {
171
176
/// Default convolution mode where output size is same as input size
@@ -175,6 +180,7 @@ pub enum ConvMode {
175
180
}
176
181
177
182
/// Helps determine if convolution is in Spatial or Frequency domain
183
+ #[ repr( C ) ]
178
184
#[ derive( Clone , Copy , Debug , PartialEq ) ]
179
185
pub enum ConvDomain {
180
186
/// ArrayFire chooses whether the convolution will be in spatial domain or frequency domain
@@ -186,6 +192,7 @@ pub enum ConvDomain {
186
192
}
187
193
188
194
/// Error metric used by `matchTemplate` function
195
+ #[ repr( C ) ]
189
196
#[ derive( Clone , Copy , Debug , PartialEq ) ]
190
197
pub enum MatchType {
191
198
/// Sum of Absolute Differences
@@ -209,6 +216,7 @@ pub enum MatchType {
209
216
}
210
217
211
218
/// Identify the color space of given image(Array)
219
+ #[ repr( C ) ]
212
220
#[ derive( Clone , Copy , Debug , PartialEq ) ]
213
221
pub enum ColorSpace {
214
222
/// Grayscale color space
@@ -220,6 +228,7 @@ pub enum ColorSpace {
220
228
}
221
229
222
230
/// Helps determine the type of a Matrix
231
+ #[ repr( C ) ]
223
232
#[ derive( Clone , Copy , Debug , PartialEq ) ]
224
233
pub enum MatProp {
225
234
/// Default (no-op)
@@ -248,6 +257,7 @@ pub enum MatProp {
248
257
249
258
/// Norm type
250
259
#[ allow( non_camel_case_types) ]
260
+ #[ repr( C ) ]
251
261
#[ derive( Clone , Copy , Debug , PartialEq ) ]
252
262
pub enum NormType {
253
263
/// Treats input as a vector and return sum of absolute values
0 commit comments