@@ -793,31 +793,19 @@ impl<B: ReprBackend> RunnerClient for Runner<B> {
793
793
handles. register_float_tensor :: < B > ( & desc. out . id , output) ;
794
794
}
795
795
IntOperationDescription :: BitwiseAnd ( desc) => {
796
- let lhs = handles. get_int_tensor :: < B > ( & desc. lhs ) ;
797
- let rhs = handles. get_int_tensor :: < B > ( & desc. rhs ) ;
798
-
799
- let output = B :: bitwise_and ( lhs, rhs) ;
800
- handles. register_int_tensor :: < B > ( & desc. out . id , output) ;
796
+ binary_int_ops ! ( handles, desc, B :: bitwise_and)
801
797
}
802
798
IntOperationDescription :: BitwiseAndScalar ( desc) => {
803
799
scalar_int_ops ! ( handles, desc, B :: bitwise_and_scalar)
804
800
}
805
801
IntOperationDescription :: BitwiseOr ( desc) => {
806
- let lhs = handles. get_int_tensor :: < B > ( & desc. lhs ) ;
807
- let rhs = handles. get_int_tensor :: < B > ( & desc. rhs ) ;
808
-
809
- let output = B :: bitwise_or ( lhs, rhs) ;
810
- handles. register_int_tensor :: < B > ( & desc. out . id , output) ;
802
+ binary_int_ops ! ( handles, desc, B :: bitwise_or)
811
803
}
812
804
IntOperationDescription :: BitwiseOrScalar ( desc) => {
813
805
scalar_int_ops ! ( handles, desc, B :: bitwise_or_scalar)
814
806
}
815
807
IntOperationDescription :: BitwiseXor ( desc) => {
816
- let lhs = handles. get_int_tensor :: < B > ( & desc. lhs ) ;
817
- let rhs = handles. get_int_tensor :: < B > ( & desc. rhs ) ;
818
-
819
- let output = B :: bitwise_xor ( lhs, rhs) ;
820
- handles. register_int_tensor :: < B > ( & desc. out . id , output) ;
808
+ binary_int_ops ! ( handles, desc, B :: bitwise_xor)
821
809
}
822
810
IntOperationDescription :: BitwiseXorScalar ( desc) => {
823
811
scalar_int_ops ! ( handles, desc, B :: bitwise_xor_scalar)
@@ -826,18 +814,10 @@ impl<B: ReprBackend> RunnerClient for Runner<B> {
826
814
unary_int_ops ! ( handles, desc, B :: bitwise_not)
827
815
}
828
816
IntOperationDescription :: BitwiseLeftShift ( desc) => {
829
- let lhs = handles. get_int_tensor :: < B > ( & desc. lhs ) ;
830
- let rhs = handles. get_int_tensor :: < B > ( & desc. rhs ) ;
831
-
832
- let output = B :: bitwise_left_shift ( lhs, rhs) ;
833
- handles. register_int_tensor :: < B > ( & desc. out . id , output) ;
817
+ binary_int_ops ! ( handles, desc, B :: bitwise_left_shift)
834
818
}
835
819
IntOperationDescription :: BitwiseRightShift ( desc) => {
836
- let lhs = handles. get_int_tensor :: < B > ( & desc. lhs ) ;
837
- let rhs = handles. get_int_tensor :: < B > ( & desc. rhs ) ;
838
-
839
- let output = B :: bitwise_right_shift ( lhs, rhs) ;
840
- handles. register_int_tensor :: < B > ( & desc. out . id , output) ;
820
+ binary_int_ops ! ( handles, desc, B :: bitwise_right_shift)
841
821
}
842
822
IntOperationDescription :: BitwiseLeftShiftScalar ( desc) => {
843
823
scalar_int_ops ! ( handles, desc, B :: bitwise_left_shift_scalar)
0 commit comments