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

BpoNorm2Sqr.h

Go to the documentation of this file.
00001 #ifndef Impala_Core_Array_Trait_BpoNorm2Sqr_h
00002 #define Impala_Core_Array_Trait_BpoNorm2Sqr_h
00003 
00004 #include "Core/Array/Pattern/Categories.h"
00005 #include "Core/Array/Element/E1Cast.h"
00006 
00007 namespace Impala
00008 {
00009 namespace Core
00010 {
00011 namespace Array
00012 {
00013 namespace Trait
00014 {
00015 
00016 
00019 template<class DstArrayT, class Src1ArrayT, class Src2ArrayT>
00020 class BpoNorm2Sqr
00021 {
00022 public:
00024     typedef Pattern::TagTransInVar TransVarianceCategory;
00025 
00027     typedef Pattern::TagCallValue CallCategory;
00028 
00029     typedef typename DstArrayT::ArithType DstArithT;
00030     typedef typename Src1ArrayT::ArithType Src1ArithT;
00031     typedef typename Src2ArrayT::ArithType Src2ArithT;
00032 
00034     BpoNorm2Sqr()
00035     {
00036     }
00037 
00039     DstArithT
00040     DoIt(const Src1ArithT& x, const Src2ArithT& y)
00041     {
00042         return Element::E1Cast(x*x + y*y, DstArithT());
00043     }
00044 };
00045 
00046 } // namespace Trait
00047 } // namespace Array
00048 } // namespace Core
00049 } // namespace Impala
00050 
00051 #endif

Generated on Fri Mar 19 09:30:55 2010 for ImpalaSrc by  doxygen 1.5.1