Skip to content

Commit

Permalink
rewrite zeros(T, dims) to fill(zero(T), dims)
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrikekre committed Jan 11, 2018
1 parent e07898e commit c3513ca
Show file tree
Hide file tree
Showing 45 changed files with 130 additions and 130 deletions.
2 changes: 1 addition & 1 deletion base/env.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if Sys.iswindows()
if len == 0
return Libc.GetLastError() != ERROR_ENVVAR_NOT_FOUND ? "" : onError(str)
end
val = zeros(UInt16,len)
val = fill(zero(UInt16), len)
ret = ccall(:GetEnvironmentVariableW,stdcall,UInt32,(Ptr{UInt16},Ptr{UInt16},UInt32),var,val,len)
if (ret == 0 && len != 1) || ret != len-1 || val[end] != 0
error(string("getenv: ", str, ' ', len, "-1 != ", ret, ": ", Libc.FormatMessage()))
Expand Down
4 changes: 2 additions & 2 deletions base/linalg/bidiag.jl
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ end
#Converting from Bidiagonal to dense Matrix
function Matrix{T}(A::Bidiagonal) where T
n = size(A, 1)
B = zeros(T, n, n)
B = fill(zero(T), n, n)
for i = 1:n - 1
B[i,i] = A.dv[i]
if A.uplo == 'U'
Expand Down Expand Up @@ -605,7 +605,7 @@ function eigvecs(M::Bidiagonal{T}) where T
n = length(M.dv)
Q = Matrix{T}(uninitialized, n,n)
blks = [0; find(x -> x == 0, M.ev); n]
v = zeros(T, n)
v = fill(zero(T), n)
if M.uplo == 'U'
for idx_block = 1:length(blks) - 1, i = blks[idx_block] + 1:blks[idx_block + 1] #index of eigenvector
fill!(v, zero(T))
Expand Down
4 changes: 2 additions & 2 deletions base/linalg/bitarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ end
#if mA == 0; return C; end
#col_ch = num_bit_chunks(mA)
## TODO: avoid using aux chunks and copy (?)
#aux_chunksA = zeros(UInt64, col_ch)
#aux_chunksB = [zeros(UInt64, col_ch) for j=1:nB]
#aux_chunksA = fill(zero(UInt64), col_ch)
#aux_chunksB = [fill(zero(UInt64), col_ch) for j=1:nB]
#for j = 1:nB
#Base.copy_chunks!(aux_chunksB[j], 1, B.chunks, (j-1)*mA+1, mA)
#end
Expand Down
2 changes: 1 addition & 1 deletion base/linalg/cholesky.jl
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ function getproperty(C::CholeskyPivoted{T}, d::Symbol) where T<:BlasFloat
return getfield(C, :piv)
elseif d == :P
n = size(C, 1)
P = zeros(T, n, n)
P = fill(zero(T), n, n)
for i = 1:n
P[getfield(C, :piv)[i], i] = one(T)
end
Expand Down
6 changes: 3 additions & 3 deletions base/linalg/dense.jl
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ end
function diagm_container(kv::Pair{<:Integer,<:AbstractVector}...)
T = promote_type(map(x -> eltype(x.second), kv)...)
n = mapreduce(x -> length(x.second) + abs(x.first), max, kv)
return zeros(T, n, n)
return fill(zero(T), n, n)
end
function diagm_container(kv::Pair{<:Integer,<:BitVector}...)
n = mapreduce(x -> length(x.second) + abs(x.first), max, kv)
Expand Down Expand Up @@ -1280,7 +1280,7 @@ function pinv(A::StridedMatrix{T}, tol::Real) where T
if istril(A)
if istriu(A)
maxabsA = maximum(abs.(diag(A)))
B = zeros(Tout, n, m)
B = fill(zero(Tout), n, m)
for i = 1:min(m, n)
if abs(A[i,i]) > tol*maxabsA
Aii = inv(A[i,i])
Expand All @@ -1294,7 +1294,7 @@ function pinv(A::StridedMatrix{T}, tol::Real) where T
end
SVD = svdfact(A, full = false)
Stype = eltype(SVD.S)
Sinv = zeros(Stype, length(SVD.S))
Sinv = fill(zero(Stype), length(SVD.S))
index = SVD.S .> tol*maximum(SVD.S)
Sinv[index] = one(Stype) ./ SVD.S[index]
Sinv[find(.!isfinite.(Sinv))] = zero(Stype)
Expand Down
2 changes: 1 addition & 1 deletion base/linalg/diagonal.jl
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ end
r
end
diagzero(::Diagonal{T},i,j) where {T} = zero(T)
diagzero(D::Diagonal{Matrix{T}},i,j) where {T} = zeros(T, size(D.diag[i], 1), size(D.diag[j], 2))
diagzero(D::Diagonal{Matrix{T}},i,j) where {T} = fill(zero(T), size(D.diag[i], 1), size(D.diag[j], 2))

