Am 23.08.2010 um 15:51 schrieb Alexei Sheplyakov:
When will be ginac thread safe and is there such a thing?
There are no plans to make GiNaC thread safe. Parallel versions of symbolic algorithms are not much faster (and sometimes even slower) than their sequential counterparts. So why bother?
Thanks, but I'm writing some algorithm that can be multithreaded. I use GiNaC for the symbolic arithmetic, but I can do this in parallel. The std structures are not thread-safe, so my algorithms run into race condition errors, because GiNaC uses them (like the parser). IMHO Ginac must not be parallelized, but only the structures should be thread-safe, so they can't create race condition errors. Eg: I create in multithreaded a lot of diff's and Ginac::mul, ::basic, ::ex, ::add create a lot of errors. I think I will try to create a mutex around them and create a wrapper class for the Ginac calls, but it's not my favorite solution Thanks Phil