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

Copy.h

Go to the documentation of this file.
00001 #ifndef Impala_Core_Column_Copy_h
00002 #define Impala_Core_Column_Copy_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 Copy(C1* dst, C2* src, int nrElem, int dstStart, int srcStart)
00018 {
00019     ILOG_VAR(Impala.Core.Column.Copy);
00020     if (srcStart + nrElem > src->Capacity())
00021     {
00022         ILOG_ERROR("Incompatible src range");
00023         return;
00024     }
00025     if (dstStart + nrElem > dst->Capacity())
00026     {
00027         ILOG_ERROR("Incompatible dst range");
00028         return;
00029     }
00030 
00031     for (int i=0 ; i<nrElem ; i++)
00032         dst->Set(dstStart + i, src->Get(srcStart + i));
00033 }
00034 
00035 inline void
00036 Copy(InvalidColumn* dst, InvalidColumn* src, int nrElem, int dstStart,
00037      int srcStart)
00038 {
00039     // ignore
00040 }
00041 
00042 template <class C2>
00043 inline void
00044 Copy(InvalidColumn* dst, C2* src, int nrElem, int dstStart, int srcStart)
00045 {
00046     // ignore
00047 }
00048 
00049 template <class C1>
00050 inline void
00051 Copy(C1* dst, InvalidColumn* src, int nrElem, int dstStart, int srcStart)
00052 {
00053     // ignore
00054 }
00055 
00056 template <class C1, class C2>
00057 inline void
00058 Copy(C1* dst, C2* src, int nrElem)
00059 {
00060     Copy(dst, src, nrElem,0 ,0);
00061 }
00062 
00063 
00064 } // namespace Column
00065 } // namespace Core
00066 } // namespace Impala
00067 
00068 #endif

Generated on Thu Jan 13 09:04:22 2011 for ImpalaSrc by  doxygen 1.5.1