Home || Architecture || Video Search || Visual Search || Scripts || Applications || 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     if (srcStart + nrElem > src->Capacity())
00020     {
00021         std::cout << "Column::Copy: incompatible src range" << std::endl;
00022         return;
00023     }
00024     if (dstStart + nrElem > dst->Capacity())
00025     {
00026         std::cout << "Column::Copy: incompatible dst range" << std::endl;
00027         return;
00028     }
00029 
00030     for (int i=0 ; i<nrElem ; i++)
00031         dst->Set(dstStart + i, src->Get(srcStart + i));
00032 }
00033 
00034 inline void
00035 Copy(InvalidColumn* dst, InvalidColumn* src, int nrElem, int dstStart, int srcStart)
00036 {
00037     // ignore
00038 }
00039 
00040 template <class C2>
00041 inline void
00042 Copy(InvalidColumn* dst, C2* src, int nrElem, int dstStart, int srcStart)
00043 {
00044     // ignore
00045 }
00046 
00047 template <class C1>
00048 inline void
00049 Copy(C1* dst, InvalidColumn* src, int nrElem, int dstStart, int srcStart)
00050 {
00051     // ignore
00052 }
00053 
00054 template <class C1, class C2>
00055 inline void
00056 Copy(C1* dst, C2* src, int nrElem)
00057 {
00058     Copy(dst, src, nrElem,0 ,0);
00059 }
00060 
00061 
00062 } // namespace Column
00063 } // namespace Core
00064 } // namespace Impala
00065 
00066 #endif

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