sisl / ExprOptimization.jl

Algorithms for optimization of Julia expressions
Other
44 stars 11 forks source link

Multi-threading via Threads.@threads #23

Closed xukai92 closed 4 years ago

xukai92 commented 4 years ago

This PR is to resolve https://github.com/sisl/ExprOptimization.jl/issues/12.

I only added it to CrossEntropy as I'm using it for most of the time. But I'm happy to do the same for others if this looks good.

Besides, what should I do for the unit tests?

rcnlee commented 4 years ago

Yeah, this looks good. Can you please do it for the other ones as well?

Perhaps add a test where you run the same test with 1 thread and then again with 2 threads and make sure the output matches?

Thanks!

xukai92 commented 4 years ago

Can you please do it for the other ones as well?

Sure.

Perhaps add a test where you run the same test with 1 thread and then again with 2 threads and make sure the output matches?

Yeah it's a good idea. Thanks.

I will do both in another PR.