Definition at line 167 of file mainVidSet.cpp. References Impala::Core::Table::TableTem< Col1T, Col2T, Col3T, Col4T, Col5T, Col6T, Col7T, Col8T, Col9T >::Add(), Impala::CmdOptions::GetInstance(), Impala::CmdOptions::GetInt(), and Impala::Core::Database::RawDataSet::NrFiles(). Referenced by MakeVideoTaskTable(). 00168 { 00169 CmdOptions& options = CmdOptions::GetInstance(); 00170 int startFile = options.GetInt("startFile"); 00171 int numberFiles = options.GetInt("numberFiles"); 00172 int startFrame = options.GetInt("startFrame"); 00173 int numProcs = Link::Mpi::NrProcs(); 00174 if (numberFiles == -1) 00175 numberFiles = videoSet->NrFiles(); 00176 if (startFile + numberFiles >= videoSet->NrFiles()) 00177 numberFiles = videoSet->NrFiles() - startFile; 00178 int lastFile = startFile + numberFiles; 00179 int taskSize = numberFiles / numProcs; 00180 int restSize = numberFiles % numProcs; 00181 int curFile = startFile; 00182 TaskTable* taskTable = new TaskTable(); 00183 for (int i=0 ; i<numProcs ; i++) 00184 { 00185 startFile = curFile; 00186 numberFiles = taskSize; 00187 if (--restSize >= 0) 00188 numberFiles++; 00189 if (startFile + numberFiles > lastFile) 00190 numberFiles = lastFile - startFile; 00191 curFile += numberFiles; 00192 taskTable->Add(startFile, numberFiles, startFrame); 00193 } 00194 return taskTable; 00195 }
Here is the call graph for this function:
|