+ /* storing most equilibrated config */
+ if ( nequileft < mostEquilibratedConfig.first && readAtLeastOneConfig ) {
+ *log << "HYPERCACHE: Storing a copy of so far most equilibrated config with nequileft = " << nequileft << endl << flush;
+ mostEquilibratedConfig.first = nequileft;
+ memcpy(mostEquilibratedConfig.second, C->getConfigMem(), C->getConfigSize());
+ }
+
+
+ /* injecting back most equilibrated config if nothing could be used anymore */
+ if ( nequileft > 0 && mostEquilibratedConfig.first < nequileft ) {
+ *log << "HYPERCACHE: Injecting back most equilibrated stored config with nequileft = " << mostEquilibratedConfig.first << endl << flush;
+ nequileft = mostEquilibratedConfig.first;
+ memcpy(C->getConfigMem(), mostEquilibratedConfig.second, C->getConfigSize());
+ readAtLeastOneConfig = false;
+ }
+