From dafbc59de468dedd1430b236945a0f6d81c59ea4 Mon Sep 17 00:00:00 2001 From: Kevin Squire Date: Tue, 23 Sep 2014 06:46:50 -0700 Subject: [PATCH] Formatting: use spaces instead of tabs for indentation --- base/abstractarray.jl | 2 +- base/inference.jl | 2 +- base/linalg/arpack.jl | 8 ++--- base/linalg/dense.jl | 2 +- base/linalg/ldlt.jl | 72 +++++++++++++++++++++---------------------- base/pkg.jl | 4 +-- base/pkg/cache.jl | 6 ++-- base/socket.jl | 2 +- 8 files changed, 49 insertions(+), 49 deletions(-) diff --git a/base/abstractarray.jl b/base/abstractarray.jl index fbf860299bee9..a663a5eab9d03 100644 --- a/base/abstractarray.jl +++ b/base/abstractarray.jl @@ -941,7 +941,7 @@ end function ipermutedims(A::AbstractArray,perm) iperm = Array(Int,length(perm)) for i = 1:length(perm) - iperm[perm[i]] = i + iperm[perm[i]] = i end return permutedims(A,iperm) end diff --git a/base/inference.jl b/base/inference.jl index 834d9d0d94799..c2f25b7ad78fb 100644 --- a/base/inference.jl +++ b/base/inference.jl @@ -1346,7 +1346,7 @@ function typeinf(linfo::LambdaStaticData,atypes::Tuple,sparams::Tuple, def, cop) if la > 0 lastarg = ast.args[1][la] if is_rest_arg(lastarg) - if atypes === Tuple + if atypes === Tuple if la > 1 atypes = tuple(NTuple{la-1,Any}..., Tuple[1]) end diff --git a/base/linalg/arpack.jl b/base/linalg/arpack.jl index 6bdfd1dcfa947..1e60e4274a6a0 100644 --- a/base/linalg/arpack.jl +++ b/base/linalg/arpack.jl @@ -20,11 +20,11 @@ function aupd_wrapper(T, matvecA::Function, matvecB::Function, solveSI::Function rwork = cmplx ? Array(TR, ncv) : Array(TR, 0) if isempty(v0) - resid = Array(T, n) - info = zeros(BlasInt, 1) + resid = Array(T, n) + info = zeros(BlasInt, 1) else - resid = deepcopy(v0) - info = ones(BlasInt, 1) + resid = deepcopy(v0) + info = ones(BlasInt, 1) end iparam = zeros(BlasInt, 11) ipntr = zeros(BlasInt, (sym && !cmplx) ? 11 : 14) diff --git a/base/linalg/dense.jl b/base/linalg/dense.jl index c8ef8f11860c0..0960c65468f3a 100644 --- a/base/linalg/dense.jl +++ b/base/linalg/dense.jl @@ -269,7 +269,7 @@ function expm!{T<:BlasFloat}(A::StridedMatrix{T}) end end - # Undo the balancing + # Undo the balancing for j = ilo:ihi scj = scale[j] for i = 1:n diff --git a/base/linalg/ldlt.jl b/base/linalg/ldlt.jl index 117f4a034bee2..2d5016c82bd2f 100644 --- a/base/linalg/ldlt.jl +++ b/base/linalg/ldlt.jl @@ -14,44 +14,44 @@ convert{T,S,U}(::Type{Factorization{T}}, F::LDLt{S,U}) = convert(LDLt{T,U}, F) # SymTridiagonal function ldltfact!{T<:Real}(S::SymTridiagonal{T}) - n = size(S,1) - d = S.dv - e = S.ev - @inbounds for i = 1:n-1 - e[i] /= d[i] - d[i+1] -= abs2(e[i])*d[i] - d[i+1] > 0 || throw(PosDefException(i+1)) - end - return LDLt{T,SymTridiagonal{T}}(S) + n = size(S,1) + d = S.dv + e = S.ev + @inbounds for i = 1:n-1 + e[i] /= d[i] + d[i+1] -= abs2(e[i])*d[i] + d[i+1] > 0 || throw(PosDefException(i+1)) + end + return LDLt{T,SymTridiagonal{T}}(S) end function ldltfact{T}(M::SymTridiagonal{T}) - S = typeof(zero(T)/one(T)) - return S == T ? ldltfact!(copy(M)) : ldltfact!(convert(SymTridiagonal{S}, M)) + S = typeof(zero(T)/one(T)) + return S == T ? ldltfact!(copy(M)) : ldltfact!(convert(SymTridiagonal{S}, M)) end function A_ldiv_B!{T}(S::LDLt{T,SymTridiagonal{T}}, B::AbstractVecOrMat{T}) - n, nrhs = size(B, 1), size(B, 2) - size(S,1) == n || throw(DimensionMismatch("")) - d = S.data.dv - l = S.data.ev - @inbounds begin - for i = 2:n - li1 = l[i-1] - for j = 1:nrhs - B[i,j] -= li1*B[i-1,j] - end - end - dn = d[n] - for j = 1:nrhs - B[n,j] /= dn - end - for i = n-1:-1:1 - di = d[i] - li = l[i] - for j = 1:nrhs - B[i,j] /= di - B[i,j] -= li*B[i+1,j] - end - end - end - return B + n, nrhs = size(B, 1), size(B, 2) + size(S,1) == n || throw(DimensionMismatch("")) + d = S.data.dv + l = S.data.ev + @inbounds begin + for i = 2:n + li1 = l[i-1] + for j = 1:nrhs + B[i,j] -= li1*B[i-1,j] + end + end + dn = d[n] + for j = 1:nrhs + B[n,j] /= dn + end + for i = n-1:-1:1 + di = d[i] + li = l[i] + for j = 1:nrhs + B[i,j] /= di + B[i,j] -= li*B[i+1,j] + end + end + end + return B end diff --git a/base/pkg.jl b/base/pkg.jl index e53c0aff261ca..7bef424bbbb07 100644 --- a/base/pkg.jl +++ b/base/pkg.jl @@ -50,7 +50,7 @@ tag(pkg::String, sym::Symbol, commit::String) = cd(Entry.tag,pkg,sym,false,commi tag(pkg::String, ver::VersionNumber; force::Bool=false) = cd(Entry.tag,pkg,ver,force) tag(pkg::String, ver::VersionNumber, commit::String; force::Bool=false) = - cd(Entry.tag,pkg,ver,force,commit) + cd(Entry.tag,pkg,ver,force,commit) submit(pkg::String) = cd(Entry.submit,pkg) submit(pkg::String, commit::String) = cd(Entry.submit,pkg,commit) @@ -61,7 +61,7 @@ build() = cd(Entry.build) build(pkgs::String...) = cd(Entry.build,[pkgs...]) generate(pkg::String, license::String; force::Bool=false, authors::Union(String,Array) = [], config::Dict=Dict()) = - cd(Generate.package,pkg,license,force=force,authors=authors,config=config) + cd(Generate.package,pkg,license,force=force,authors=authors,config=config) test(;coverage::Bool=false) = cd(Entry.test; coverage=coverage) diff --git a/base/pkg/cache.jl b/base/pkg/cache.jl index b0d7bc4d4e9c1..23d0c44a9a327 100644 --- a/base/pkg/cache.jl +++ b/base/pkg/cache.jl @@ -40,9 +40,9 @@ function prefetch{S<:String}(pkg::String, url::String, sha1s::Vector{S}) Git.set_remote_url(url, dir=cache) if !all(sha1->Git.iscommit(sha1, dir=cache), sha1s) info("Updating cache of $pkg...") - Git.success(`remote update`, dir=cache) || - error("couldn't update $cache using `git remote update`") - end + Git.success(`remote update`, dir=cache) || + error("couldn't update $cache using `git remote update`") + end filter(sha1->!Git.iscommit(sha1, dir=cache), sha1s) end prefetch(pkg::String, url::String, sha1::String...) = prefetch(pkg, url, String[sha1...]) diff --git a/base/socket.jl b/base/socket.jl index 18059a5f5429b..515e057b9e2eb 100644 --- a/base/socket.jl +++ b/base/socket.jl @@ -666,7 +666,7 @@ function listenany(default_port) return (addr.port,sock) end close(sock) - addr.port += 1 + addr.port += 1 if addr.port==default_port error("no ports available") end