Presumably, that idea will work.
But based on my experience with multi-threading,
because of various overheads and latencies involved,
you have to make sure that there is enough work to do per
thread to make it worthwhile.  Parallelizing the inner loops
like this may or may not yield the expected speedup.
One would have to try to and see...my intuition and experience
makes me somewhat skeptical, but I'd be happy to be proved wrong.
It looks as though the majority vote is for parallelising at the outer level rather than the inner loop.

I'll leave that to more experienced hands, although I might have a private attempt at the inner version, just for my own interest.

Richard

_______________________________________________
gmp-devel mailing list
gmp-devel@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-devel

Reply via email to