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

UpoMulVal.h

Go to the documentation of this file.
00001 #ifndef Impala_Core_Array_Trait_UpoMulVal_h
00002 #define Impala_Core_Array_Trait_UpoMulVal_h
00003 
00004 #include "Core/Array/Pattern/Categories.h"
00005 
00006 namespace Impala
00007 {
00008 namespace Core
00009 {
00010 namespace Array
00011 {
00012 namespace Trait
00013 {
00014 
00015 
00016 template<class DstArrayT, class SrcArrayT>
00017 class UpoMulVal
00018 {
00019 public:
00021     typedef Pattern::TagTransInVar TransVarianceCategory;
00022 
00024     typedef Pattern::TagCallValue CallCategory;
00025 
00026     typedef typename DstArrayT::ArithType DstArithT;
00027     typedef typename SrcArrayT::ArithType SrcArithT;
00028 
00029     UpoMulVal(SrcArithT val)
00030     {
00031         mVal = val;
00032     }
00033 
00034     DstArithT
00035     DoIt(const SrcArithT& x)
00036     {
00037         return x * mVal;
00038     }
00039 
00040 private:
00041     SrcArithT         mVal;
00042 };
00043 
00044 } // namespace Trait
00045 } // namespace Array
00046 } // namespace Core
00047 } // namespace Impala
00048 
00049 #endif

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