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

virtual void Impala::Core::ImageSet::ComputeKernelData::HandleDoneDir ( ImageSet is,
int  dirId 
) [inline, virtual]

Completed given DB_DIR in a "normal" walk.

Reimplemented from Impala::Core::ImageSet::Listener.

Definition at line 147 of file ComputeKernelData.h.

References Impala::Core::Database::RawDataSet::GetFilePathPrecomputedKernels(), Impala::Core::Database::RawDataSet::GetSetName(), ILOG_INFO, mBaseSet, mKernelMatrixName, and mWalkType.

00148     {
00149         String kernelDataCacheFilename = is->GetFilePathKernelData(
00150                     mWalkType,
00151                     mBaseSet->GetSetName(),
00152                     mKernelMatrixName,
00153                     dirId, false, true);
00154         if(!kernelDataCacheFilename.empty())
00155         {
00156             ILOG_INFO("Skipping, KernelData already exists: " << 
00157                       kernelDataCacheFilename);
00158             return;
00159         }
00160 
00161         String storageFilename = is->GetFilePathKernelData(
00162                 mWalkType, 
00163                 mBaseSet->GetSetName(), 
00164                 mKernelMatrixName,
00165                 dirId, true, false);
00166 
00167         String inputDefinition = mBaseSet->GetFilePathPrecomputedKernels
00168             (mKernelMatrixName + ".input.txt", "", false, false);
00169 
00170         String averagesFilename = mBaseSet->GetFilePathPrecomputedKernels
00171             (mKernelMatrixName + ".averages.raw", "", false, false);
00172 
00173         // compute it
00174 #ifdef CUDA
00175         bool GPU = Link::Cuda::CudaUsed();
00176 #else
00177         bool GPU = false;
00178 #endif   
00179         int setting_slabWidth = 1024;
00180         PrecomputeTask* pt = new PrecomputeTask(inputDefinition, averagesFilename, storageFilename, is, mBaseSet, dirId);
00181         ILOG_INFO("GPU mode: " << GPU);
00182         if(GPU)
00183         {
00184             ComputeKernelMatrix<float, true>(pt, setting_slabWidth);
00185         }
00186         else
00187         {
00188 #ifdef CUDA
00189             // CUDA mode must be in float to make it compile, even for CPU
00190             ComputeKernelMatrix<float, false>(pt, setting_slabWidth);
00191 #else
00192             ComputeKernelMatrix<double, false>(pt, setting_slabWidth);
00193 #endif
00194         }
00195         delete pt;
00196     }

Here is the call graph for this function:


Generated on Fri Mar 19 11:14:10 2010 for ImpalaSrc by  doxygen 1.5.1