index bc0ab3e88bf95f959859ca6b7aa3fcdc6a26fe1b..43810a9773809e475188ee93ed2d1fcc6c2c7c72 100644 (file)
using std::ostream;
using std::vector;
+
+// Create an Executor with the specified type and number of EOs
+Executor* CreateExecutor(DeviceType dt, int num, const Configuration& c,
+ int layer_group_id)
+{
+ if (num == 0) return nullptr;
+
+ DeviceIds ids;
+ for (int i = 0; i < num; i++)
+ ids.insert(static_cast<DeviceId>(i));
+
+ return new Executor(dt, ids, c, layer_group_id);
+}
static bool read_frame_helper(char* ptr, size_t size, istream& input_file);
bool ReadFrame(ExecutionObject* eo,