Home || Visual Search || Applications || Architecture || Important Messages || OGL || Src

TaskTable* Impala::Application::VidSet::MakeVideoTaskTableByVideo ( VideoSet *  videoSet,
Walker *  walker 
)

Definition at line 180 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().

00181 {
00182     CmdOptions& options = CmdOptions::GetInstance();
00183     int startFile = options.GetInt("startFile");
00184     int numberFiles = options.GetInt("numberFiles");
00185     int startFrame = options.GetInt("startFrame");
00186     int numProcs = Link::Mpi::NrProcs();
00187     if (numberFiles == -1)
00188         numberFiles = videoSet->NrFiles();
00189     if (startFile + numberFiles >= videoSet->NrFiles())
00190         numberFiles = videoSet->NrFiles() - startFile;
00191     int lastFile = startFile + numberFiles;
00192     int taskSize = numberFiles / numProcs;
00193     int restSize = numberFiles % numProcs;
00194     int curFile = startFile;
00195     TaskTable* taskTable = new TaskTable();
00196     for (int i=0 ; i<numProcs ; i++)
00197     {
00198         startFile = curFile;
00199         numberFiles = taskSize;
00200         if (--restSize >= 0)
00201             numberFiles++;
00202         if (startFile + numberFiles > lastFile)
00203             numberFiles = lastFile - startFile;
00204         curFile += numberFiles;
00205         taskTable->Add(startFile, numberFiles, startFrame);
00206     }
00207     return taskTable;
00208 }

Here is the call graph for this function:


Generated on Thu Jan 13 09:16:56 2011 for ImpalaSrc by  doxygen 1.5.1