|
1 | | -Vcheckbounds(A::Operator,kr::Colon) = nothing |
2 | | - |
3 | | -@inline function checkbounds(A, inds...) |
4 | | - _checkbounds(A, inds...)::Bool || throw(BoundsError(A,inds)) |
| 1 | +function checkbounds(A::Operator, inds...) |
| 2 | + checkbounds(Bool, A, inds...) || throw(BoundsError(A,inds)) |
5 | 3 | nothing |
6 | 4 | end |
7 | 5 |
|
8 | | -_checkbounds(A::Operator,kr)::Bool = |
| 6 | +checkbounds(::Type{Bool}, A::Operator,kr::Colon) = true |
| 7 | + |
| 8 | +checkbounds(::Type{Bool}, A::Operator,kr) = |
9 | 9 | !(maximum(kr) > length(A) || minimum(kr) < 1) |
10 | 10 |
|
11 | 11 |
|
12 | | -_checkbounds(A::Operator,kr::Union{Colon,InfRanges},jr::Union{Colon,InfRanges})::Bool = true |
| 12 | +checkbounds(::Type{Bool}, A::Operator,kr::Union{Colon,InfRanges},jr::Union{Colon,InfRanges}) = true |
13 | 13 |
|
14 | | -_checkbounds(A::Operator,kr::Union{Colon,InfRanges},jr)::Bool = |
| 14 | +checkbounds(::Type{Bool}, A::Operator,kr::Union{Colon,InfRanges},jr) = |
15 | 15 | !(maximum(jr) > size(A,2) || minimum(jr) < 1) |
16 | 16 |
|
17 | | -_checkbounds(A::Operator,kr,jr::Union{Colon,InfRanges})::Bool = |
| 17 | +checkbounds(::Type{Bool}, A::Operator,kr,jr::Union{Colon,InfRanges}) = |
18 | 18 | !(maximum(kr) > size(A,1) || minimum(kr) < 1 ) |
19 | 19 |
|
20 | | -function _checkbounds(A::Operator,kr,jr)::Bool |
| 20 | +function checkbounds(::Type{Bool}, A::Operator,kr,jr) |
21 | 21 | (isempty(kr) || isempty(jr)) && return true |
22 | 22 | (1 <= minimum(kr) <= maximum(kr) <= size(A,1)) && |
23 | 23 | (1 <= minimum(jr) <= maximum(jr) <= size(A,2)) |
24 | 24 | end |
25 | 25 |
|
26 | | -_checkbounds(A::Operator,K::Block,J::Block)::Bool = |
| 26 | +checkbounds(::Type{Bool}, A::Operator,K::Block,J::Block) = |
27 | 27 | 1 ≤ first(K.n[1]) ≤ length(blocklengths(rangespace(A))) && |
28 | 28 | 1 ≤ first(J.n[1]) ≤ length(blocklengths(domainspace(A))) |
29 | 29 |
|
30 | | -_checkbounds(A::Operator,K::BlockRange{1},J::BlockRange{1})::Bool = |
| 30 | +checkbounds(::Type{Bool}, A::Operator,K::BlockRange{1},J::BlockRange{1}) = |
31 | 31 | isempty(K) || isempty(J) || |
32 | | - _checkbounds(A, Block(maximum(K.indices[1])), Block(maximum(J.indices[1]))) |
| 32 | + checkbounds(Bool, A, Block(maximum(K.indices[1])), Block(maximum(J.indices[1]))) |
33 | 33 |
|
34 | 34 |
|
35 | 35 |
|
|
0 commit comments