template<class DstArrayT, class SrcArrayT, class KerArrayT, class PixOpT, class RedOpT>
Definition at line 66 of file FuncGenConv2d.h. References ArrayCH(), ArrayCPB(), and ArrayCW(). 00068 { 00069 typedef typename DstArrayT::StorType DstStorT; 00070 typedef typename DstArrayT::ArithType DstArithT; 00071 typedef typename SrcArrayT::StorType SrcStorT; 00072 typedef typename SrcArrayT::ArithType SrcArithT; 00073 typedef typename KerArrayT::StorType KerStorT; 00074 typedef typename KerArrayT::ArithType KerArithT; 00075 00076 int imgWidth = ArrayCW(dst); 00077 int imgHeight = ArrayCH(dst); 00078 int kerWidth = ArrayCW(ker); 00079 int kerHeight = ArrayCH(ker); 00080 int kerBW = ArrayCW(ker) / 2; 00081 int kerBH = ArrayCH(ker) / 2; 00082 00083 DstStorT* temp = new DstStorT[DstArrayT::ElemSize()]; 00084 00085 for (int y=0 ; y<imgHeight ; y++) 00086 { 00087 DstStorT* dPtr = ArrayCPB(dst, 0, y); 00088 for (int x=0 ; x<imgWidth ; x++) 00089 { 00090 RedOpT::NeutralElement(dPtr); 00091 for (int j=0 ; j<kerHeight ; j++) 00092 { 00093 SrcStorT* sPtr = ArrayCPB(src, -kerBW + x, -kerBH + y + j); 00094 KerStorT* kPtr = ArrayCPB(ker, 0, j); 00095 for (int i=0 ; i<kerWidth ; i++) 00096 { 00097 pixOp.DoIt(temp, sPtr, kPtr); 00098 redOp.DoIt(dPtr, temp); 00099 sPtr += SrcArrayT::ElemSize(); 00100 kPtr += KerArrayT::ElemSize(); 00101 } 00102 } 00103 dPtr += DstArrayT::ElemSize(); 00104 } 00105 } 00106 00107 delete temp; 00108 }
Here is the call graph for this function:
|