diff options
author | Ian Jauslin <ian.jauslin@rutgers.edu> | 2023-02-26 18:36:05 -0500 |
---|---|---|
committer | Ian Jauslin <ian.jauslin@rutgers.edu> | 2023-02-26 18:36:05 -0500 |
commit | c1b477a1b2b796617c4e345a7296a8d429d7a067 (patch) | |
tree | 8a8a2fc0fb6e7da5f4b0b271382740f858ee4372 /src/multithread.jl | |
parent | e72af82c3ed16b81cdb5043c58abbdbb3cf02102 (diff) |
Update to v0.4v0.4
feature: compute the 2-point correlation function in easyeq.
feature: compute the Fourier transform of the 2-point correlation function
in anyeq and easyeq.
feature: compute the local maximum of the 2-point correlation function and
its Fourier transform.
feature: compute the compressibility for anyeq.
feature: allow for linear spacing of rho's.
feature: print the scattering length.
change: ux and uk now return real numbers.
fix: error in the computation of the momentum distribution: wrong
definition of delta functions.
fix: various minor bugs.
optimization: assign explicit types to variables.
Diffstat (limited to 'src/multithread.jl')
-rw-r--r-- | src/multithread.jl | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/multithread.jl b/src/multithread.jl new file mode 100644 index 0000000..f61cdd7 --- /dev/null +++ b/src/multithread.jl @@ -0,0 +1,16 @@ +# split up 1...n among workers +function spawn_workers(n::Int64) + # number of workers + nw=nworkers() + # split jobs among workers + work=Array{Array{Int64,1},1}(undef,nw) + # init empty arrays + for p in 1:nw + work[p]=Int64[] + end + for i in 1:n + append!(work[(i-1)%nw+1],[i]) + end + + return work +end |