Click here to Skip to main content
16,022,205 members

Comments by CommentFree (Top 4 by date)

CommentFree 24-Aug-24 14:33pm View    
These seem brilliant. The first solution assumes that the triangle constructor is a significant expenditure, and so a first-run-through doing something trivial in serial followed by parallelization for something complex is still better than serial for the complex task. That would be quite correct in this case as the triangle constructor does a bunch of math stuff.

The second approach seems like it would work straight away, and then you don't need the initial serial loop, which is my preference. Seems so trivial now! I'll run a few simulations of your 2nd solution in my head with small nPSEtriangles, and see if the numbers comes out right...at a glance it seems like it's correct?! Thanks!
CommentFree 24-Aug-24 14:26pm View    
I do math-computation intensive work, and I parallelize everything, and it always massively boosts performance.
CommentFree 24-Aug-24 14:19pm View    
Deleted
Oh it's a very large number of triangles to create, even with the triangles constructor being trivial, although it does do some computations to characterize each triangle. This section takes a few seconds to compute, and that could be reduced to sub-second on target machines with 32+ threads, I'm sure.
CommentFree 24-Aug-24 14:19pm View    
Oh it's a very large number of triangles to create, and the triangles constructor is not quite trivial, as it does do some computations to characterize each triangle. This section takes a few seconds to compute, and that could be reduced to sub-second on target machines with 32+ threads, I'm sure.