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

DivAssign.h

Go to the documentation of this file.
00001 #ifndef Impala_Core_Vector_DivAssign_h
00002 #define Impala_Core_Vector_DivAssign_h
00003 
00004 #include "Core/Vector/VectorTem.h"
00005 
00006 namespace Impala
00007 {
00008 namespace Core
00009 {
00010 namespace Vector
00011 {
00012 
00013 
00014 template <class ElemT>
00015 inline void
00016 DivAssign(VectorTem<ElemT>& v1, VectorTem<ElemT> v2)
00017 {
00018     ElemT* p1 = v1.GetData();
00019     ElemT* p2 = v2.GetData();
00020     for (int i=0 ; i<v1.Size() ; i++)
00021         p1[i] /= p2[i];
00022 }
00023 
00024 template <class ElemT>
00025 inline void
00026 DivAssign(VectorTem<ElemT>& v, ElemT e)
00027 {
00028     ElemT* p = v.GetData();
00029     for (int i=0 ; i<v.Size() ; i++)
00030         p[i] /= e;
00031 }
00032 
00033 } // namespace Vector
00034 } // namespace Core
00035 } // namespace Impala
00036 
00037 #endif

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