Skip to content

Commit b2110d8

Browse files
authored
whitespace fixes (#139)
1 parent 2567af1 commit b2110d8

13 files changed

+39
-39
lines changed

src/ArrayLayouts.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ else
5151
const CRowMaximum = RowMaximum
5252
const CNoPivot = NoPivot
5353
end
54-
54+
5555

5656
struct ApplyBroadcastStyle <: BroadcastStyle end
5757
@inline function copyto!(dest::AbstractArray, bc::Broadcasted{ApplyBroadcastStyle})

src/cumsum.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
22
RangeCumsum(range)
33
4-
represents the cumsum of a `AbstractRange`.
4+
represents the cumsum of a `AbstractRange`.
55
"""
66
struct RangeCumsum{T, RR<:AbstractRange{T}} <: LayoutVector{T}
77
range::RR
@@ -31,7 +31,7 @@ last(r::RangeCumsum) = sum(r.range)
3131
diff(r::RangeCumsum) = r.range[2:end]
3232
isempty(r::RangeCumsum) = isempty(r.range)
3333

34-
union(a::RangeCumsum{<:Any,<:OneTo}, b::RangeCumsum{<:Any,<:OneTo}) =
34+
union(a::RangeCumsum{<:Any,<:OneTo}, b::RangeCumsum{<:Any,<:OneTo}) =
3535
RangeCumsum(OneTo(max(last(a.range), last(b.range))))
3636

37-
sort!(a::RangeCumsum{<:Any,<:AbstractUnitRange}) = a
37+
sort!(a::RangeCumsum{<:Any,<:AbstractUnitRange}) = a

src/diagonal.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ copy(M::Ldiv{<:DiagonalLayout{<:AbstractFillLayout},<:DiagonalLayout}) = diagona
4242

4343
copy(M::Rdiv{<:DiagonalLayout,<:DiagonalLayout}) = diagonal(M.A.diag .* inv.(M.B.diag))
4444
copy(M::Rdiv{<:Any,<:DiagonalLayout}) = M.A .* inv.(permutedims(M.B.diag))
45-
copy(M::Rdiv{<:Any,<:DiagonalLayout{<:AbstractFillLayout}}) = M.A .* inv(getindex_value(M.B.diag))
45+
copy(M::Rdiv{<:Any,<:DiagonalLayout{<:AbstractFillLayout}}) = M.A .* inv(getindex_value(M.B.diag))
4646
copy(M::Rdiv{<:DiagonalLayout,<:DiagonalLayout{<:AbstractFillLayout}}) = diagonal(M.A.diag .* inv(getindex_value(M.B.diag)))
4747

4848

src/factorizations.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ function materialize!(Ldv::Ldiv{<:QRPackedLayout,<:Any,<:Any,<:AbstractMatrix{T}
5959
minmn = min(m,n)
6060
mB, nB = size(B)
6161
lmul!(adjoint(A.Q), view(B, 1:m, :))
62-
mB  n || throw(DimensionMismatch("Number of rows in B must exceed number of columns in A"))
62+
mB n || throw(DimensionMismatch("Number of rows in B must exceed number of columns in A"))
6363
R = A.R
6464
@inbounds begin
6565
if n > m # minimum norm solution

src/ldiv.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,13 +172,13 @@ macro _layoutldiv(Typ)
172172

173173
(/)(x::$Typ, A::$Typ; kwds...) = ArrayLayouts.rdiv(x,A; kwds...)
174174
end
175-
if Typ  :LayoutVector
175+
if Typ :LayoutVector
176176
ret = quote
177177
$ret
178178
(\)(A::$Typ, x::LayoutVector; kwds...) = ArrayLayouts.ldiv(A,x; kwds...)
179179
end
180180
end
181-
if Typ  :LayoutMatrix
181+
if Typ :LayoutMatrix
182182
ret = quote
183183
$ret
184184
(\)(A::$Typ, x::LayoutMatrix; kwds...) = ArrayLayouts.ldiv(A,x; kwds...)
@@ -203,4 +203,4 @@ macro layoutldiv(Typ)
203203
end)
204204
end
205205

206-
@_layoutldiv LayoutVector
206+
@_layoutldiv LayoutVector

src/memorylayout.jl

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ AbstractStridedLayout
7676
7777
is returned by `MemoryLayout(A)` if an array `A` has storage in memory
7878
equivalent to an `Array`, so that `stride(A,1) == 1` and
79-
`stride(A,i) ≡ size(A,i-1) * stride(A,i-1)` for `2 ≤ i ≤ ndims(A)`. In particular,
79+
`stride(A,i) ≡ size(A,i-1) * stride(A,i-1)` for `2 ≤ i ≤ ndims(A)`. In particular,
8080
if `A` is a matrix then `strides(A) == `(1, size(A,1))`.
8181
8282
Arrays with `DenseColumnMajor` memory layout must conform to the `DenseArray` interface.
@@ -88,7 +88,7 @@ DenseColumnMajor
8888
8989
is returned by `MemoryLayout(A)` if an array `A` has storage in memory
9090
as a column major array, so that `stride(A,1) == 1` and
91-
`stride(A,i) ≥ size(A,i-1) * stride(A,i-1)` for `2 ≤ i ≤ ndims(A)`.
91+
`stride(A,i) ≥ size(A,i-1) * stride(A,i-1)` for `2 ≤ i ≤ ndims(A)`.
9292
9393
Arrays with `ColumnMajor` memory layout must conform to the `DenseArray` interface.
9494
"""
@@ -99,7 +99,7 @@ ColumnMajor
9999
100100
is returned by `MemoryLayout(A)` if an array `A` has storage in memory
101101
as a strided array with increasing strides, so that `stride(A,1) ≥ 1` and
102-
`stride(A,i) ≥ size(A,i-1) * stride(A,i-1)` for `2 ≤ i ≤ ndims(A)`.
102+
`stride(A,i) ≥ size(A,i-1) * stride(A,i-1)` for `2 ≤ i ≤ ndims(A)`.
103103
"""
104104
IncreasingStrides
105105

@@ -108,7 +108,7 @@ IncreasingStrides
108108
109109
is returned by `MemoryLayout(A)` if an array `A` has storage in memory
110110
as a row major array with dense entries, so that `stride(A,ndims(A)) == 1` and
111-
`stride(A,i) ≡ size(A,i+1) * stride(A,i+1)` for `1 ≤ i ≤ ndims(A)-1`. In particular,
111+
`stride(A,i) ≡ size(A,i+1) * stride(A,i+1)` for `1 ≤ i ≤ ndims(A)-1`. In particular,
112112
if `A` is a matrix then `strides(A) == `(size(A,2), 1)`.
113113
"""
114114
DenseRowMajor
@@ -118,7 +118,7 @@ DenseRowMajor
118118
119119
is returned by `MemoryLayout(A)` if an array `A` has storage in memory
120120
as a row major array, so that `stride(A,ndims(A)) == 1` and
121-
stride(A,i) ≥ size(A,i+1) * stride(A,i+1)` for `1 ≤ i ≤ ndims(A)-1`.
121+
stride(A,i) ≥ size(A,i+1) * stride(A,i+1)` for `1 ≤ i ≤ ndims(A)-1`.
122122
123123
If `A` is a matrix with `RowMajor` memory layout, then
124124
`transpose(A)` should return a matrix whose layout is `ColumnMajor`.
@@ -130,7 +130,7 @@ RowMajor
130130
131131
is returned by `MemoryLayout(A)` if an array `A` has storage in memory
132132
as a strided array with decreasing strides, so that `stride(A,ndims(A)) ≥ 1` and
133-
stride(A,i) ≥ size(A,i+1) * stride(A,i+1)` for `1 ≤ i ≤ ndims(A)-1`.
133+
stride(A,i) ≥ size(A,i+1) * stride(A,i+1)` for `1 ≤ i ≤ ndims(A)-1`.
134134
"""
135135
DecreasingStrides
136136

@@ -307,7 +307,7 @@ sub_materialize(::DualLayout{ML}, A::AbstractMatrix{<:Real}) where ML = sub_mate
307307
sub_materialize(::DualLayout{ML}, A::AbstractMatrix) where ML<:ConjLayout = sub_materialize(adjointlayout(eltype(A), ML()), _dual_adjoint(A))'
308308
sub_materialize(::DualLayout{ML}, A::AbstractMatrix) where ML = transpose(sub_materialize(transposelayout(ML()), _dual_transpose(A)))
309309

310-
_copyto!(dlay, ::DualLayout{ML}, dest::AbstractArray{T,N}, src::AbstractArray{V,N}) where {T,V,N,ML} =
310+
_copyto!(dlay, ::DualLayout{ML}, dest::AbstractArray{T,N}, src::AbstractArray{V,N}) where {T,V,N,ML} =
311311
_copyto!(dlay, ML(), dest, src)
312312

313313
# Layouts of PermutedDimsArrays
@@ -374,8 +374,8 @@ as a symmetrized version of `layout`, where the entries used are dictated by the
374374
375375
A matrix that has memory layout `SymmetricLayout(layout, uplo)` must overrided
376376
`symmetricdata(A)` to return a matrix `B` such that `MemoryLayout(B) == layout` and
377-
`A[k,j] == B[k,j]` for `j ≥ k` if `uplo == 'U'` (`j ≤ k` if `uplo == 'L'`) and
378-
`A[k,j] == B[j,k]` for `j < k` if `uplo == 'U'` (`j > k` if `uplo == 'L'`).
377+
`A[k,j] == B[k,j]` for `j ≥ k` if `uplo == 'U'` (`j ≤ k` if `uplo == 'L'`) and
378+
`A[k,j] == B[j,k]` for `j < k` if `uplo == 'U'` (`j > k` if `uplo == 'L'`).
379379
"""
380380
struct SymmetricLayout{ML<:MemoryLayout} <: MemoryLayout end
381381

@@ -389,8 +389,8 @@ as a hermitianized version of `layout`, where the entries used are dictated by t
389389
390390
A matrix that has memory layout `HermitianLayout(layout, uplo)` must overrided
391391
`hermitiandata(A)` to return a matrix `B` such that `MemoryLayout(B) == layout` and
392-
`A[k,j] == B[k,j]` for `j ≥ k` if `uplo == 'U'` (`j ≤ k` if `uplo == 'L'`) and
393-
`A[k,j] == conj(B[j,k])` for `j < k` if `uplo == 'U'` (`j > k` if `uplo == 'L'`).
392+
`A[k,j] == B[k,j]` for `j ≥ k` if `uplo == 'U'` (`j ≤ k` if `uplo == 'L'`) and
393+
`A[k,j] == conj(B[j,k])` for `j < k` if `uplo == 'U'` (`j > k` if `uplo == 'L'`).
394394
"""
395395
struct HermitianLayout{ML<:MemoryLayout} <: MemoryLayout end
396396

src/muladd.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ materialize(M::MulAdd) = copy(instantiate(M))
7272
copy(M::MulAdd) = copyto!(similar(M), M)
7373

7474
_fill_copyto!(dest, C) = copyto!(dest, C)
75-
_fill_copyto!(dest, C::Zeros) = zero!(dest) # exploit special fill! overload
75+
_fill_copyto!(dest, C::Zeros) = zero!(dest) # exploit special fill! overload
7676

7777
@inline copyto!(dest::AbstractArray{T}, M::MulAdd) where T =
7878
muladd!(M.α, unalias(dest,M.A), unalias(dest,M.B), M.β, _fill_copyto!(dest, M.C))

src/triangular.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -241,14 +241,14 @@ for UNIT in ('U', 'N')
241241
BLAS.trsv!('L', 'C', $UNIT, triangulardata(M.A)', M.B)
242242
@inline materialize!(M::BlasMatLdivMat{<:TriangularLayout{'U',$UNIT,<:ConjLayout{<:AbstractRowMajor}},
243243
<:AbstractColumnMajor}) =
244-
LAPACK.trtrs!('L', 'C', $UNIT, triangulardata(M.A)', M.B)
244+
LAPACK.trtrs!('L', 'C', $UNIT, triangulardata(M.A)', M.B)
245245

246246
@inline materialize!(M::BlasMatLdivVec{<:TriangularLayout{'L',$UNIT,<:ConjLayout{<:AbstractRowMajor}},
247247
<:AbstractStridedLayout}) =
248248
BLAS.trsv!('U', 'C', $UNIT, triangulardata(M.A)', M.B)
249249
@inline materialize!(M::BlasMatLdivMat{<:TriangularLayout{'L',$UNIT,<:ConjLayout{<:AbstractRowMajor}},
250250
<:AbstractColumnMajor}) =
251-
LAPACK.trtrs!('U', 'C', $UNIT, triangulardata(M.A)', M.B)
251+
LAPACK.trtrs!('U', 'C', $UNIT, triangulardata(M.A)', M.B)
252252
end
253253
end
254254

@@ -339,7 +339,7 @@ function _bidiag_backsub!(M)
339339
dv = diagonaldata(A)
340340
ev = supdiagonaldata(A)
341341
b[N] = bj1 = dv[N]\b[N]
342-
342+
343343
@inbounds for j = (N - 1):-1:1
344344
bj = b[j]
345345
bj -= ev[j] * bj1
@@ -350,7 +350,7 @@ function _bidiag_backsub!(M)
350350
bj = dvj\bj
351351
b[j] = bj1 = bj
352352
end
353-
353+
354354
b
355355
end
356356

@@ -374,7 +374,7 @@ function _bidiag_forwardsub!(M)
374374
end
375375

376376
#Generic solver using naive substitution, based on LinearAlgebra/src/bidiag.jl
377-
function materialize!(M::MatLdivVec{<:BidiagonalLayout})
377+
function materialize!(M::MatLdivVec{<:BidiagonalLayout})
378378
A,b = M.A,M.B
379379
require_one_based_indexing(A, b)
380380
N = size(A, 2)

test/runtests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ include("test_layouts.jl")
77
include("test_muladd.jl")
88
include("test_ldiv.jl")
99
include("test_layoutarray.jl")
10-
include("test_cumsum.jl")
10+
include("test_cumsum.jl")

test/test_cumsum.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ using ArrayLayouts, Test
1414
a,b = RangeCumsum(Base.OneTo(5)), RangeCumsum(Base.OneTo(6))
1515
@test union(a,b) union(b,a) b
1616
@test sort!(a) a
17-
end
17+
end

0 commit comments

Comments
 (0)