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

PatM6PixOp.h

Go to the documentation of this file.
00001 #ifndef Impala_Core_Array_Pattern_PatM6PixOp_h
00002 #define Impala_Core_Array_Pattern_PatM6PixOp_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 PatM6PixOp(DstArrayT*& dst,
00024            SrcArrayT* s1, SrcArrayT* s2, SrcArrayT* s3,
00025            SrcArrayT* s4, SrcArrayT* s5, SrcArrayT* s6, MpoT& mpo)
00026 {
00027     if (dst == 0)
00028         dst = ArrayClone<DstArrayT>(s1);
00029 
00030 #ifdef PX_HORUS_USED
00031     if (!PxRunParallel()) {                         // run sequential
00032 #endif
00033         FuncM6po(dst, s1, s2, s3, s4, s5, s6, mpo);
00034 
00035 #ifdef PX_HORUS_USED
00036     } else {                                        // run parallel
00037         PxArrayPreStateTrans(s1,  PAR_PART, STRONG);
00038         PxArrayPreStateTrans(s2,  PAR_PART, STRONG);
00039         PxArrayPreStateTrans(s3,  PAR_PART, STRONG);
00040         PxArrayPreStateTrans(s4,  PAR_PART, STRONG);
00041         PxArrayPreStateTrans(s5,  PAR_PART, STRONG);
00042         PxArrayPreStateTrans(s6,  PAR_PART, STRONG);
00043         PxArrayPreStateTrans(dst, PAR_PART, WEAK);
00044         FuncM6po(PxArrayPD(dst),
00045                  PxArrayPD(s1), PxArrayPD(s2), PxArrayPD(s3),
00046                  PxArrayPD(s4), PxArrayPD(s5), PxArrayPD(s6), mpo);
00047         PxArrayPostStateTrans(dst);
00048 
00049         if (!PxRunLazyParallel()) {
00050             PxArrayForceNonDistributed(s1);
00051             PxArrayForceNonDistributed(s2);
00052             PxArrayForceNonDistributed(s3);
00053             PxArrayForceNonDistributed(s4);
00054             PxArrayForceNonDistributed(s5);
00055             PxArrayForceNonDistributed(s6);
00056             PxArrayForceNonDistributed(dst);
00057         }
00058     }
00059 #endif
00060 }
00061 
00062 } // namespace Pattern
00063 } // namespace Array
00064 } // namespace Core
00065 } // namespace Impala
00066 
00067 #endif

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