Skip to content
This repository has been archived by the owner on Dec 18, 2021. It is now read-only.

Commit

Permalink
Format .jl files
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Sep 19, 2020
1 parent eb4def4 commit c198ad1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/instruct.jl
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ function _instruct!(
locs_raw::SVector,
ic::IterControl,
) where {T}
work = ndims(state) == 1 ? similar(state, length(locs_raw)) :
work =
ndims(state) == 1 ? similar(state, length(locs_raw)) :
similar(state, length(locs_raw), size(state, 2))
controldo(ic) do i
@inbounds unrows!(state, locs_raw .+ i, U, work)
Expand Down
6 changes: 4 additions & 2 deletions src/register.jl
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,8 @@ function rand_state(
nbatch::Int = 1,
no_transpose_storage::Bool = false,
) where {T}
raw = nbatch == 1 || no_transpose_storage ? randn(T, 1 << n, nbatch) :
raw =
nbatch == 1 || no_transpose_storage ? randn(T, 1 << n, nbatch) :
transpose(randn(T, nbatch, 1 << n))
return normalize!(ArrayReg{nbatch}(raw))
end
Expand Down Expand Up @@ -451,7 +452,8 @@ function uniform_state(
nbatch::Int = 1,
no_transpose_storage::Bool = false,
) where {T}
raw = nbatch == 1 || no_transpose_storage ? ones(T, 1 << n, nbatch) :
raw =
nbatch == 1 || no_transpose_storage ? ones(T, 1 << n, nbatch) :
transpose(ones(T, nbatch, 1 << n))
normalize!(ArrayReg{nbatch}(raw))
end
Expand Down

0 comments on commit c198ad1

Please sign in to comment.