Skip to content

Commit

Permalink
Misc OCD whitespace adjustments
Browse files Browse the repository at this point in the history
Use 4 space indent in some doc code examples
  • Loading branch information
tkelman committed Jul 2, 2016
1 parent c659690 commit bcfc934
Show file tree
Hide file tree
Showing 13 changed files with 21 additions and 34 deletions.
2 changes: 1 addition & 1 deletion base/inference.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Core: _apply, svec, apply_type, Builtin, IntrinsicFunction
#### parameters limiting potentially-infinite types ####
const MAX_TYPEUNION_LEN = 3
const MAX_TYPE_DEPTH = 7
const MAX_TUPLETYPE_LEN = 15
const MAX_TUPLETYPE_LEN = 15
const MAX_TUPLE_DEPTH = 4

const MAX_TUPLE_SPLAT = 16
Expand Down
1 change: 0 additions & 1 deletion base/multi.jl
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,6 @@ function send_connection_hdr(w::Worker, cookie=true)
# For a connection initiated from the remote side to us, we only send the version,
# else when we initiate a connection we first send the cookie followed by our version.
# The remote side validates the cookie.

if cookie
write(w.w_stream, LPROC.cookie)
end
Expand Down
1 change: 0 additions & 1 deletion base/random.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1190,7 +1190,6 @@ randexp(dims::Int...) = randexp!(Array{Float64}(dims))
randexp(rng::AbstractRNG, dims::Dims) = randexp!(rng, Array{Float64}(dims))
randexp(rng::AbstractRNG, dims::Int...) = randexp!(rng, Array{Float64}(dims))


## random UUID generation

