Skip to content

Commit bec0671

Browse files
authored
fix whitespace (#218)
1 parent 7a13ed4 commit bec0671

16 files changed

+32
-32
lines changed

benchmark/generate_report.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,4 @@ function resultrow(ids, t::BenchmarkTools.TrialJudgement)
6767
return "| `$(idrepr(ids))` | $(timestr) | $(memstr) |"
6868
end
6969

70-
resultmark(sym::Symbol) = sym == :regression ? REGRESS_MARK : (sym == :improvement ? IMPROVE_MARK : "")
70+
resultmark(sym::Symbol) = sym == :regression ? REGRESS_MARK : (sym == :improvement ? IMPROVE_MARK : "")

benchmark/runbenchmarks.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ for n = (5,)
1818
g["getindex", BT.name.name, "vector", n] = @benchmarkable getindex($block_vec, 3)
1919
g["getindex", BT.name.name, "matrix", n] = @benchmarkable getindex($block_mat, 3, 2)
2020
g["getindex", BT.name.name, "rank3", n] = @benchmarkable getindex($block_arr, 3, 2 ,3)
21-
21+
2222
g["setindex!", BT.name.name, "vector", n] = @benchmarkable setindex!($block_vec, 3)
2323
g["setindex!", BT.name.name, "matrix", n] = @benchmarkable setindex!($block_mat, 3, 2)
2424
g["setindex!", BT.name.name, "rank3", n] = @benchmarkable setindex!($block_arr, 3, 2 ,3)

src/abstractblockarray.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Base.similar(a::AbstractBlockArray{T}) where {T} = s
3737
Base.similar(a::AbstractBlockArray, ::Type{T}) where {T} = similar(a, T, axes(a))
3838
Base.similar(a::AbstractBlockArray{T}, dims::Tuple) where {T} = similar(a, T, dims)
3939

40-
# If all we know is size, just return an Array which conforms to BlockArray interface
40+
# If all we know is size, just return an Array which conforms to BlockArray interface
4141
Base.similar(::Type{<:AbstractBlockArray{T,N}}, dims::Dims) where {T,N} = similar(Array{T,N}, dims)
4242

4343
Base.IndexStyle(::Type{<:AbstractBlockArray}) = IndexCartesian()

src/blockarray.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ mortar(blocks::AbstractArray{R, N}, block_sizes::Vararg{AbstractVector{<:Integer
249249

250250
mortar(blocks::AbstractArray) = mortar(blocks, sizes_from_blocks(blocks)...)
251251

252-
sizes_from_blocks(blocks) = sizes_from_blocks(blocks, axes(blocks)) # allow overriding on axes
252+
sizes_from_blocks(blocks) = sizes_from_blocks(blocks, axes(blocks)) # allow overriding on axes
253253

254254
function sizes_from_blocks(blocks::AbstractVector, _)
255255
if !all(b -> ndims(b) == 1, blocks)

src/blockaxis.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ end
229229

230230
_searchsortedfirst(a::AbstractVector, k) = searchsortedfirst(a, k)
231231
function _searchsortedfirst(a::Tuple, k)
232-
k  first(a) && return 1
232+
k first(a) && return 1
233233
1+_searchsortedfirst(tail(a), k)
234234
end
235235
_searchsortedfirst(a::Tuple{}, k) = 1
@@ -336,4 +336,4 @@ end
336336
# TODO: Remove
337337

338338
function _last end
339-
function _length end
339+
function _length end

src/blockbroadcast.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Here we override broadcasting for banded matrices.
33
# The design is to to exploit the broadcast machinery so that
44
# banded matrices that conform to the banded matrix interface but are not
5-
# <: AbstractBandedMatrix can get access to fast copyto!, lmul!, rmul!, axpy!, etc.
5+
# <: AbstractBandedMatrix can get access to fast copyto!, lmul!, rmul!, axpy!, etc.
66
# using broadcast variants (B .= A, B .= 2.0 .* A, etc.)
77

88

@@ -210,7 +210,7 @@ _hasscalarlikevec(a::AbstractVector, b...) = size(a,1) == 1 || _hasscalarlikevec
210210

211211
blockisequalorscalar(ax, ::Number) = true
212212
blockisequalorscalar(ax, a) = blockisequal(ax, Base.axes1(a))
213-
213+
214214
function copyto!(dest::AbstractVector,
215215
bc::Broadcasted{<:AbstractBlockStyle{1}, <:Any, <:Any, Args}) where {Args <: Tuple}
216216
_hasscalarlikevec(bc.args...) && return _generic_blockbroadcast_copyto!(dest, bc)
@@ -255,7 +255,7 @@ for op in (:+, :-, :*, :/, :\)
255255
end
256256

257257
# exploit special cases for *, for example, *(::Number, ::Diagonal)
258-
for op in (:*, :/)
258+
for op in (:*, :/)
259259
@eval @inline $op(A::BlockArray, x::Number) = _BlockArray($op(blocks(A),x), axes(A))
260260
end
261261
for op in (:*, :\)
@@ -268,7 +268,7 @@ end
268268

269269
_blocktype(::Type{<:BlockArray{<:Any,N,<:AbstractArray{R,N}}}) where {N,R} = R
270270

271-
BroadcastStyle(::Type{<:SubArray{T,N,Arr,<:NTuple{N,BlockSlice1},false}}) where {T,N,Arr<:BlockArray} =
271+
BroadcastStyle(::Type{<:SubArray{T,N,Arr,<:NTuple{N,BlockSlice1},false}}) where {T,N,Arr<:BlockArray} =
272272
BroadcastStyle(_blocktype(Arr))
273273

274274

@@ -299,4 +299,4 @@ for op in (:*, :\)
299299
broadcasted(::AbstractBlockStyle, ::typeof($op), a::AbstractArray, b::Zeros) = FillArrays._broadcasted_zeros(a, b)
300300
broadcasted(::AbstractBlockStyle, ::typeof($op), a::AbstractArray{T}, b::Ones{V}) where {T,V} = LinearAlgebra.copy_oftype(a, Base.promote_op(*, T, V))
301301
end
302-
end
302+
end

src/blocklinalg.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ transposelayout(::BlockLayout{MLAY,BLAY}) where {MLAY,BLAY} =
120120

121121
function _copyto!(_, ::AbstractBlockLayout, dest::AbstractVector, src::AbstractVector)
122122
if !blockisequal(axes(dest), axes(src))
123-
# impose block structure
123+
# impose block structure
124124
copyto!(PseudoBlockArray(dest, axes(src)), src)
125125
return dest
126126
end
@@ -133,7 +133,7 @@ end
133133

134134
function _copyto!(_, ::AbstractBlockLayout, dest::AbstractMatrix, src::AbstractMatrix)
135135
if !blockisequal(axes(dest), axes(src))
136-
# impose block structure
136+
# impose block structure
137137
copyto!(PseudoBlockArray(dest, axes(src)), src)
138138
return dest
139139
end
@@ -336,7 +336,7 @@ for UNIT in ('U', 'N')
336336
= _triangular_matrix(Val('U'), Val($UNIT), view(A, Block(K,K)))
337337
materialize!(Ldiv(Ũ, b_2))
338338

339-
if K  2
339+
if K 2
340340
KR = blockcolstart(A, Block(K)):Block(K-1)
341341
V_12 = view(A, KR, Block(K))
342342
b̃_1 = view(b, KR)
@@ -390,4 +390,4 @@ for op in (:exp, :log, :sqrt)
390390
@eval begin
391391
$op(A::PseudoBlockMatrix) = PseudoBlockMatrix($op(A.blocks), axes(A))
392392
end
393-
end
393+
end

src/blockreduce.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ Base.mapreduce(f::F, op::OP, B::PseudoBlockArray; kw...) where {F, OP} =
1818
mapreduce(f, op, B.blocks; kw...)
1919

2020
# support sum, need to return something analoguous to Base.OneTo(1) but same type
21-
Base.reduced_index(::BR) where BR<:BlockedUnitRange = convert(BR, Base.OneTo(1))
21+
Base.reduced_index(::BR) where BR<:BlockedUnitRange = convert(BR, Base.OneTo(1))

src/pseudo_blockarray.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,4 +304,4 @@ Base.replace_in_print_matrix(f::PseudoBlockVecOrMat, i::Integer, j::Integer, s::
304304
Base.replace_in_print_matrix(f.blocks, i, j, s)
305305

306306

307-
LinearAlgebra.norm(A::PseudoBlockArray, p::Real=2) = norm(A.blocks, p)
307+
LinearAlgebra.norm(A::PseudoBlockArray, p::Real=2) = norm(A.blocks, p)

src/show.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,5 +145,5 @@ end
145145

146146
## Cumsum
147147

148-
Base.show(io::IO, mimetype::MIME"text/plain", a::BlockedUnitRange) =
149-
Base.invoke(show, Tuple{typeof(io),MIME"text/plain",AbstractArray},io, mimetype, a)
148+
Base.show(io::IO, mimetype::MIME"text/plain", a::BlockedUnitRange) =
149+
Base.invoke(show, Tuple{typeof(io),MIME"text/plain",AbstractArray},io, mimetype, a)

0 commit comments

Comments
 (0)