template<class DstArrayT, class SrcArrayT, class KerArrayT, class PixOpT, class RedOpT>
Definition at line 27 of file PatGenConv2dSep.h. References ArrayCW(), Impala::Core::Array::CheckBorderSize(), FuncGenConv2dSepDispatch_H(), FuncGenConv2dSepDispatch_V(), Impala::Core::Array::PAR_PART, PatSetBorder(), PxArrayDeletePD(), PxArrayForceNonDistributed(), PxArrayPD(), PxArrayPostStateTrans(), PxArrayPreStateTrans(), PxRunLazyParallel(), PxRunParallel(), Impala::Util::TimePlot::SplitTime(), STRONG, and WEAK. Referenced by Impala::Core::Array::ConvKernelSeparated(), and Impala::Samples::Talk::DoTalkGenConv2dSep(). 00030 { 00031 if (vType == 6) // the default has not been implemented yet 00032 vType = 0; 00033 00034 int numX = ArrayCW(ker1) / 2; 00035 int numY = ArrayCW(ker2) / 2; 00036 SrcArrayT* checkedSrc = CheckBorderSize(src, numX, numY); 00037 00038 if ((dst == 0) || (dst == checkedSrc)) 00039 dst = ArrayClone<DstArrayT>(checkedSrc); 00040 00041 #ifdef PX_HORUS_USED 00042 if (!PxRunParallel()) { // run sequential 00043 #endif 00044 if (plotter) 00045 plotter->SplitTime(); 00046 if ((vType == 0) || (vType == 1) || (vType == 2)) 00047 { 00048 PatSetBorder(checkedSrc, numX, 0); 00049 if (plotter) 00050 plotter->SplitTime(); 00051 KerArrayT* scratch = ArrayClone<KerArrayT>(checkedSrc); 00052 if (plotter) 00053 plotter->SplitTime(); 00054 FuncGenConv2dSepDispatch_H(scratch, checkedSrc, 00055 ker1, pixOp, redOp, vType); 00056 if (plotter) 00057 plotter->SplitTime(); 00058 PatSetBorder(scratch, 0, numY); 00059 if (plotter) 00060 plotter->SplitTime(); 00061 FuncGenConv2dSepDispatch_V(dst, scratch, 00062 ker2, pixOp, redOp, vType); 00063 delete scratch; 00064 } 00065 else 00066 { 00067 PatSetBorder(checkedSrc, numX, numY); 00068 if (plotter) 00069 plotter->SplitTime(); 00070 if (plotter) 00071 plotter->SplitTime(); 00072 if (plotter) 00073 plotter->SplitTime(); 00074 if (plotter) 00075 plotter->SplitTime(); 00076 //FuncGenConv2dSepDispatch(dst, checkedSrc, ker1, 00077 // ker2, pixOp, redOp, vType); 00078 } 00079 00080 #ifdef PX_HORUS_USED 00081 } else { // run parallel 00082 PxArrayPreStateTrans(checkedSrc, PAR_PART, STRONG); 00083 PxArrayPreStateTrans(dst, PAR_PART, WEAK); 00084 if ((vType == 0) || (vType == 1) || (vType == 2)) { 00085 PatSetBorder(PxArrayPD(checkedSrc), numX, 0); 00086 KerArrayT* scratch = 00087 ArrayClone<KerArrayT>(PxArrayPD(checkedSrc)); 00088 FuncGenConv2dSepDispatch_H(scratch, PxArrayPD(checkedSrc), 00089 ker1, pixOp, redOp, vType); 00090 PatSetBorder(scratch, 0, numY); 00091 FuncGenConv2dSepDispatch_V(PxArrayPD(dst), scratch, 00092 ker2, pixOp, redOp, vType); 00093 delete scratch; 00094 } else { 00095 PatSetBorder(PxArrayPD(checkedSrc), numX, numY); 00096 //FuncGenConv2dSepDispatch(PxArrayPD(dst), 00097 // PxArrayPD(checkedSrc), ker1, 00098 // ker2, pixOp, redOp, vType); 00099 } 00100 if (PxArrayPD(checkedSrc) != PxArrayPD(src)) 00101 PxArrayDeletePD(checkedSrc); 00102 PxArrayPostStateTrans(dst); 00103 00104 if (!PxRunLazyParallel()) { 00105 PxArrayForceNonDistributed(src); 00106 PxArrayForceNonDistributed(dst); 00107 } 00108 } 00109 #endif 00110 00111 if (checkedSrc != src) 00112 delete checkedSrc; 00113 }
Here is the call graph for this function:
|