@@ -783,7 +783,7 @@ timesofar("unary arithmetic")
783
783
let b1 = bitrand (n1, n2)
784
784
b2 = bitrand (n1, n2)
785
785
@check_bit_operation (& )(b1, b2) BitMatrix
786
- @check_bit_operation ( | )( b1, b2) BitMatrix
786
+ @check_bit_operation broadcast ( | , b1, b2) BitMatrix
787
787
@check_bit_operation xor (b1, b2) BitMatrix
788
788
@check_bit_operation (+ )(b1, b2) Matrix{Int}
789
789
@check_bit_operation (- )(b1, b2) Matrix{Int}
814
814
815
815
let b0 = falses (0 )
816
816
@check_bit_operation (& )(b0, b0) BitVector
817
- @check_bit_operation ( | )( b0, b0) BitVector
817
+ @check_bit_operation broadcast ( | , b0, b0) BitVector
818
818
@check_bit_operation xor (b0, b0) BitVector
819
819
@check_bit_operation broadcast (* , b0, b0) BitVector
820
820
@check_bit_operation (* )(b0, b0' ) Matrix{Int}
825
825
let b1 = bitrand (n1, n2)
826
826
i2 = rand (1 : 10 , n1, n2)
827
827
@check_bit_operation (& )(b1, i2) Matrix{Int}
828
- @check_bit_operation ( | )( b1, i2) Matrix{Int}
828
+ @check_bit_operation broadcast ( | , b1, i2) Matrix{Int}
829
829
@check_bit_operation xor (b1, i2) Matrix{Int}
830
830
@check_bit_operation (+ )(b1, i2) Matrix{Int}
831
831
@check_bit_operation (- )(b1, i2) Matrix{Int}
@@ -858,14 +858,14 @@ let b2 = bitrand(n1, n2)
858
858
cf1 = complex (f1)
859
859
860
860
@check_bit_operation (& )(i1, b2) Matrix{Int}
861
- @check_bit_operation ( | )( i1, b2) Matrix{Int}
861
+ @check_bit_operation broadcast ( | , i1, b2) Matrix{Int}
862
862
@check_bit_operation 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
- @check_bit_operation ( | )( u1, b2) Matrix{UInt8}
868
+ @check_bit_operation broadcast ( | , u1, b2) Matrix{UInt8}
869
869
@check_bit_operation 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}
@@ -937,10 +937,10 @@ let b1 = bitrand(n1, n2)
937
937
@check_bit_operation (& )(b1, false ) BitMatrix
938
938
@check_bit_operation (& )(true , b1) BitMatrix
939
939
@check_bit_operation (& )(false , b1) BitMatrix
940
- @check_bit_operation ( | )( b1, true ) BitMatrix
941
- @check_bit_operation ( | )( b1, false ) BitMatrix
942
- @check_bit_operation ( | )( true , b1) BitMatrix
943
- @check_bit_operation ( | )( false , b1) BitMatrix
940
+ @check_bit_operation broadcast ( | , b1, true ) BitMatrix
941
+ @check_bit_operation broadcast ( | , b1, false ) BitMatrix
942
+ @check_bit_operation broadcast ( | , true , b1) BitMatrix
943
+ @check_bit_operation broadcast ( | , false , b1) BitMatrix
944
944
@check_bit_operation xor (b1, true ) BitMatrix
945
945
@check_bit_operation xor (b1, false ) BitMatrix
946
946
@check_bit_operation xor (true , b1) BitMatrix
@@ -959,13 +959,13 @@ let b1 = bitrand(n1, n2)
959
959
@check_bit_operation mod (b1, true ) BitMatrix
960
960
961
961
@check_bit_operation (& )(b1, b2) BitMatrix
962
- @check_bit_operation ( | )( b1, b2) BitMatrix
962
+ @check_bit_operation broadcast ( | , b1, b2) BitMatrix
963
963
@check_bit_operation xor (b1, b2) BitMatrix
964
964
@check_bit_operation (& )(b2, b1) BitMatrix
965
- @check_bit_operation ( | )( b2, b1) BitMatrix
965
+ @check_bit_operation broadcast ( | , b2, b1) BitMatrix
966
966
@check_bit_operation xor (b2, b1) BitMatrix
967
967
@check_bit_operation (& )(b1, i2) Matrix{Int}
968
- @check_bit_operation ( | )( b1, i2) Matrix{Int}
968
+ @check_bit_operation broadcast ( | , b1, i2) Matrix{Int}
969
969
@check_bit_operation 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}
@@ -975,7 +975,7 @@ let b1 = bitrand(n1, n2)
975
975
@check_bit_operation mod (b1, i2) Matrix{Int}
976
976
977
977
@check_bit_operation (& )(b1, u2) Matrix{UInt8}
978
- @check_bit_operation ( | )( b1, u2) Matrix{UInt8}
978
+ @check_bit_operation broadcast ( | , b1, u2) Matrix{UInt8}
979
979
@check_bit_operation 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}
@@ -1118,7 +1118,7 @@ let b1 = trues(v1)
1118
1118
1119
1119
for i = 3 : (v1- 1 ), j = 2 : i
1120
1120
submask = b1 << (v1- j+ 1 )
1121
- @test findnext ((b1 >> i) | submask, j) == i+ 1
1121
+ @test findnext ((b1 >> i) . | submask, j) == i+ 1
1122
1122
@test findnextnot ((~ (b1 >> i)) ⊻ submask, j) == i+ 1
1123
1123
end
1124
1124
end
@@ -1275,7 +1275,7 @@ for l = [0, 1, 63, 64, 65, 127, 128, 129, 255, 256, 257, 6399, 6400, 6401]
1275
1275
@test map (identity, b1) == map (x-> x, b1) == b1
1276
1276
1277
1277
@test map (& , b1, b2) == map ((x,y)-> x& y, b1, b2) == b1 & b2
1278
- @test map (| , b1, b2) == map ((x,y)-> x| y, b1, b2) == b1 | b2
1278
+ @test map (| , b1, b2) == map ((x,y)-> x| y, b1, b2) == broadcast ( | , b1, b2)
1279
1279
@test map (⊻ , b1, b2) == map ((x,y)-> x⊻ y, b1, b2) == b1 ⊻ b2 == xor (b1, b2)
1280
1280
1281
1281
@test map (^ , b1, b2) == map ((x,y)-> x^ y, b1, b2) == b1 .^ b2
@@ -1300,7 +1300,7 @@ for l = [0, 1, 63, 64, 65, 127, 128, 129, 255, 256, 257, 6399, 6400, 6401]
1300
1300
@test map! (one, b, b1) == map! (x-> true , b, b1) == trues (l) == b
1301
1301
1302
1302
@test map! (& , b, b1, b2) == map! ((x,y)-> x& y, b, b1, b2) == b1 & b2 == b
1303
- @test map! (| , b, b1, b2) == map! ((x,y)-> x| y, b, b1, b2) == b1 | b2 == b
1303
+ @test map! (| , b, b1, b2) == map! ((x,y)-> x| y, b, b1, b2) == broadcast ( | , b1, b2) == b
1304
1304
@test map! (⊻ , b, b1, b2) == map! ((x,y)-> x⊻ y, b, b1, b2) == b1 ⊻ b2 == xor (b1, b2) == b
1305
1305
1306
1306
@test map! (^ , b, b1, b2) == map! ((x,y)-> x^ y, b, b1, b2) == b1 .^ b2 == b
@@ -1409,7 +1409,7 @@ for sz = [(n1,n1), (n1,n2), (n2,n1)], (f,isf) = [(tril,istril), (triu,istriu)]
1409
1409
end
1410
1410
1411
1411
let b1 = bitrand (n1,n1)
1412
- b1 |= b1.'
1412
+ b1 . |= b1.'
1413
1413
@check_bit_operation issymmetric (b1) Bool
1414
1414
@check_bit_operation ishermitian (b1) Bool
1415
1415
end
0 commit comments