Skip to content
This repository has been archived by the owner on Oct 23, 2022. It is now read-only.

Commit

Permalink
Replace lingering generateray() calls (#183)
Browse files Browse the repository at this point in the history
* generateray(sources, k) -> sources[k]

fixes #166

* v0.5.0-DEV -> v0.5.0 (release ready)

Co-authored-by: BrianGun <[email protected]>
  • Loading branch information
alfredclwong and BrianGun authored May 13, 2021
1 parent 20ddd28 commit 1353315
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name = "OpticSim"
uuid = "24114763-4efb-45e7-af0e-cde916beb153"
authors = ["Brian Guenter", "Charlie Hewitt", "Ran Gal", "Alfred Wong"]
repository = "https://github.com/microsoft/OpticSim.jl"
version = "0.5.0-DEV"
version = "0.5.0"

[deps]
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
Expand Down
8 changes: 4 additions & 4 deletions src/Optical/OpticalSystem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -597,14 +597,14 @@ function traceMT(
print("\rTraced: ~ $t / $(length(sources)) Elapsed: $(dif)s Left: $(left)s ")
end
end
trace(system, generateray(sources, k), test = test)
trace(system, sources[k]; test)
end
else
for k in f:l
if k % update_timesteps == 0
Threads.atomic_add!(total_traced, update_timesteps)
end
trace(system, generateray(sources, k), test = test)
trace(system, sources[k]; test)
end
end
end
Expand Down Expand Up @@ -713,7 +713,7 @@ function tracehitsMT(
print("\rTraced: ~ $t / $(length(sources)) Elapsed: $(dif)s Left: $(left)s ")
end
end
lt = trace(system, generateray(sources, k), test = test)
lt = trace(system, sources[k]; test)
if lt !== nothing
push!(results[i], lt)
end
Expand All @@ -723,7 +723,7 @@ function tracehitsMT(
if k % update_timesteps == 0
Threads.atomic_add!(total_traced, update_timesteps)
end
lt = trace(system, generateray(sources, k), test = test)
lt = trace(system, sources[k]; test)
if lt !== nothing
push!(results[i], lt)
end
Expand Down

0 comments on commit 1353315

Please sign in to comment.