@@ -784,7 +784,7 @@ let b1 = bitrand(n1, n2)
784
784
b2 = bitrand (n1, n2)
785
785
@check_bit_operation (& )(b1, b2) BitMatrix
786
786
@check_bit_operation (| )(b1, b2) BitMatrix
787
- @check_bit_operation xor ( b1, b2) BitMatrix
787
+ @check_bit_operation broadcast (xor, b1, b2) BitMatrix
788
788
@check_bit_operation (+ )(b1, b2) Matrix{Int}
789
789
@check_bit_operation (- )(b1, b2) Matrix{Int}
790
790
@check_bit_operation broadcast (* , b1, b2) BitMatrix
815
815
let b0 = falses (0 )
816
816
@check_bit_operation (& )(b0, b0) BitVector
817
817
@check_bit_operation (| )(b0, b0) BitVector
818
- @check_bit_operation xor ( b0, b0) BitVector
818
+ @check_bit_operation broadcast (xor, b0, b0) BitVector
819
819
@check_bit_operation broadcast (* , b0, b0) BitVector
820
820
@check_bit_operation (* )(b0, b0' ) Matrix{Int}
821
821
end
@@ -826,7 +826,7 @@ let b1 = bitrand(n1, n2)
826
826
i2 = rand (1 : 10 , n1, n2)
827
827
@check_bit_operation (& )(b1, i2) Matrix{Int}
828
828
@check_bit_operation (| )(b1, i2) Matrix{Int}
829
- @check_bit_operation xor ( b1, i2) Matrix{Int}
829
+ @check_bit_operation broadcast (xor, b1, i2) Matrix{Int}
830
830
@check_bit_operation (+ )(b1, i2) Matrix{Int}
831
831
@check_bit_operation (- )(b1, i2) Matrix{Int}
832
832
@check_bit_operation broadcast (* , b1, i2) Matrix{Int}
@@ -859,14 +859,14 @@ let b2 = bitrand(n1, n2)
859
859
860
860
@check_bit_operation (& )(i1, b2) Matrix{Int}
861
861
@check_bit_operation (| )(i1, b2) Matrix{Int}
862
- @check_bit_operation xor ( i1, b2) Matrix{Int}
862
+ @check_bit_operation broadcast (xor, i1, b2) Matrix{Int}
863
863
@check_bit_operation broadcast (+ , i1, b2) Matrix{Int}
864
864
@check_bit_operation broadcast (- , i1, b2) Matrix{Int}
865
865
@check_bit_operation broadcast (* , i1, b2) Matrix{Int}
866
866
867
867
@check_bit_operation (& )(u1, b2) Matrix{UInt8}
868
868
@check_bit_operation (| )(u1, b2) Matrix{UInt8}
869
- @check_bit_operation xor ( u1, b2) Matrix{UInt8}
869
+ @check_bit_operation broadcast (xor, u1, b2) Matrix{UInt8}
870
870
@check_bit_operation broadcast (+ , u1, b2) Matrix{UInt8}
871
871
@check_bit_operation broadcast (- , u1, b2) Matrix{UInt8}
872
872
@check_bit_operation broadcast (* , u1, b2) Matrix{UInt8}
@@ -941,10 +941,10 @@ let b1 = bitrand(n1, n2)
941
941
@check_bit_operation (| )(b1, false ) BitMatrix
942
942
@check_bit_operation (| )(true , b1) BitMatrix
943
943
@check_bit_operation (| )(false , b1) BitMatrix
944
- @check_bit_operation xor ( b1, true ) BitMatrix
945
- @check_bit_operation xor ( b1, false ) BitMatrix
946
- @check_bit_operation xor ( true , b1) BitMatrix
947
- @check_bit_operation xor ( false , b1) BitMatrix
944
+ @check_bit_operation broadcast (xor, b1, true ) BitMatrix
945
+ @check_bit_operation broadcast (xor, b1, false ) BitMatrix
946
+ @check_bit_operation broadcast (xor, true , b1) BitMatrix
947
+ @check_bit_operation broadcast (xor, false , b1) BitMatrix
948
948
@check_bit_operation broadcast (+ , b1, true ) Matrix{Int}
949
949
@check_bit_operation broadcast (+ , b1, false ) Matrix{Int}
950
950
@check_bit_operation broadcast (- , b1, true ) Matrix{Int}
@@ -960,13 +960,13 @@ let b1 = bitrand(n1, n2)
960
960
961
961
@check_bit_operation (& )(b1, b2) BitMatrix
962
962
@check_bit_operation (| )(b1, b2) BitMatrix
963
- @check_bit_operation xor ( b1, b2) BitMatrix
963
+ @check_bit_operation broadcast (xor, b1, b2) BitMatrix
964
964
@check_bit_operation (& )(b2, b1) BitMatrix
965
965
@check_bit_operation (| )(b2, b1) BitMatrix
966
- @check_bit_operation xor ( b2, b1) BitMatrix
966
+ @check_bit_operation broadcast (xor, b2, b1) BitMatrix
967
967
@check_bit_operation (& )(b1, i2) Matrix{Int}
968
968
@check_bit_operation (| )(b1, i2) Matrix{Int}
969
- @check_bit_operation xor ( b1, i2) Matrix{Int}
969
+ @check_bit_operation broadcast (xor, b1, i2) Matrix{Int}
970
970
@check_bit_operation broadcast (+ , b1, i2) Matrix{Int}
971
971
@check_bit_operation broadcast (- , b1, i2) Matrix{Int}
972
972
@check_bit_operation broadcast (* , b1, i2) Matrix{Int}
@@ -976,7 +976,7 @@ let b1 = bitrand(n1, n2)
976
976
977
977
@check_bit_operation (& )(b1, u2) Matrix{UInt8}
978
978
@check_bit_operation (| )(b1, u2) Matrix{UInt8}
979
- @check_bit_operation xor ( b1, u2) Matrix{UInt8}
979
+ @check_bit_operation broadcast (xor, b1, u2) Matrix{UInt8}
980
980
@check_bit_operation broadcast (+ , b1, u2) Matrix{UInt8}
981
981
@check_bit_operation broadcast (- , b1, u2) Matrix{UInt8}
982
982
@check_bit_operation broadcast (* , b1, u2) Matrix{UInt8}
@@ -1119,7 +1119,7 @@ let b1 = trues(v1)
1119
1119
for i = 3 : (v1- 1 ), j = 2 : i
1120
1120
submask = b1 << (v1- j+ 1 )
1121
1121
@test findnext ((b1 >> i) | submask, j) == i+ 1
1122
- @test findnextnot ((~ (b1 >> i)) ⊻ submask, j) == i+ 1
1122
+ @test findnextnot ((~ (b1 >> i)) . ⊻ submask, j) == i+ 1
1123
1123
end
1124
1124
end
1125
1125
@@ -1276,7 +1276,7 @@ for l = [0, 1, 63, 64, 65, 127, 128, 129, 255, 256, 257, 6399, 6400, 6401]
1276
1276
1277
1277
@test map (& , b1, b2) == map ((x,y)-> x& y, b1, b2) == b1 & b2
1278
1278
@test map (| , b1, b2) == map ((x,y)-> x| y, b1, b2) == b1 | b2
1279
- @test map (⊻ , b1, b2) == map ((x,y)-> x⊻ y, b1, b2) == b1 ⊻ b2 == xor ( b1, b2)
1279
+ @test map (⊻ , b1, b2) == map ((x,y)-> x⊻ y, b1, b2) == broadcast ( ⊻ , b1, b2) == broadcast (xor, b1, b2)
1280
1280
1281
1281
@test map (^ , b1, b2) == map ((x,y)-> x^ y, b1, b2) == b1 .^ b2
1282
1282
@test map (* , b1, b2) == map ((x,y)-> x* y, b1, b2) == b1 .* b2
@@ -1301,7 +1301,7 @@ for l = [0, 1, 63, 64, 65, 127, 128, 129, 255, 256, 257, 6399, 6400, 6401]
1301
1301
1302
1302
@test map! (& , b, b1, b2) == map! ((x,y)-> x& y, b, b1, b2) == b1 & b2 == b
1303
1303
@test map! (| , b, b1, b2) == map! ((x,y)-> x| y, b, b1, b2) == b1 | b2 == b
1304
- @test map! (⊻ , b, b1, b2) == map! ((x,y)-> x⊻ y, b, b1, b2) == b1 ⊻ b2 == xor ( b1, b2) == b
1304
+ @test map! (⊻ , b, b1, b2) == map! ((x,y)-> x⊻ y, b, b1, b2) == broadcast ( ⊻ , b1, b2) == broadcast (xor, b1, b2) == b
1305
1305
1306
1306
@test map! (^ , b, b1, b2) == map! ((x,y)-> x^ y, b, b1, b2) == b1 .^ b2 == b
1307
1307
@test map! (* , b, b1, b2) == map! ((x,y)-> x* y, b, b1, b2) == b1 .* b2 == b
0 commit comments