pass shuffle flag in the constructor

This commit is contained in:
Tomasz Sobczyk
2020-10-23 22:19:50 +02:00
committed by nodchip
parent 31f94a18b3
commit 8fb208598b
2 changed files with 5 additions and 14 deletions

View File

@@ -40,6 +40,7 @@ namespace Learner{
// Because it always the same integers on MinGW.
SfenReader(
const std::vector<std::string>& filenames_,
bool do_shuffle,
SfenReaderMode mode_,
int thread_num,
const std::string& seed
@@ -51,7 +52,7 @@ namespace Learner{
packed_sfens.resize(thread_num);
total_read = 0;
end_of_files = false;
shuffle = true;
shuffle = do_shuffle;
stop_flag = false;
file_worker_thread = std::thread([&] {
@@ -312,11 +313,6 @@ namespace Learner{
}
}
void set_do_shuffle(bool v)
{
shuffle = v;
}
protected:
// worker thread reading file in background