@@ -1251,14 +1251,14 @@ end
1251
1251
1252
1252
# contiguous multidimensional indexing: if the first dimension is a range,
1253
1253
# we can get some performance from using copy_chunks!
1254
- @inline function _unsafe_getindex! (X:: BitArray , B:: BitArray , I0:: Union{UnitRange {Int},Slice} )
1254
+ @inline function _unsafe_getindex! (X:: BitArray , B:: BitArray , I0:: Union{AbstractUnitRange {Int},Slice} )
1255
1255
copy_chunks! (X. chunks, 1 , B. chunks, indexoffset (I0)+ 1 , length (I0))
1256
1256
return X
1257
1257
end
1258
1258
1259
1259
# Optimization where the inner dimension is contiguous improves perf dramatically
1260
1260
@generated function _unsafe_getindex! (X:: BitArray , B:: BitArray ,
1261
- I0:: Union{Slice,UnitRange{Int}} , I:: Union{Int,UnitRange {Int},Slice} ...)
1261
+ I0:: Union{Slice,UnitRange{Int}} , I:: Union{Int,AbstractUnitRange {Int},Slice} ...)
1262
1262
N = length (I)
1263
1263
quote
1264
1264
$ (Expr (:meta , :inline ))
@@ -1393,7 +1393,7 @@ end
1393
1393
# contiguous multidimensional indexing: if the first dimension is a range,
1394
1394
# we can get some performance from using copy_chunks!
1395
1395
1396
- @inline function setindex! (B:: BitArray , X:: Union{StridedArray,BitArray} , J0:: Union{Colon,UnitRange {Int}} )
1396
+ @inline function setindex! (B:: BitArray , X:: Union{StridedArray,BitArray} , J0:: Union{Colon,AbstractUnitRange {Int}} )
1397
1397
I0 = to_indices (B, (J0,))[1 ]
1398
1398
@boundscheck checkbounds (B, I0)
1399
1399
l0 = length (I0)
@@ -1405,13 +1405,13 @@ end
1405
1405
end
1406
1406
1407
1407
@inline function setindex! (B:: BitArray , X:: Union{StridedArray,BitArray} ,
1408
- I0:: Union{Colon,UnitRange {Int}} , I:: Union{Int,UnitRange {Int},Colon} ...)
1408
+ I0:: Union{Colon,AbstractUnitRange {Int}} , I:: Union{Int,AbstractUnitRange {Int},Colon} ...)
1409
1409
J = to_indices (B, (I0, I... ))
1410
1410
@boundscheck checkbounds (B, J... )
1411
1411
_unsafe_setindex! (B, X, J... )
1412
1412
end
1413
1413
@generated function _unsafe_setindex! (B:: BitArray , X:: Union{StridedArray,BitArray} ,
1414
- I0:: Union{Slice,UnitRange {Int}} , I:: Union{Int,UnitRange {Int},Slice} ...)
1414
+ I0:: Union{Slice,AbstractUnitRange {Int}} , I:: Union{Int,AbstractUnitRange {Int},Slice} ...)
1415
1415
N = length (I)
1416
1416
quote
1417
1417
idxlens = @ncall $ N index_lengths I0 d-> I[d]
@@ -1446,7 +1446,7 @@ end
1446
1446
end
1447
1447
1448
1448
@propagate_inbounds function setindex! (B:: BitArray , X:: AbstractArray ,
1449
- I0:: Union{Colon,UnitRange {Int}} , I:: Union{Int,UnitRange {Int},Colon} ...)
1449
+ I0:: Union{Colon,AbstractUnitRange {Int}} , I:: Union{Int,AbstractUnitRange {Int},Colon} ...)
1450
1450
_setindex! (IndexStyle (B), B, X, to_indices (B, (I0, I... ))... )
1451
1451
end
1452
1452
0 commit comments