Skip to content

Commit

Permalink
Merge pull request #90 from KhiopsML/73-bug-descriptives-stats-on-hug…
Browse files Browse the repository at this point in the history
…e-dataset-400-gb

Fix bug for descriptive stats with huge dataset (400 Gb)
  • Loading branch information
marcboulle authored Oct 9, 2023
2 parents ebcd607 + 49aaec1 commit 92fabda
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 1,947 deletions.
1,568 changes: 0 additions & 1,568 deletions src/Learning/KWDRRuleLibrary/KWDRTokenCounts.cpp

This file was deleted.

334 changes: 0 additions & 334 deletions src/Learning/KWDRRuleLibrary/KWDRTokenCounts.h

This file was deleted.

5 changes: 2 additions & 3 deletions src/Learning/KWData/KWCDUniqueString.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,8 @@ KWCDUniqueStringDataPtr KWCDUniqueStringDictionary::AsUniqueString(const ALStrin
pvUniqueStringDatas.SetAt(nHashPosition, pUniqueStringData);

// Retaillage dynamique
assert(GetHashTableSize() < INT_MAX / sizeof(void*));
if (GetCount() > GetHashTableSize() / 2)
ReinitHashTable(DictionaryGetNextTableSize(2 * GetHashTableSize()));
if (GetCount() > GetHashTableSize() / 2 and GetHashTableSize() < INT_MAX)
ReinitHashTable(DictionaryGetNextTableSize(2 * min(GetHashTableSize(), INT_MAX / 2)));
}
return pUniqueStringData;
}
Expand Down
7 changes: 3 additions & 4 deletions src/Learning/KWData/KWSymbol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ void KWSymbolDictionary::ReinitHashTable(int nNewHashSize)
// Affichage du debut de la methode
if (bDisplay)
{
cout << "ReinitHashTable (" << GetCount() << "," << GetHashTableSize() << ")";
cout << "Symbol ReinitHashTable (" << GetCount() << "," << GetHashTableSize() << ")";
cout << " -> " << nNewHashSize << ": " << flush;
timer.Start();
}
Expand Down Expand Up @@ -769,9 +769,8 @@ KWSymbolDataPtr KWSymbolDictionary::AsSymbol(const char* key, int nLength)
pvSymbolDatas.SetAt(nHashPosition, pSymbolData);

// Retaillage dynamique
assert(GetHashTableSize() < INT_MAX / sizeof(void*));
if (GetCount() > GetHashTableSize() / 2)
ReinitHashTable(DictionaryGetNextTableSize(2 * GetHashTableSize()));
if (GetCount() > GetHashTableSize() / 2 and GetHashTableSize() < INT_MAX)
ReinitHashTable(DictionaryGetNextTableSize(2 * min(GetHashTableSize(), INT_MAX / 2)));
}
return pSymbolData;
}
Expand Down
Loading

0 comments on commit 92fabda

Please sign in to comment.