mirror of
https://github.com/data61/MP-SPDZ.git
synced 2026-01-10 05:57:57 -05:00
Decision tree training.
This commit is contained in:
@@ -67,6 +67,14 @@ void BaseMachine::load_schedule(const string& progname, bool load_bytecode)
|
||||
string threadname;
|
||||
for (int i=0; i<nprogs; i++)
|
||||
{ inpf >> threadname;
|
||||
size_t split = threadname.find(":");
|
||||
long expected = -1;
|
||||
if (split != string::npos)
|
||||
{
|
||||
expected = atoi(threadname.substr(split + 1).c_str());
|
||||
threadname = threadname.substr(0, split);
|
||||
}
|
||||
|
||||
string filename = "Programs/Bytecode/" + threadname + ".bc";
|
||||
bc_filenames.push_back(filename);
|
||||
if (load_bytecode)
|
||||
@@ -74,8 +82,11 @@ void BaseMachine::load_schedule(const string& progname, bool load_bytecode)
|
||||
#ifdef DEBUG_FILES
|
||||
cerr << "Loading program " << i << " from " << filename << endl;
|
||||
#endif
|
||||
load_program(threadname, filename);
|
||||
long size = load_program(threadname, filename);
|
||||
if (expected >= 0 and expected != size)
|
||||
throw runtime_error("broken bytecode file");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
for (auto i : {1, 0, 0})
|
||||
@@ -99,7 +110,8 @@ void BaseMachine::print_compiler()
|
||||
cerr << "Compiler: " << compiler << endl;
|
||||
}
|
||||
|
||||
void BaseMachine::load_program(const string& threadname, const string& filename)
|
||||
size_t BaseMachine::load_program(const string& threadname,
|
||||
const string& filename)
|
||||
{
|
||||
(void)threadname;
|
||||
(void)filename;
|
||||
|
||||
Reference in New Issue
Block a user