immutable UUID
Expand Down
1 change: 0 additions & 1 deletion base/sharedarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ If an `init` function of the type `initfn(S::SharedArray)` is specified, it is c
the participating workers.
"""
function SharedArray{T,N}(::Type{T}, dims::Dims{N}; init=false, pids=Int[])

isbits(T) || throw(ArgumentError("type of SharedArray elements must be bits types, got $(T)"))

pids, onlocalhost = shared_pids(pids)
Expand Down
22 changes: 11 additions & 11 deletions doc/manual/variables-and-scoping.rst
Original file line number Diff line number Diff line change
Expand Up @@ -400,8 +400,8 @@ storage. Here is an example where the behavior of ``let`` is needed::
Fs = Array{Any}(2)
i = 1
while i <= 2
Fs[i] = ()->i
i += 1
Fs[i] = ()->i
i += 1
end

julia> Fs[1]()
Expand All @@ -418,10 +418,10 @@ behave identically. We can use ``let`` to create a new binding for
Fs = Array{Any}(2)
i = 1
while i <= 2
let i = i
Fs[i] = ()->i
end
i += 1
let i = i
Fs[i] = ()->i
end
i += 1
end

julia> Fs[1]()
Expand All @@ -437,11 +437,11 @@ block without creating any new bindings:
.. doctest::

julia> let
local x = 1
let
local x = 2
end
x
local x = 1
let
local x = 2
end
x
end
1

Expand Down
4 changes: 2 additions & 2 deletions src/ccalltest.c
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ JL_DLLEXPORT void *test_echo_p(void *p) {

#include <xmmintrin.h>

JL_DLLEXPORT __m128i test_m128i(__m128i a, __m128i b, __m128i c, __m128i d )
JL_DLLEXPORT __m128i test_m128i(__m128i a, __m128i b, __m128i c, __m128i d)
{
// 64-bit x86 has only level 2 SSE, which does not have a <4 x int32> multiplication,
// so we use floating-point instead, and assume caller knows about the hack.
Expand All @@ -544,7 +544,7 @@ JL_DLLEXPORT __m128i test_m128i(__m128i a, __m128i b, __m128i c, __m128i d )
_mm_cvtepi32_ps(_mm_sub_epi32(c,d)))));
}

JL_DLLEXPORT __m128 test_m128(__m128 a, __m128 b, __m128 c, __m128 d )
JL_DLLEXPORT __m128 test_m128(__m128 a, __m128 b, __m128 c, __m128 d)
{
return _mm_add_ps(a, _mm_mul_ps(b, _mm_sub_ps(c, d)));
}
Expand Down
2 changes: 0 additions & 2 deletions src/jitlayers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1071,7 +1071,6 @@ void jl_dump_native(const char *bc_fname, const char *obj_fname, const char *sys
if (!err.empty())
jl_safe_printf("%s\n", err.c_str());
else {

#ifndef LLVM37
bc_FOS.reset(new formatted_raw_ostream(*bc_OS.get()));
#endif
Expand All @@ -1095,7 +1094,6 @@ void jl_dump_native(const char *bc_fname, const char *obj_fname, const char *sys
if (!err.empty())
jl_safe_printf("%s\n", err.c_str());
else {

#ifndef LLVM37
obj_FOS.reset(new formatted_raw_ostream(*obj_OS.get()));
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/jltypes.c
Original file line number Diff line number Diff line change
Expand Up @@ -2115,7 +2115,7 @@ void jl_precompute_memoized_dt(jl_datatype_t *dt)
if (d > dt->depth)
dt->depth = d;
if (!dt->hastypevars)
dt->hastypevars = jl_has_typevars__(p, 0, NULL, 0);
dt->hastypevars = jl_has_typevars__(p, 0, NULL, 0);
if (!dt->haswildcard)
dt->haswildcard = jl_has_typevars__(p, 1, NULL, 0);
if (dt->isleaftype)
Expand Down
6 changes: 1 addition & 5 deletions test/fft.jl
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ for (f,fi,pf,pfi) in ((fft,ifft,plan_fft,plan_ifft),
# The following capabilities are FFTW only.
# They are not available in MKL, and hence do not test them.
if Base.fftw_vendor() != :mkl

ifft3_fft3_m3d = fi(f(m3d))

fftd3_m3d = f(m3d,3)
Expand Down Expand Up @@ -156,9 +155,8 @@ for (f,fi,pf,pfi) in ((fft,ifft,plan_fft,plan_ifft),
@test pfftd3_m3d[i] true_fftd3_m3d[i]
@test pifftd3_fftd3_m3d[i] m3d[i]
@test pfft!d3_m3d[i] true_fftd3_m3d[i]
@test pifft!d3_fftd3_m3d[i] m3d[i]
@test pifft!d3_fftd3_m3d[i] m3d[i]
end

end # if fftw_vendor() != :mkl

# rfft/rfftn
Expand Down Expand Up @@ -206,7 +204,6 @@ for (f,fi,pf,pfi) in ((fft,ifft,plan_fft,plan_ifft),
end

if Base.fftw_vendor() != :mkl

rfftn_m3d = rfft(m3d)
rfftd3_m3d = rfft(m3d,3)
@test size(rfftd3_m3d) == size(fftd3_m3d)
Expand All @@ -225,7 +222,6 @@ for (f,fi,pf,pfi) in ((fft,ifft,plan_fft,plan_ifft),
for i = 1:3, j = 1:3, k = 1:2
@test rfftn_m3d[i,j,k] fftn_m3d[i,j,k]
end

end # !mkl
end

Expand Down
1 change: 0 additions & 1 deletion test/file.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1088,7 +1088,6 @@ test2_12992()
test2_12992()

# issue 13559

if !is_windows()
function test_13559()
fn = tempname()
Expand Down
3 changes: 1 addition & 2 deletions test/linalg/hessenberg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ using Base.Test
using Base.LinAlg: BlasComplex, BlasFloat, BlasReal, QRPivoted

let n = 10

srand(1234321)

Areal = randn(n,n)/2
Expand All @@ -19,7 +18,7 @@ let n = 10
complex(Areal, Aimg) :
Areal)

debug && println("\ntype of a: ", eltya, " type of b: ", eltyb, "\n")
debug && println("\ntype of a: ", eltya, " type of b: ", eltyb, "\n")

if eltya != BigFloat
H = hessfact(A)
Expand Down
2 changes: 0 additions & 2 deletions test/math.jl
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ for T in (Float16,Float32,Float64)
(prevfloat(realmin(T)), nextfloat(one(T),-2)),
(nextfloat(zero(T),3), T(0.75)),
(nextfloat(zero(T)), T(0.5))]

n = Int(log2(a/b))
@test frexp(a) == (b,n)
@test ldexp(b,n) == a
Expand Down Expand Up @@ -539,7 +538,6 @@ end

# digamma
for elty in (Float32, Float64)

@test digamma(convert(elty, 9)) convert(elty, 2.140641477955609996536345)
@test digamma(convert(elty, 2.5)) convert(elty, 0.7031566406452431872257)
@test digamma(convert(elty, 0.1)) convert(elty, -10.42375494041107679516822)
Expand Down
8 changes: 4 additions & 4 deletions test/parse.jl
Original file line number Diff line number Diff line change
Expand Up @@ -516,13 +516,13 @@ end
let err = try
include_string("module A
function broken()
function broken()
x[1] = some_func(
x[1] = some_func(
end
end
end")
end")
catch e
e
end
Expand Down

0 comments on commit bcfc934

Please sign in to comment.