Fix a bug in conversion functions for heterogeneous model
This commit is contained in:
parent
3196ba2bcf
commit
aa9c01568b
3 changed files with 5 additions and 8 deletions
|
|
@ -29,7 +29,7 @@ Contact: paradiseo-help@lists.gforge.inria.fr
|
|||
|
||||
template<template <class> class EOAlgo, class EOT, class bEOT>
|
||||
template<class... Args>
|
||||
paradiseo::smp::Island<EOAlgo,EOT,bEOT>::Island(std::function<EOT&&(bEOT&)> _convertFromBase, std::function<bEOT&&(EOT&)> _convertToBase, eoPop<EOT>& _pop, IntPolicy<EOT>& _intPolicy, MigPolicy<EOT>& _migPolicy, Args&... args) :
|
||||
paradiseo::smp::Island<EOAlgo,EOT,bEOT>::Island(std::function<EOT(bEOT&)> _convertFromBase, std::function<bEOT(EOT&)> _convertToBase, eoPop<EOT>& _pop, IntPolicy<EOT>& _intPolicy, MigPolicy<EOT>& _migPolicy, Args&... args) :
|
||||
// The PPExpander looks for the continuator in the parameters pack.
|
||||
// The private inheritance of ContWrapper wraps the continuator and add islandNotifier.
|
||||
ContWrapper<EOT, bEOT>(Loop<Args...>().template findValue<eoContinue<EOT>>(args...), this),
|
||||
|
|
@ -54,8 +54,8 @@ template<class... Args>
|
|||
paradiseo::smp::Island<EOAlgo,EOT,bEOT>::Island(eoPop<EOT>& _pop, IntPolicy<EOT>& _intPolicy, MigPolicy<EOT>& _migPolicy, Args&... args) :
|
||||
Island(
|
||||
// Default conversion functions for homogeneous islands
|
||||
[](bEOT& i) -> EOT&& { return std::forward<EOT>(i); },
|
||||
[](EOT& i) -> bEOT&& { return std::forward<bEOT>(i); },
|
||||
[](bEOT& i) -> EOT { return std::forward<EOT>(i); },
|
||||
[](EOT& i) -> bEOT { return std::forward<bEOT>(i); },
|
||||
_pop, _intPolicy, _migPolicy, args...)
|
||||
{ }
|
||||
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ public:
|
|||
* @param args Parameters to construct the algorithm.
|
||||
*/
|
||||
template<class... Args>
|
||||
Island(std::function<EOT&&(bEOT&)> _convertFromBase, std::function<bEOT&&(EOT&)> _convertToBase, eoPop<EOT>& pop, IntPolicy<EOT>& _intPolicy, MigPolicy<EOT>& _migPolicy, Args&... args);
|
||||
Island(std::function<EOT(bEOT&)> _convertFromBase, std::function<bEOT(EOT&)> _convertToBase, eoPop<EOT>& pop, IntPolicy<EOT>& _intPolicy, MigPolicy<EOT>& _migPolicy, Args&... args);
|
||||
/**
|
||||
* Constructor
|
||||
* @param _popSize Size of the algorithm population.
|
||||
|
|
|
|||
|
|
@ -94,9 +94,6 @@ void paradiseo::smp::IslandModel<EOT>::operator()()
|
|||
for(auto& thread : threads)
|
||||
thread.join();
|
||||
|
||||
// Send last population
|
||||
while(!listEmigrants.empty())
|
||||
send();
|
||||
|
||||
// Wait the end of messages sending
|
||||
for(auto& message : sentMessages)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue