File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -333,7 +333,22 @@ macro_rules! arith_scalar_func {
333333 unsafe {
334334 let mut temp: i64 = 0 ;
335335 let err_val = $ffi_fn( & mut temp as MutAfArray , self . get( ) as AfArray ,
336- cnst_arr. get( ) as AfArray , 0 ) ;
336+ 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+ cnst_arr. get( ) as AfArray , 0 ) ;
337352 HANDLE_ERROR ( AfError :: from( err_val) ) ;
338353 Array :: from( temp)
339354 }
You can’t perform that action at this time.
0 commit comments