function setindex!(D::Diagonal, v, i::Int, j::Int)
@boundscheck checkbounds(D, i, j)
Expand Down
4 changes: 2 additions & 2 deletions base/linalg/hessenberg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ function getproperty(F::Hessenberg, d::Symbol)
end

function getindex(A::HessenbergQ, i::Integer, j::Integer)
x = zeros(eltype(A), size(A, 1))
x = fill(zero(eltype(A)), size(A, 1))
x[i] = 1
y = zeros(eltype(A), size(A, 2))
y = fill(zero(eltype(A)), size(A, 2))
y[j] = 1
return dot(x, mul!(A, y))
end
Expand Down
18 changes: 9 additions & 9 deletions base/linalg/lapack.jl
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ and `tau`, which stores the elementary reflectors.
"""
function geqp3!(A::AbstractMatrix{<:BlasFloat})
m, n = size(A)
geqp3!(A, zeros(BlasInt, n), similar(A, min(m, n)))
geqp3!(A, fill(zero(BlasInt), n), similar(A, min(m, n)))
end

## Complete orthogonaliztion tools
Expand Down Expand Up @@ -1206,7 +1206,7 @@ for (gelsd, gelsy, elty) in
if size(B, 1) != m
throw(DimensionMismatch("B has leading dimension $(size(B,1)) but needs $m"))
end
newB = [B; zeros($elty, max(0, n - size(B, 1)), size(B, 2))]
newB = [B; fill(zero($elty), max(0, n - size(B, 1)), size(B, 2))]
s = similar(A, $elty, min(m, n))
rnk = Ref{BlasInt}()
info = Ref{BlasInt}()
Expand Down Expand Up @@ -1250,10 +1250,10 @@ for (gelsd, gelsy, elty) in
if size(B, 1) != m
throw(DimensionMismatch("B has leading dimension $(size(B,1)) but needs $m"))
end
newB = [B; zeros($elty, max(0, n - size(B, 1)), size(B, 2))]
newB = [B; fill(zero($elty), max(0, n - size(B, 1)), size(B, 2))]
lda = max(1, stride(A,2))
ldb = max(1, stride(newB,2))
jpvt = zeros(BlasInt, n)
jpvt = fill(zero(BlasInt), n)
rnk = Ref{BlasInt}()
work = Vector{$elty}(uninitialized, 1)
lwork = BlasInt(-1)
Expand Down Expand Up @@ -1299,7 +1299,7 @@ for (gelsd, gelsy, elty, relty) in
if size(B, 1) != m
throw(DimensionMismatch("B has leading dimension $(size(B,1)) but needs $m"))
end
newB = [B; zeros($elty, max(0, n - size(B, 1)), size(B, 2))]
newB = [B; fill(zero($elty), max(0, n - size(B, 1)), size(B, 2))]
s = similar(A, $relty, min(m, n))
rnk = Ref{BlasInt}()
info = Ref{BlasInt}()
Expand Down Expand Up @@ -1345,10 +1345,10 @@ for (gelsd, gelsy, elty, relty) in
if size(B, 1) != m
throw(DimensionMismatch("B has leading dimension $(size(B,1)) but needs $m"))
end
newB = [B; zeros($elty, max(0, n - size(B, 1)), size(B, 2))]
newB = [B; fill(zero($elty), max(0, n - size(B, 1)), size(B, 2))]
lda = max(1, m)
ldb = max(1, m, n)
jpvt = zeros(BlasInt, n)
jpvt = fill(zero(BlasInt), n)
rnk = Ref{BlasInt}(1)
work = Vector{$elty}(uninitialized, 1)
lwork = BlasInt(-1)
Expand Down Expand Up @@ -1424,7 +1424,7 @@ for (gglse, elty) in ((:dgglse_, :Float64),
if length(d) != p
throw(DimensionMismatch("d has length $(length(d)), needs $p"))
end
X = zeros($elty, n)
X = fill(zero($elty), n)
info = Ref{BlasInt}()
work = Vector{$elty}(uninitialized, 1)
lwork = BlasInt(-1)
Expand Down Expand Up @@ -3721,7 +3721,7 @@ for (stev, stebz, stegr, stein, elty) in
if length(ev_in) != n - 1
throw(DimensionMismatch("ev_in has length $(length(ev_in)) but needs one less than dv's length, $n)"))
end
ev = [ev_in; zeros($elty,1)]
ev = [ev_in; fill(zero($elty),1)]
ldz = n #Leading dimension
#Number of eigenvalues to find
if !(1 <= length(w_in) <= n)
Expand Down
8 changes: 4 additions & 4 deletions base/linalg/lq.jl
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ function getproperty(F::LQ, d::Symbol)
end

getindex(A::LQPackedQ, i::Integer, j::Integer) =
mul!(A, setindex!(zeros(eltype(A), size(A, 2)), 1, j))[i]
mul!(A, setindex!(fill(zero(eltype(A)), size(A, 2)), 1, j))[i]

function show(io::IO, C::LQ)
println(io, "$(typeof(C)) with factors L and Q:")
Expand Down Expand Up @@ -160,7 +160,7 @@ function *(adjA::Adjoint{<:Any,<:LQPackedQ}, B::StridedVecOrMat)
if size(B,1) == size(A.factors,2)
mul!(adjoint(AbstractMatrix{TAB}(A)), copy_oftype(B, TAB))
elseif size(B,1) == size(A.factors,1)
mul!(adjoint(AbstractMatrix{TAB}(A)), [B; zeros(TAB, size(A.factors, 2) - size(A.factors, 1), size(B, 2))])
mul!(adjoint(AbstractMatrix{TAB}(A)), [B; fill(zero(TAB), size(A.factors, 2) - size(A.factors, 1), size(B, 2))])
else
throw(DimensionMismatch("first dimension of B, $(size(B,1)), must equal one of the dimensions of A, $(size(A))"))
end
Expand Down Expand Up @@ -235,7 +235,7 @@ function *(A::StridedVecOrMat, Q::LQPackedQ)
if size(A, 2) == size(Q.factors, 2)
C = copy_oftype(A, TR)
elseif size(A, 2) == size(Q.factors, 1)
C = zeros(TR, size(A, 1), size(Q.factors, 2))
C = fill(zero(TR), size(A, 1), size(Q.factors, 2))
copyto!(C, 1, A, 1, length(A))
else
_rightappdimmismatch("columns")
Expand All @@ -248,7 +248,7 @@ function *(adjA::Adjoint{<:Any,<:StridedMatrix}, Q::LQPackedQ)
if size(A, 1) == size(Q.factors, 2)
C = adjoint!(similar(A, TR, reverse(size(A))), A)
elseif size(A, 1) == size(Q.factors, 1)
C = zeros(TR, size(A, 2), size(Q.factors, 2))
C = fill(zero(TR), size(A, 2), size(Q.factors, 2))
adjoint!(view(C, :, 1:size(A, 1)), A)
else
_rightappdimmismatch("rows")
Expand Down
20 changes: 10 additions & 10 deletions base/linalg/qr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ QRPivoted(factors::AbstractMatrix{T}, τ::Vector{T}, jpvt::Vector{BlasInt}) wher

function qrfactUnblocked!(A::AbstractMatrix{T}) where {T}
m, n = size(A)
τ = zeros(T, min(m,n))
τ = fill(zero(T), min(m,n))
for k = 1:min(m - 1 + !(T<:Real), n)
x = view(A, k:m, k)
τk = reflector!(x)
Expand Down Expand Up @@ -460,7 +460,7 @@ function getproperty(F::QRPivoted{T}, d::Symbol) where T
elseif d == :P
p = F.p
n = length(p)
P = zeros(T, n, n)
P = fill(zero(T), n, n)
for i in 1:n
P[p[i],i] = one(T)
end
Expand Down Expand Up @@ -514,9 +514,9 @@ size(A::AbstractQ) = size(A, 1), size(A, 2)


function getindex(A::AbstractQ, i::Integer, j::Integer)
x = zeros(eltype(A), size(A, 1))
x = fill(zero(eltype(A)), size(A, 1))
x[i] = 1
y = zeros(eltype(A), size(A, 2))
y = fill(zero(eltype(A)), size(A, 2))
y[j] = 1
return dot(x, mul!(A, y))
end
Expand Down Expand Up @@ -558,7 +558,7 @@ function (*)(A::AbstractQ, b::StridedVector)
if size(A.factors, 1) == length(b)
bnew = copy_oftype(b, TAb)
elseif size(A.factors, 2) == length(b)
bnew = [b; zeros(TAb, size(A.factors, 1) - length(b))]
bnew = [b; fill(zero(TAb), size(A.factors, 1) - length(b))]
else
throw(DimensionMismatch("vector must have length either $(size(A.factors, 1)) or $(size(A.factors, 2))"))
end
Expand All @@ -570,7 +570,7 @@ function (*)(A::AbstractQ, B::StridedMatrix)
if size(A.factors, 1) == size(B, 1)
Bnew = copy_oftype(B, TAB)
elseif size(A.factors, 2) == size(B, 1)
Bnew = [B; zeros(TAB, size(A.factors, 1) - size(B,1), size(B, 2))]
Bnew = [B; fill(zero(TAB), size(A.factors, 1) - size(B,1), size(B, 2))]
else
throw(DimensionMismatch("first dimension of matrix must have size either $(size(A.factors, 1)) or $(size(A.factors, 2))"))
end
Expand Down Expand Up @@ -711,7 +711,7 @@ function *(A::StridedMatrix, adjB::Adjoint{<:Any,<:AbstractQ})
copyto!(AA, A)
return mul!(AA, adjoint(BB))
elseif size(A,2) == size(B.factors,2)
return mul!([A zeros(TAB, size(A, 1), size(B.factors, 1) - size(B.factors, 2))], adjoint(BB))
return mul!([A fill(zero(TAB), size(A, 1), size(B.factors, 1) - size(B.factors, 2))], adjoint(BB))
else
throw(DimensionMismatch("matrix A has dimensions $(size(A)) but matrix B has dimensions $(size(B))"))
end
Expand Down Expand Up @@ -788,7 +788,7 @@ function ldiv!(A::QR{T}, B::StridedMatrix{T}) where T
R = A.R
@inbounds begin
if n > m # minimum norm solution
τ = zeros(T,m)
τ = fill(zero(T),m)
for k = m:-1:1 # Trapezoid to triangular by elementary operation
x = view(R, k, [k; m + 1:n])
τk = reflector!(x)
Expand Down Expand Up @@ -845,8 +845,8 @@ _cut_B(x::AbstractVector, r::UnitRange) = length(x) > length(r) ? x[r] : x
_cut_B(X::AbstractMatrix, r::UnitRange) = size(X, 1) > length(r) ? X[r,:] : X

## append right hand side with zeros if necessary
_zeros(::Type{T}, b::AbstractVector, n::Integer) where {T} = zeros(T, max(length(b), n))
_zeros(::Type{T}, B::AbstractMatrix, n::Integer) where {T} = zeros(T, max(size(B, 1), n), size(B, 2))
_zeros(::Type{T}, b::AbstractVector, n::Integer) where {T} = fill(zero(T), max(length(b), n))
_zeros(::Type{T}, B::AbstractMatrix, n::Integer) where {T} = fill(zero(T), max(size(B, 1), n), size(B, 2))

function (\)(A::Union{QR{TA},QRCompactWY{TA},QRPivoted{TA}}, B::AbstractVecOrMat{TB}) where {TA,TB}
S = promote_type(TA,TB)
Expand Down
14 changes: 7 additions & 7 deletions base/linalg/svd.jl
Original file line number Diff line number Diff line change
Expand Up @@ -439,23 +439,23 @@ svd(x::Number, y::Number) = first.(svd(fill(x, 1, 1), fill(y, 1, 1)))
elseif d == :D1
m = size(FU, 1)
if m - Fk - Fl >= 0
return [Matrix{T}(I, Fk, Fk) zeros(T, Fk, Fl) ;
zeros(T, Fl, Fk) Diagonal(Fa[Fk + 1:Fk + Fl]);
zeros(T, m - Fk - Fl, Fk + Fl) ]
return [Matrix{T}(I, Fk, Fk) fill(zero(T), Fk, Fl) ;
fill(zero(T), Fl, Fk) Diagonal(Fa[Fk + 1:Fk + Fl]);
fill(zero(T), m - Fk - Fl, Fk + Fl) ]
else
return [Matrix{T}(I, m, Fk) [zeros(T, Fk, m - Fk); Diagonal(Fa[Fk + 1:m])] zeros(T, m, Fk + Fl - m)]
return [Matrix{T}(I, m, Fk) [fill(zero(T), Fk, m - Fk); Diagonal(Fa[Fk + 1:m])] fill(zero(T), m, Fk + Fl - m)]
end
elseif d == :D2
m = size(FU, 1)
p = size(FV, 1)
if m - Fk - Fl >= 0
return [zeros(T, Fl, Fk) Diagonal(Fb[Fk + 1:Fk + Fl]); zeros(T, p - Fl, Fk + Fl)]
return [fill(zero(T), Fl, Fk) Diagonal(Fb[Fk + 1:Fk + Fl]); fill(zero(T), p - Fl, Fk + Fl)]
else
return [zeros(T, p, Fk) [Diagonal(Fb[Fk + 1:m]); zeros(T, Fk + p - m, m - Fk)] [zeros(T, m - Fk, Fk + Fl - m); Matrix{T}(I, Fk + p - m, Fk + Fl - m)]]
return [fill(zero(T), p, Fk) [Diagonal(Fb[Fk + 1:m]); fill(zero(T), Fk + p - m, m - Fk)] [fill(zero(T), m - Fk, Fk + Fl - m); Matrix{T}(I, Fk + p - m, Fk + Fl - m)]]
end
elseif d == :R0
n = size(FQ, 1)
return [zeros(T, Fk + Fl, n - Fk - Fl) FR]
return [fill(zero(T), Fk + Fl, n - Fk - Fl) FR]
else
getfield(F, d)
end
Expand Down
4 changes: 2 additions & 2 deletions base/linalg/triangular.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2093,7 +2093,7 @@ function log(A0::UpperTriangular{T}) where T<:BlasFloat
end

# Compute the Padé approximation
Y = zeros(T, n, n)
Y = fill(zero(T), n, n)
for k = 1:m
Y = Y + w[k] * (A / (x[k] * A + I))
end
Expand Down Expand Up @@ -2297,7 +2297,7 @@ function sqrt(A::UpperTriangular{T},::Val{realmatrix}) where {T,realmatrix}
B = A.data
n = checksquare(B)
t = realmatrix ? typeof(sqrt(zero(T))) : typeof(sqrt(complex(zero(T))))
R = zeros(t, n, n)
R = fill(zero(t), n, n)
tt = typeof(zero(t)*zero(t))
@inbounds for j = 1:n
R[j,j] = realmatrix ? sqrt(B[j,j]) : sqrt(complex(B[j,j]))
Expand Down
2 changes: 1 addition & 1 deletion base/linalg/tridiag.jl
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ AbstractMatrix{T}(S::SymTridiagonal) where {T} =
SymTridiagonal(convert(AbstractVector{T}, S.dv), convert(AbstractVector{T}, S.ev))
function Matrix{T}(M::SymTridiagonal) where T
n = size(M, 1)
Mf = zeros(T, n, n)
Mf = fill(zero(T), n, n)
@inbounds begin
@simd for i = 1:n-1
Mf[i,i] = M.dv[i]
Expand Down
2 changes: 1 addition & 1 deletion base/linalg/uniformscaling.jl
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ chol(J::UniformScaling, args...) = ((C, info) = _chol!(J, nothing); @assertposde


## Matrix construction from UniformScaling
Matrix{T}(s::UniformScaling, dims::Dims{2}) where {T} = setindex!(zeros(T, dims), T(s.λ), diagind(dims...))
Matrix{T}(s::UniformScaling, dims::Dims{2}) where {T} = setindex!(fill(zero(T), dims), T(s.λ), diagind(dims...))
Matrix{T}(s::UniformScaling, m::Integer, n::Integer) where {T} = Matrix{T}(s, Dims((m, n)))
Matrix(s::UniformScaling, m::Integer, n::Integer) = Matrix(s, Dims((m, n)))
Matrix(s::UniformScaling, dims::Dims{2}) = Matrix{eltype(s)}(s, dims)
Expand Down
2 changes: 1 addition & 1 deletion base/multidimensional.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1735,7 +1735,7 @@ julia> unique(A, 3)
```
"""
@generated function unique(A::AbstractArray{T,N}, dim::Int) where {T,N}
inds = inds -> zeros(UInt, inds)
inds = inds -> fill(zero(UInt), inds)
quote
1 <= dim <= $N || return copy(A)
hashes = similar($inds, axes(A, dim))
Expand Down
4 changes: 2 additions & 2 deletions base/path.jl
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ abspath(a::AbstractString, b::AbstractString...) = abspath(joinpath(a,b...))
if Sys.iswindows()
function realpath(path::AbstractString)
p = cwstring(path)
buf = zeros(UInt16, length(p))
buf = fill(zero(UInt16), length(p))
while true
n = ccall((:GetFullPathNameW, "kernel32"), stdcall,
UInt32, (Ptr{UInt16}, UInt32, Ptr{UInt16}, Ptr{Cvoid}),
Expand All @@ -302,7 +302,7 @@ end

function longpath(path::AbstractString)
p = cwstring(path)
buf = zeros(UInt16, length(p))
buf = fill(zero(UInt16), length(p))
while true
n = ccall((:GetLongPathNameW, "kernel32"), stdcall,
UInt32, (Ptr{UInt16}, Ptr{UInt16}, UInt32),
Expand Down
2 changes: 1 addition & 1 deletion base/pkg/resolve/maxsum.jl
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ mutable struct Messages

# initialize cavity messages to 0
gadj = graph.gadj
msg = [[zeros(FieldValue, spp[p0]) for p1 = 1:length(gadj[p0])] for p0 = 1:np]
msg = [[fill(zero(FieldValue), spp[p0]) for p1 = 1:length(gadj[p0])] for p0 = 1:np]

return new(msg, fld, initial_fld, falses(np), np)
end
Expand Down
4 changes: 2 additions & 2 deletions base/random/dSFMT.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const JN32 = (N+1)*4+1+1
mutable struct DSFMT_state
val::Vector{Int32}

function DSFMT_state(val::Vector{Int32} = zeros(Int32, JN32))
function DSFMT_state(val::Vector{Int32} = fill(zero(Int32), JN32))
length(val) == JN32 ||
throw(DomainError(length(val), "Expected length: $JN32."))
new(val)
Expand Down Expand Up @@ -188,7 +188,7 @@ function dsfmt_jump(s::DSFMT_state, jp::GF2X)
val = s.val
nval = length(val)
index = val[nval - 1]
work = zeros(Int32, JN32)
work = fill(zero(Int32), JN32)
rwork = reinterpret(UInt64, work)
dsfmt = Vector{UInt64}(uninitialized, nval >> 1)
ccall(:memcpy, Ptr{Cvoid}, (Ptr{UInt64}, Ptr{Int32}, Csize_t),
Expand Down
Loading

0 comments on commit c3513ca

Please sign in to comment.