Use COVER_MEMMULT when training with COVER.
This commit is contained in:
parent
56958500fc
commit
c220d4c74d
@ -235,7 +235,8 @@ int DiB_trainFromFiles(const char* dictFileName, unsigned maxDictSize,
|
|||||||
void* const dictBuffer = malloc(maxDictSize);
|
void* const dictBuffer = malloc(maxDictSize);
|
||||||
size_t* const fileSizes = (size_t*)malloc(nbFiles * sizeof(size_t));
|
size_t* const fileSizes = (size_t*)malloc(nbFiles * sizeof(size_t));
|
||||||
unsigned long long const totalSizeToLoad = DiB_getTotalCappedFileSize(fileNamesTable, nbFiles);
|
unsigned long long const totalSizeToLoad = DiB_getTotalCappedFileSize(fileNamesTable, nbFiles);
|
||||||
size_t const maxMem = DiB_findMaxMem(totalSizeToLoad * MEMMULT) / MEMMULT;
|
size_t const memMult = params ? MEMMULT : COVER_MEMMULT;
|
||||||
|
size_t const maxMem = DiB_findMaxMem(totalSizeToLoad * memMult) / memMult;
|
||||||
size_t benchedSize = (size_t) MIN ((unsigned long long)maxMem, totalSizeToLoad);
|
size_t benchedSize = (size_t) MIN ((unsigned long long)maxMem, totalSizeToLoad);
|
||||||
void* const srcBuffer = malloc(benchedSize+NOISELENGTH);
|
void* const srcBuffer = malloc(benchedSize+NOISELENGTH);
|
||||||
int result = 0;
|
int result = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user