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

void Impala::Application::IDo::PrecomputeExec ( CString  kernel  )  [inline]

Definition at line 1064 of file mainIDo.cpp.

References ComputeAverages(), Exec(), ILOG_ERROR, Impala::MakeString(), mAnnoSetTest, mCuda, mCudaDevice, mFeatureIndexCat, mModel, mPrecomputeIncrement, mPrecomputeRuns, mSetName, and Impala::StringStartsWith().

Referenced by HandleCmd(), PrecomputeAllSift(), PrecomputeAllSurf(), PrecomputeWG(), and PrecomputeWGclus960sp().

01065     {
01066         if (mModel.empty())
01067         {
01068             ILOG_ERROR("PrecomputeExec: need model");
01069             return;
01070         }
01071         bool isHik = StringStartsWith(mModel, "hik");
01072         String iniFile = "${IMPALAROOT}/src/script/" + kernel + ".ini";
01073         String cat("");
01074         if (! mFeatureIndexCat.empty())
01075             cat = " --featureIndexCat " + mFeatureIndexCat + " ";
01076 
01077         if (mCuda)
01078         {
01079             if (!isHik)
01080                 ComputeAverages(iniFile, cat);
01081             Exec("precomputecuda", mSetName + " " + mModel + " " + kernel + cat
01082                  + " --ini " + iniFile + " --cudaDevice "
01083                  + MakeString(mCudaDevice), 1);
01084             return;
01085         }
01086 
01087         String func = (isHik) ? " --distanceFunction histogramintersection "
01088                               : "";
01089         // At this moment, annoTestSet is used for testing purposes only.
01090         String annoSet = (mAnnoSetTest.empty()) ? "nil" : mAnnoSetTest;
01091         String cmd = mSetName + " " + annoSet + " " + mModel + " " + kernel
01092             + cat + func + " --ini " + iniFile;
01093         if (mPrecomputeIncrement == 0)
01094         {
01095             Exec("precompute", cmd);
01096         }
01097         else
01098         {
01099             int start = 0;
01100             for (int i=0 ; i<mPrecomputeRuns ; i++)
01101             {
01102                 Exec("precompute", cmd + " --startFeature " + MakeString(start)
01103                      + " --numberFeatures " + MakeString(mPrecomputeIncrement));
01104                 start += mPrecomputeIncrement;
01105             }
01106         }
01107     }

Here is the call graph for this function:


Generated on Thu Jan 13 09:14:23 2011 for ImpalaSrc by  doxygen 1.5.1