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

PatUnaryPixOp.h

Go to the documentation of this file.
00001 #ifndef Impala_Core_Array_Pattern_PatUnaryPixOp_h
00002 #define Impala_Core_Array_Pattern_PatUnaryPixOp_h
00003 
00004 #include "Core/Array/Array2dTem.h"
00005 #include "Core/Array/Pattern/FuncUpo.h"
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 UpoT>
00022 inline void
00023 PatUnaryPixOp(DstArrayT*& dst, SrcArrayT* src, UpoT& upo)
00024 {
00025     if (dst == 0)
00026         dst = ArrayClone<DstArrayT>(src);
00027 
00028 #ifdef PX_HORUS_USED
00029     if (!PxRunParallel()) {                         // run sequential
00030 #endif
00031         FuncUpoDispatch(dst, src, upo);
00032 
00033 #ifdef PX_HORUS_USED
00034     } else {                                        // run parallel
00035         PxArrayPreStateTrans(src, PAR_PART, STRONG);
00036         PxArrayPreStateTrans(dst, PAR_PART, WEAK);
00037         FuncUpoDispatch(PxArrayPD(dst), PxArrayPD(src), upo);
00038         PxArrayPostStateTrans(dst);
00039 
00040         if (!PxRunLazyParallel()) {
00041             PxArrayForceNonDistributed(src);
00042             PxArrayForceNonDistributed(dst);
00043         }
00044     }
00045 #endif
00046 }
00047 
00048 } // namespace Pattern
00049 } // namespace Array
00050 } // namespace Core
00051 } // namespace Impala
00052 
00053 #endif

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