return NULL;
}
-/* returns number of equilibration-steps left with new read configuration
- or zero if no new configuration was read */
-void configcache::readConfig(bool& readnewconfig, int& nequileft, vector<unsigned long> *excludeFileHashes)
+void configcache::readConfig(bool *readnewconfig, int *nequileft, vector<unsigned long> *excludeFileHashes)
{
- readnewconfig = false;
+ *readnewconfig = false;
if(DATADIR == "" || MODE == CACHE_MODE_DISABLED) return;
int iDidVirtualSkips;
if( (!inFile.is_open()) && inFileIt == inFiles.end() ) {
- cout << "RETURNING..." << endl;
- nequileft = nequileft_internal;
+ if (*readnewconfig)
+ *nequileft = nequileft_internal;
return;
}
if( inFile.is_open() )
{
if (doVirtualEquilibration) {
- cout << nequileft_internal << endl;
-
if(log) *log << "CCACHE: Trying virtual equilibration." << endl << flush;
doVirtualEquilibration = false;
for (iDidVirtualSkips=0; iDidVirtualSkips < (NEQUI-openFileDesc.nequi)/openFileDesc.nskip; iDidVirtualSkips++) {
else if ( (NEQUI-openFileDesc.nequi) - (iDidVirtualSkips+1)*openFileDesc.nskip < nequileft_internal ) {
memcpy(configMem, tmpConfig, configSize);
nequileft_internal = NEQUI - openFileDesc.nequi - (iDidVirtualSkips+1)*openFileDesc.nskip;
- cout << "blabla:" << nequileft_internal << endl;
- readnewconfig = true;
+ *readnewconfig = true;
firstUsedConfig = false;
}
}
if( readFullBlock(tmpConfig, configSize) == configSize && inFile.is_open() )
{
memcpy(configMem, tmpConfig, configSize);
- readnewconfig = true;
+ *readnewconfig = true;
if (firstUsedConfig) {
firstUsedConfig = false;
if (openFileDesc.nequi < NEQUI)
nequileft_internal = NEQUI - openFileDesc.nequi;
}
nequileft_internal -= openFileDesc.nskip;
- cout << "sadasd:" << nequileft_internal << endl;
- nequileft = nequileft_internal;
+ *nequileft = nequileft_internal;
return;
}
else {