We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ffe748a commit 88d4837Copy full SHA for 88d4837
1 file changed
src/arith/mod.rs
@@ -333,7 +333,22 @@ macro_rules! arith_scalar_func {
333
unsafe {
334
let mut temp: i64 = 0;
335
let err_val = $ffi_fn(&mut temp as MutAfArray, self.get() as AfArray,
336
- cnst_arr.get() as AfArray, 0);
+ cnst_arr.get() as AfArray, 0);
337
+ HANDLE_ERROR(AfError::from(err_val));
338
+ Array::from(temp)
339
+ }
340
341
342
+
343
+ impl $op_name<$rust_type> for Array {
344
+ type Output = Array;
345
346
+ fn $fn_name(self, rhs: $rust_type) -> Array {
347
+ let cnst_arr = constant(rhs, self.dims());
348
+ unsafe {
349
+ let mut temp: i64 = 0;
350
+ let err_val = $ffi_fn(&mut temp as MutAfArray, self.get() as AfArray,
351
352
HANDLE_ERROR(AfError::from(err_val));
353
Array::from(temp)
354
}
0 commit comments