Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion deps/build.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
using Pkg

Pkg.add(PackageSpec(url="https://github.com/danphenderson/TRS.jl.git", rev="8f5af784ee98d72df050fb03deadd88cd41d1209"))
Pkg.add(
PackageSpec(
url = "https://github.com/danphenderson/TRS.jl.git",
rev = "8f5af784ee98d72df050fb03deadd88cd41d1209",
),
)
16 changes: 3 additions & 13 deletions src/BlockOpt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,7 @@ import Base: copy


import LinearAlgebra:
diagm,
BLAS,
Symmetric,
mul!,
norm,
dot,
issymmetric,
rank,
qr,
I,
pinv,
eigvals
diagm, BLAS, Symmetric, mul!, norm, dot, issymmetric, rank, qr, I, pinv, eigvals


import Statistics: mean
Expand Down Expand Up @@ -196,7 +185,8 @@ include("lib/recipes.jl")
const BLAS_THREADS = Ref{Int}(1)


blas_threads!(threads::Int) = (BLAS_THREADS[] = threads) > 1 && BLAS.set_num_threads(threads)
blas_threads!(threads::Int) =
(BLAS_THREADS[] = threads) > 1 && BLAS.set_num_threads(threads)


function __init__()
Expand Down
3 changes: 2 additions & 1 deletion src/lib/trace.jl
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,8 @@ Base.getproperty(t::BlockOptTrace, s::Symbol) = @restrict BlockOptTrace

Base.propertynames(t::BlockOptTrace) = ()

Base.copy(t::BlockOptTrace) = BlockOptTrace(model(t), driver(t), profile(t), weaver(t), log_level(t), io(t))
Base.copy(t::BlockOptTrace) =
BlockOptTrace(model(t), driver(t), profile(t), weaver(t), log_level(t), io(t))

# generates logging methods info!, warn!, debug!, error!
for level in (:info, :debug, :warn, :error)
Expand Down
5 changes: 3 additions & 2 deletions src/options.jl
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,9 @@ to some even natural number. The set value corresponds to ``2w`` in the
article.
"""
samples!(o::DriverOptions, s) = begin
mod(s, 2) ≡ 0 && s > 0 ? setfield!(o, :samples, s) : @warn "samples!: input must be an even natural!"
samples(o)
mod(s, 2) ≡ 0 && s > 0 ? setfield!(o, :samples, s) :
@warn "samples!: input must be an even natural!"
samples(o)
end


Expand Down