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

PatBinaryPixOp.h

Go to the documentation of this file.
00001 #ifndef Impala_Core_Array_Pattern_PatBinaryPixOp_h
00002 #define Impala_Core_Array_Pattern_PatBinaryPixOp_h
00003 
00004 #include "Core/Array/Pattern/FuncBpo.h"
00005 
00006 #ifdef PX_HORUS_USED
00007 #include "Core/Array/Pattern/PxArrayFunc.h"
00008 #include "Core/Array/Pattern/PxStateTrans.h"
00009 #endif
00010 
00011 namespace Impala
00012 {
00013 namespace Core
00014 {
00015 namespace Array
00016 {
00017 namespace Pattern
00018 {
00019 
00020 
00021 template<class DstArrayT, class Src1ArrayT, class Src2ArrayT, class BpoT>
00022 inline void
00023 PatBinaryPixOp(DstArrayT*& dst, Src1ArrayT* s1, Src2ArrayT* s2, BpoT& bpo)
00024 {
00025     if (dst == 0)
00026         dst = ArrayClone<DstArrayT>(s1);
00027 
00028 #ifdef PX_HORUS_USED
00029     if (!PxRunParallel()) {                         // run sequential
00030 #endif
00031         FuncBpoDispatch(dst, s1, s2, bpo);
00032 
00033 #ifdef PX_HORUS_USED
00034     } else {                                        // run parallel
00035         PxArrayPreStateTrans(s1,  PAR_PART, STRONG);
00036         PxArrayPreStateTrans(s2,  PAR_PART, STRONG);
00037         PxArrayPreStateTrans(dst, PAR_PART, WEAK);
00038         CxFuncBpoDispatch(PxArrayPD(dst),
00039                           PxArrayPD(s1), PxArrayPD(s2), bpo);
00040         PxArrayPostStateTrans(dst);
00041 
00042         if (!PxRunLazyParallel()) {
00043             PxArrayForceNonDistributed(s1);
00044             PxArrayForceNonDistributed(s2);
00045             PxArrayForceNonDistributed(dst);
00046         }
00047     }
00048 #endif
00049 }
00050 
00051 } // namespace Pattern
00052 } // namespace Array
00053 } // namespace Core
00054 } // namespace Impala
00055 
00056 #endif

Generated on Fri Mar 19 09:30:50 2010 for ImpalaSrc by  doxygen 1.5.1