Permalink
Browse files

Use COVER_MEMMULT when training with COVER.

  • Loading branch information...
1 parent 5695850 commit c220d4c74daf105b8425b3c7bfee4910f7286b8e @terrelln terrelln committed Jan 10, 2017
Showing with 2 additions and 1 deletion.
  1. +2 −1 programs/dibio.c
View
@@ -235,7 +235,8 @@ int DiB_trainFromFiles(const char* dictFileName, unsigned maxDictSize,
void* const dictBuffer = malloc(maxDictSize);
size_t* const fileSizes = (size_t*)malloc(nbFiles * sizeof(size_t));
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);
void* const srcBuffer = malloc(benchedSize+NOISELENGTH);
int result = 0;

0 comments on commit c220d4c

Please sign in to comment.