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

PatInOutOp.h

Go to the documentation of this file.
00001 #ifndef Impala_Core_Array_Pattern_PatInOutOp_h
00002 #define Impala_Core_Array_Pattern_PatInOutOp_h
00003 
00004 #include "Core/Array/Pattern/FuncInOut.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 ArrayT, class PixOpT>
00022 inline void
00023 PatInOutOp(ArrayT* array, PixOpT& pixOp)
00024 {
00025 #ifdef PX_HORUS_USED
00026     if (!PxRunParallel()) {                         // run sequential
00027 #endif
00028         FuncInOutDispatch(array, pixOp);
00029 
00030 #ifdef PX_HORUS_USED
00031     } else {                                        // run parallel
00032         PX_COUT << "NOTE: PatInOutOp NOT PARALLELIZED YET!"
00033                 << PX_ENDL;
00034         PxArrayForceNonDistributed(array);
00035         FuncInOutDispatch(array, pixOp);
00036     }
00037 #endif
00038 }
00039 
00040 
00041 
00042 
00043 template<class ArrayT, class PixOpT>
00044 inline void
00045 PatInOutOp(ArrayT* array1, ArrayT* array2, PixOpT& pixOp)
00046 {
00047 #ifdef PX_HORUS_USED
00048     if (!PxRunParallel()) {                         // run sequential
00049 #endif
00050         FuncInOutDispatch(array1, array2, pixOp);
00051 
00052 #ifdef PX_HORUS_USED
00053     } else {                                        // run parallel
00054         PX_COUT << "NOTE: PatInOutOp NOT PARALLELIZED YET!"
00055                 << PX_ENDL;
00056         PxArrayForceNonDistributed(array1);
00057         PxArrayForceNonDistributed(array2);
00058         FuncInOutDispatch(array1, array2, pixOp);
00059     }
00060 #endif
00061 }
00062 
00063 } // namespace Pattern
00064 } // namespace Array
00065 } // namespace Core
00066 } // namespace Impala
00067 
00068 #endif

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