00001 #ifndef Impala_Core_Array_Pattern_PatM21PixOp_h
00002 #define Impala_Core_Array_Pattern_PatM21PixOp_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 PatM21PixOp(DstArrayT*& dst,
00024 SrcArrayT* s1, SrcArrayT* s2, SrcArrayT* s3,
00025 SrcArrayT* s4, SrcArrayT* s5, SrcArrayT* s6,
00026 SrcArrayT* s7, SrcArrayT* s8, SrcArrayT* s9,
00027 SrcArrayT* s10, SrcArrayT* s11, SrcArrayT* s12,
00028 SrcArrayT* s13, SrcArrayT* s14, SrcArrayT* s15,
00029 SrcArrayT* s16, SrcArrayT* s17, SrcArrayT* s18,
00030 SrcArrayT* s19, SrcArrayT* s20, SrcArrayT* s21, MpoT& mpo)
00031 {
00032 if (dst == 0)
00033 dst = ArrayClone<DstArrayT>(s1);
00034
00035 #ifdef PX_HORUS_USED
00036 if (!PxRunParallel()) {
00037 #endif
00038 FuncM21po(dst,
00039 s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12,
00040 s13, s14, s15, s16, s17, s18, s19, s20, s21, mpo);
00041
00042 #ifdef PX_HORUS_USED
00043 } else {
00044 PxArrayPreStateTrans(s1, PAR_PART, STRONG);
00045 PxArrayPreStateTrans(s2, PAR_PART, STRONG);
00046 PxArrayPreStateTrans(s3, PAR_PART, STRONG);
00047 PxArrayPreStateTrans(s4, PAR_PART, STRONG);
00048 PxArrayPreStateTrans(s5, PAR_PART, STRONG);
00049 PxArrayPreStateTrans(s6, PAR_PART, STRONG);
00050 PxArrayPreStateTrans(s7, PAR_PART, STRONG);
00051 PxArrayPreStateTrans(s8, PAR_PART, STRONG);
00052 PxArrayPreStateTrans(s9, PAR_PART, STRONG);
00053 PxArrayPreStateTrans(s10, PAR_PART, STRONG);
00054 PxArrayPreStateTrans(s11, PAR_PART, STRONG);
00055 PxArrayPreStateTrans(s12, PAR_PART, STRONG);
00056 PxArrayPreStateTrans(s13, PAR_PART, STRONG);
00057 PxArrayPreStateTrans(s14, PAR_PART, STRONG);
00058 PxArrayPreStateTrans(s15, PAR_PART, STRONG);
00059 PxArrayPreStateTrans(s16, PAR_PART, STRONG);
00060 PxArrayPreStateTrans(s17, PAR_PART, STRONG);
00061 PxArrayPreStateTrans(s18, PAR_PART, STRONG);
00062 PxArrayPreStateTrans(s19, PAR_PART, STRONG);
00063 PxArrayPreStateTrans(s20, PAR_PART, STRONG);
00064 PxArrayPreStateTrans(s21, PAR_PART, STRONG);
00065 PxArrayPreStateTrans(dst, PAR_PART, WEAK);
00066 FuncM21po(PxArrayPD(dst),
00067 PxArrayPD(s1), PxArrayPD(s2), PxArrayPD(s3),
00068 PxArrayPD(s4), PxArrayPD(s5), PxArrayPD(s6),
00069 PxArrayPD(s7), PxArrayPD(s8), PxArrayPD(s9),
00070 PxArrayPD(s10),PxArrayPD(s11),PxArrayPD(s12),
00071 PxArrayPD(s13),PxArrayPD(s14),PxArrayPD(s15),
00072 PxArrayPD(s16),PxArrayPD(s17),PxArrayPD(s18),
00073 PxArrayPD(s19),PxArrayPD(s20),PxArrayPD(s21), mpo);
00074 PxArrayPostStateTrans(dst);
00075
00076 if (!PxRunLazyParallel()) {
00077 PxArrayForceNonDistributed(s1);
00078 PxArrayForceNonDistributed(s2);
00079 PxArrayForceNonDistributed(s3);
00080 PxArrayForceNonDistributed(s4);
00081 PxArrayForceNonDistributed(s5);
00082 PxArrayForceNonDistributed(s6);
00083 PxArrayForceNonDistributed(s7);
00084 PxArrayForceNonDistributed(s8);
00085 PxArrayForceNonDistributed(s9);
00086 PxArrayForceNonDistributed(s10);
00087 PxArrayForceNonDistributed(s11);
00088 PxArrayForceNonDistributed(s12);
00089 PxArrayForceNonDistributed(s13);
00090 PxArrayForceNonDistributed(s14);
00091 PxArrayForceNonDistributed(s15);
00092 PxArrayForceNonDistributed(s16);
00093 PxArrayForceNonDistributed(s17);
00094 PxArrayForceNonDistributed(s18);
00095 PxArrayForceNonDistributed(s19);
00096 PxArrayForceNonDistributed(s20);
00097 PxArrayForceNonDistributed(s21);
00098 PxArrayForceNonDistributed(dst);
00099 }
00100 }
00101 #endif
00102 }
00103
00104 }
00105 }
00106 }
00107 }
00108
00109 #endif