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

PatM3PixOp.h

Go to the documentation of this file.
00001 #ifndef Impala_Core_Array_Pattern_PatM3PixOp_h
00002 #define Impala_Core_Array_Pattern_PatM3PixOp_h
00003 
00004 #include "Core/Array/Pattern/FuncMpo.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 SrcArrayT, class MpoT>
00022 inline void
00023 PatM3PixOp(DstArrayT*& dst,
00024            SrcArrayT* s1, SrcArrayT* s2, SrcArrayT* s3, MpoT& mpo)
00025 {
00026     if (dst == 0)
00027         dst = ArrayClone<DstArrayT>(s1);
00028 
00029 #ifdef PX_HORUS_USED
00030     if (!PxRunParallel()) {                         // run sequential
00031 #endif
00032         FuncM3po(dst, s1, s2, s3, mpo);
00033 
00034 #ifdef PX_HORUS_USED
00035     } else {                                        // run parallel
00036         PxArrayPreStateTrans(s1,  PAR_PART, STRONG);
00037         PxArrayPreStateTrans(s2,  PAR_PART, STRONG);
00038         PxArrayPreStateTrans(s3,  PAR_PART, STRONG);
00039         PxArrayPreStateTrans(dst, PAR_PART, WEAK);
00040         FuncM3po(PxArrayPD(dst),
00041                  PxArrayPD(s1), PxArrayPD(s2), PxArrayPD(s3), mpo);
00042         PxArrayPostStateTrans(dst);
00043 
00044         if (!PxRunLazyParallel()) {
00045             PxArrayForceNonDistributed(s1);
00046             PxArrayForceNonDistributed(s2);
00047             PxArrayForceNonDistributed(s3);
00048             PxArrayForceNonDistributed(dst);
00049         }
00050     }
00051 #endif
00052 }
00053 
00054 } // namespace Pattern
00055 } // namespace Array
00056 } // namespace Core
00057 } // namespace Impala
00058 
00059 #endif

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