[Insight-users] threading with an optimizer

Matt McCormick matt at mmmccormick.com
Sat Dec 4 21:05:51 EST 2010


Luis Ibanez <luis.ibanez at ...> writes:

> 
> Hi Matt,
> 

Thanks for the reply, Luis.

> Is there a reason why you can't instantiate a separate
> AmoebaOptimizer on each one of those threads ?

I can, but I have to copy the parameters of the original somehow.  The 
parameters 
are, e.g., InitialSimplexDelta, MaximumNumberOfIterations, 
ParametersConvergenceTolerance, FunctionConvergenceTolerance.  The question is
what is the best way to do this?  Write a copy constructor for it (would that be 
accepted upstream?)?  Some kind of copy parameters method?  Something to do the 
with vnl_amoebaFit?
   
> 
> Or what you want to do is to introduce threads inside
> the algorithm of the AmoebaOptimizer ? e.g. for
> running multiple evaluations of the cost function
> simultaneously, one per thread ?

No, I will have multiple instances of my cost function, each working with a 
different dataset in each thread.

Thanks,
Matt




More information about the Insight-users mailing list