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

template<class DstArrayT, class SrcArrayT, class MpoT>
void Impala::Core::Array::Pattern::FuncMpo ( DstArrayT *  dst,
std::vector< SrcArrayT * >  srcList,
MpoT &  mpo 
)

Definition at line 18 of file FuncMpo.h.

References ArrayCH(), ArrayCPB(), ArrayCW(), PtrRead(), and PtrWrite().

Referenced by PatMPixOp().

00019 {
00020     typedef typename DstArrayT::StorType DstStorT;
00021     typedef typename DstArrayT::ArithType DstArithT;
00022     typedef typename SrcArrayT::StorType SrcStorT;
00023     typedef typename SrcArrayT::ArithType SrcArithT;
00024 
00025     int width = ArrayCW(dst);
00026     int height = ArrayCH(dst);
00027     int length = srcList.size();
00028     for (int y=0 ; y<height ; y++)
00029     {
00030         std::vector<SrcStorT*> srcPtrList;
00031         srcPtrList.resize(length);
00032         for(int i=0 ; i<length ; ++i)
00033             srcPtrList[i] = ArrayCPB(srcList[i], 0, y);
00034         DstStorT* dPtr = ArrayCPB(dst, 0, y);
00035         for (int x=0 ; x<width ; x++)
00036         {
00037             std::vector<SrcStorT> valueList;
00038             valueList.resize(length);
00039             for(int i=0 ; i<length ; ++i)
00040                 valueList[i] = PtrRead(srcPtrList[i], SrcArithT());
00041             PtrWrite(dPtr, mpo.DoIt(valueList));
00042             dPtr += DstArrayT::ElemSize();
00043             for(int i=0 ; i<length ; ++i)
00044                 srcPtrList[i] += SrcArrayT::ElemSize();
00045         }
00046     }
00047 }

Here is the call graph for this function:


Generated on Fri Mar 19 11:01:21 2010 for ImpalaSrc by  doxygen 1.5.1