00001 #ifndef Impala_Core_Column_DivAssign_h
00002 #define Impala_Core_Column_DivAssign_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 C>
00016 inline void
00017 DivAssign(C* col, typename C::ColElemType val, int start, int end)
00018 {
00019 ILOG_VAR(Impala.Core.Column.DivAssign);
00020 if (end == -1)
00021 end = col->Capacity();
00022 if (end > col->Capacity())
00023 {
00024 ILOG_ERROR("Incompatible range");
00025 return;
00026 }
00027 for (int i=start ; i<end ; i++)
00028 col->Set(i, col->Get(i) / val);
00029 }
00030
00031 inline void
00032 DivAssign(InvalidColumn* col, InvalidColumn::ColElemType val, int start, int end)
00033 {
00034
00035 }
00036
00037 }
00038 }
00039 }
00040
00041 #endif