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

FuncMNpo.h

Go to the documentation of this file.
00001 #ifndef Impala_Core_Array_Pattern_FuncMNpo_h
00002 #define Impala_Core_Array_Pattern_FuncMNpo_h
00003 
00004 #include "Core/Array/Pattern/Categories.h"
00005 #include "Core/Array/Pattern/ArrayFunc.h"
00006 
00007 namespace Impala
00008 {
00009 namespace Core
00010 {
00011 namespace Array
00012 {
00013 namespace Pattern
00014 {
00015 
00016 
00017 template <class DstArrayT, class SrcArrayT, class MNpoT>
00018 void
00019 FuncM9N4po(DstArrayT* dst1, DstArrayT* dst2, DstArrayT* dst3, DstArrayT* dst4,
00020            SrcArrayT* src1, SrcArrayT* src2, SrcArrayT* src3, SrcArrayT* src4,
00021            SrcArrayT* src5, SrcArrayT* src6, SrcArrayT* src7, SrcArrayT* src8,
00022            SrcArrayT* src9, MNpoT& mnpo)
00023 {
00024     typedef typename DstArrayT::StorType DstStorT;
00025     typedef typename DstArrayT::ArithType DstArithT;
00026     typedef typename SrcArrayT::StorType SrcStorT;
00027     typedef typename SrcArrayT::ArithType SrcArithT;
00028 
00029     int width = ArrayCW(dst1);
00030     int height = ArrayCH(dst1);
00031     for (int y=0 ; y<height ; y++)
00032     {
00033         SrcStorT* s1Ptr = ArrayCPB(src1, 0, y);
00034         SrcStorT* s2Ptr = ArrayCPB(src2, 0, y);
00035         SrcStorT* s3Ptr = ArrayCPB(src3, 0, y);
00036         SrcStorT* s4Ptr = ArrayCPB(src4, 0, y);
00037         SrcStorT* s5Ptr = ArrayCPB(src5, 0, y);
00038         SrcStorT* s6Ptr = ArrayCPB(src6, 0, y);
00039         SrcStorT* s7Ptr = ArrayCPB(src7 , 0, y);
00040         SrcStorT* s8Ptr = ArrayCPB(src8, 0, y);
00041         SrcStorT* s9Ptr = ArrayCPB(src9, 0, y);
00042         DstStorT* d1Ptr = ArrayCPB(dst1, 0, y);
00043         DstStorT* d2Ptr = ArrayCPB(dst2, 0, y);
00044         DstStorT* d3Ptr = ArrayCPB(dst3, 0, y);
00045         DstStorT* d4Ptr = ArrayCPB(dst4, 0, y);
00046         for (int x=0 ; x<width ; x++)
00047         {
00048             mnpo.DoIt(d1Ptr, d2Ptr, d3Ptr, d4Ptr,
00049                       PtrRead(s1Ptr, SrcArithT()),
00050                       PtrRead(s2Ptr, SrcArithT()),
00051                       PtrRead(s3Ptr, SrcArithT()),
00052                       PtrRead(s4Ptr, SrcArithT()),
00053                       PtrRead(s5Ptr, SrcArithT()),
00054                       PtrRead(s6Ptr, SrcArithT()),
00055                       PtrRead(s7Ptr, SrcArithT()),
00056                       PtrRead(s8Ptr, SrcArithT()),
00057                       PtrRead(s9Ptr, SrcArithT()));
00058             d1Ptr += DstArrayT::ElemSize();
00059             d2Ptr += DstArrayT::ElemSize();
00060             d3Ptr += DstArrayT::ElemSize();
00061             d4Ptr += DstArrayT::ElemSize();
00062             s1Ptr += SrcArrayT::ElemSize();
00063             s2Ptr += SrcArrayT::ElemSize();
00064             s3Ptr += SrcArrayT::ElemSize();
00065             s4Ptr += SrcArrayT::ElemSize();
00066             s5Ptr += SrcArrayT::ElemSize();
00067             s6Ptr += SrcArrayT::ElemSize();
00068             s7Ptr += SrcArrayT::ElemSize();
00069             s8Ptr += SrcArrayT::ElemSize();
00070             s9Ptr += SrcArrayT::ElemSize();
00071         }
00072     }
00073 }
00074 
00075 } // namespace Pattern
00076 } // namespace Array
00077 } // namespace Core
00078 } // namespace Impala
00079 
00080 #endif

Generated on Thu Jan 13 09:04:09 2011 for ImpalaSrc by  doxygen 1.5.1