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

Feature::FeatureTable* Impala::Application::GetPartial ( Feature::FeatureTable *  f,
int  partnumber,
int  partcount 
)

Split table in subtables depending on this nodes id and the number of nodes if partcount == 1 the the full table is returned.

Todo:
find better name

Definition at line 279 of file mainPrecomputeKernelMatrix.cpp.

References Impala::Core::Feature::FeatureTable::GetFeatureDefinition(), Impala::Core::Feature::FeatureTable::GetFeatureVectorLength(), ILOG_VAR, Impala::Core::Table::Select(), and Impala::Core::Table::Table::Size().

Referenced by ComputeMatrix().

00281 {
00282     ILOG_VAR(Application.mainPrecomputeKernelMatrix.GetPartial);
00283     Feature::FeatureTable* part = 
00284         new Feature::FeatureTable(f->GetFeatureDefinition(),0,
00285                                   f->GetFeatureVectorLength());
00286     int s = f->Size();
00287     Matrix::DistributedAccess::IndexConverter indexConvert(f->Size(), partcount);
00288     int from = indexConvert.PartToIndex(partnumber);
00289     int to   = indexConvert.PartToIndex(partnumber + 1);
00290     //int from = ceil((s*partnumber)/(double)partcount);
00291     //int to = ceil((s*(partnumber+1))/(double)partcount);
00292     Table::Select(part, f, from, to, true);
00293     return part;
00294 }

Here is the call graph for this function:


Generated on Fri Mar 19 10:36:32 2010 for ImpalaSrc by  doxygen 1.5.1