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

AddAssign.h

Go to the documentation of this file.
00001 #ifndef Impala_Core_Column_AddAssign_h
00002 #define Impala_Core_Column_AddAssign_h
00003 
00004 #include <iostream>
00005 #include "Core/Column/InvalidColumn.h"
00006 
00007 namespace Impala
00008 {
00009 namespace Core
00010 {
00011 namespace Column
00012 {
00013 
00014 
00015 template <class C1, class C2>
00016 inline void
00017 AddAssign(C1* dst, C2* src, int start, int end)
00018 {
00019     if (end == -1)
00020         end = dst->Capacity();
00021     if (end > src->Capacity())
00022     {
00023         std::cout << "Column::AddAssign: incompatible src range" << std::endl;
00024         return;
00025     }
00026     if (end > dst->Capacity())
00027     {
00028         std::cout << "Column::AddAssign: incompatible dst range" << std::endl;
00029         return;
00030     }
00031     for (int i=start ; i<end ; i++)
00032         dst->Set(i, dst->Get(i) + src->Get(i));
00033 }
00034 
00035 inline void
00036 AddAssign(InvalidColumn* dst, InvalidColumn* src, int start, int end)
00037 {
00038     // ignore
00039 }
00040 
00041 template <class C2>
00042 inline void
00043 AddAssign(InvalidColumn* dst, C2* src, int start, int end)
00044 {
00045     // ignore
00046 }
00047 
00048 template <class C1>
00049 inline void
00050 AddAssign(C1* dst, InvalidColumn* src, int start, int end)
00051 {
00052     // ignore
00053 }
00054 
00055 } // namespace Column
00056 } // namespace Core
00057 } // namespace Impala
00058 
00059 #endif

Generated on Fri Mar 19 09:31:03 2010 for ImpalaSrc by  doxygen 1.5.1