[CppAD] Multithreading

Dominik Skanda Dominik.Skanda at biologie.uni-freiburg.de
Mon Mar 19 12:00:05 EDT 2012


Concerning my last message, I have looked a little bit deeper in the code and found out that essentially the command

pod_vector<Base> Partial;
Partial.extend(total_num_var_ * p); 

in reverse.hpp causes the error.
So  as far as I think the Vector Partial is only accesed within the
function 

"VectorBase ADFun<Base>::Reverse(size_t p, const VectorBase &w)" 

and therefore should be thread safe (Since it is no global variable)! On
the other side due to the new memory allocater it is not. I think that
the new memory allocator should only be used were global information is
created. Or is it really true that independently  allocating memory in
one thread  slows down everything even so no mutex mechanism is needed?
This would made the applicability of the CppAD Library really much more
flexible!
 



More information about the CppAD mailing list