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

Commit

Permalink
fix multi threading macro
Browse files Browse the repository at this point in the history
  • Loading branch information
Roger-luo committed May 23, 2019
1 parent de72bf3 commit 0cb4ac8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/instruct.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ macro threads(ex)
if Threads.nthreads() == 1 # do nothing in single threading mode
return esc(ex)
else
return quote
if log2dim1($(esc(state))) < THREAD_THRESHOLD
$(esc(ex))
return esc(quote
if log2dim1(state) < THREAD_THRESHOLD
$ex
else
Threads.@threads $(ex)
Threads.@threads $ex
end
end
end)
end
end

Expand Down

0 comments on commit 0cb4ac8

Please sign in to comment.