How to configure multithreading in pmc method?

R G W

Active CAD practitioner
Hi, i'm rgw.
I have studied the pmc course on YouTube, which is a very good course. When I use the pmc method, I try to use multithreading to speed up the judgment process. What I want to ask is whether the method classMesh.IsIn() can be used more Threads for acceleration? That is to say, does the class object classMesh change due to different threads?
Thank you for your help.
 

R G W

Active CAD practitioner
My problem has been solved. I think it can be accelerated by using multithreading.
 

Quaoar

Administrator
Staff member
Hello there. Can you say in a couple of words how exactly you enabled multithreading? I don't think that the original code was prepared for running in multiple threads, so it's a bit of an architectural thing to make it parallel.
 

R G W

Active CAD practitioner
I
Hello there. Can you say in a couple of words how exactly you enabled multithreading? I don't think that the original code was prepared for running in multiple threads, so it's a bit of an architectural thing to make it parallel.
Yes, when I use the pmc method, I use #pragma omp critical. In doing so, pmc does not have multithreading in essence.
 

Quaoar

Administrator
Staff member
Alright, so its OpenMP based. Did you measure how much faster it became in the parallel mode?
 

R G W

Active CAD practitioner
Alright, so its OpenMP based. Did you measure how much faster it became in the parallel mode?
I didn't test how much the speedup is, because my code is not strong and I have a lot of other work to be done, but it seems that there should be a speedup
 
Top