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

PatM9PixOp.h

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

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