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

template<class ArrayT, class ReduceT>
ArrayT::ArithType Impala::Core::Array::Pattern::PatReduceOp ( ArrayT *  src,
ReduceT &  pixOp 
) [inline]

Definition at line 24 of file PatReduceOp.h.

References FuncInOutDispatch(), Impala::Core::Array::PAR_PART, PX_MPI, PxArrayForceNonDistributed(), PxArrayPD(), PxArrayPreStateTrans(), PxReduceValueToAll(), PxRunLazyParallel(), PxRunParallel(), Impala::Core::Array::Trait::ReduceAdaptor< ReduceOpT >::Result(), and STRONG.

Referenced by Impala::Core::Array::PixMax(), Impala::Core::Array::PixMin(), and Impala::Core::Array::PixSum().

00025 {
00026     Trait::ReduceAdaptor<ReduceT> redOp;
00027     typedef typename ArrayT::ArithType ArithT;
00028     ArithT total;
00029 
00030 #ifdef PX_HORUS_USED
00031     if (!PxRunParallel()) {                         // run sequential
00032 #endif
00033         FuncInOutDispatch(src, redOp);
00034         total = redOp.Result();
00035 
00036 #ifdef PX_HORUS_USED
00037     } else {                                        // run parallel
00038         PxArrayPreStateTrans(src, PAR_PART, STRONG);
00039         FuncInOutDispatch(PxArrayPD(src), redOp);
00040         total = redOp.Result();
00041         total = PxReduceValueToAll(total, pixOp, PX_MPI);
00042 
00043         if (!PxRunLazyParallel()) {
00044             PxArrayForceNonDistributed(src);
00045         }
00046     }
00047 #endif
00048 
00049     return total;
00050 }

Here is the call graph for this function:


Generated on Fri Mar 19 11:02:20 2010 for ImpalaSrc by  doxygen 1.5.1