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

template<class C1, class C2>
int Impala::Core::Column::Select ( C1 *  dst,
C2 *  src,
bool *  filter,
int  dstStart,
int  srcStart,
int  srcSize 
) [inline]

Select elements from src based on filter by copying them to dst as long as there is room in dst.

If (filter != 0) its number of elements is at least srcSize. The function returns the number of elements copied to dst.

Definition at line 21 of file Select.h.

00022 {
00023     int nr = 0;
00024     for (int i=srcStart ; i<srcSize ; i++)
00025     {
00026         if (!filter || filter[i])
00027         {
00028             dst->Set(dstStart + nr++, src->Get(i));
00029             if (dstStart + nr >= dst->Capacity())
00030                 return nr;
00031         }
00032     }
00033     return nr;
00034 }


Generated on Fri Mar 19 11:06:32 2010 for ImpalaSrc by  doxygen 1.5.1