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

template<class DstArrayT, class SrcArrayT>
void Impala::Core::Array::Pattern::FuncSet ( DstArrayT *  dst,
SrcArrayT *  src,
Int64  srcX,
Int64  srcY,
Int64  width,
Int64  height,
Int64  dstX,
Int64  dstY 
)

Sets (a region of) the core array, from src to dst.

The size of the region is width x height. In src it starts at (srcX,srcY). In dst it starts at (dstX,dstY).

Definition at line 45 of file FuncSet.h.

References ArrayCPB(), Impala::Core::Array::Element::E1Cast(), FuncSet_Row(), PtrRead(), and PtrWrite().

Referenced by PatSet(), and PxArrayPreStateTrans().

00047 {
00048     typedef typename DstArrayT::StorType DstStorT;
00049     typedef typename DstArrayT::ArithType DstArithT;
00050     typedef typename SrcArrayT::StorType SrcStorT;
00051     typedef typename SrcArrayT::ArithType SrcArithT;
00052 
00053     if (DstArrayT::ElemSize() == SrcArrayT::ElemSize())
00054     {
00055         for (Int64 y=0 ; y<height ; y++)
00056         {
00057             DstStorT* dPtr = ArrayCPB(dst, dstX, dstY + y);
00058             SrcStorT* sPtr = ArrayCPB(src, srcX, srcY + y);
00059             FuncSet_Row(dPtr, sPtr, width * SrcArrayT::ElemSize());
00060         }
00061     }
00062     else
00063     {
00064         for (Int64 y=0 ; y<height ; y++)
00065         {
00066             DstStorT* dPtr = ArrayCPB(dst, dstX, dstY + y);
00067             SrcStorT* sPtr = ArrayCPB(src, srcX, srcY + y);
00068             for (Int64 x=0 ; x<width ; x++)
00069             {
00070                 PtrWrite(dPtr, Element::E1Cast(PtrRead(sPtr, SrcArithT()),
00071                                                DstArithT()));
00072                 dPtr += DstArrayT::ElemSize();
00073                 sPtr += SrcArrayT::ElemSize();
00074             }
00075         }
00076     }
00077 }

Here is the call graph for this function:


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