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

PxArrayFunc.h

Go to the documentation of this file.
00001 /*
00002  *  Copyright (c) 2003-2004, University of Amsterdam, The Netherlands.
00003  *  All rights reserved.
00004  *
00005  *  Author(s):
00006  *  Frank Seinstra <fjseins@wins.uva.nl>
00007  */
00008 
00009 #ifndef __PxArrayFunc_h_
00010 #define __PxArrayFunc_h_
00011 
00012 #include "Core/Array/Pattern/ArrayFunc.h"
00013 
00014 namespace Impala
00015 {
00016 namespace Core
00017 {
00018 namespace Array
00019 {
00020 namespace Pattern
00021 {
00022 
00023 
00024 /*** PxHorus extension to ArrayFunc functionality *******************/
00025 
00026 template<class ArrayT>
00027 inline int
00028 ArrayD(ArrayT* a)
00029 {
00030     // Stub function to avoid compilation errors of PxHorus extensions.
00031 
00032     return 1;
00033 }
00034 
00035 
00036 template<class ArrayT>
00037 inline int
00038 ArrayBD(ArrayT* a)
00039 {
00040     // Stub function to avoid compilation errors of PxHorus extensions.
00041 
00042     return 0;
00043 }
00044 
00045 
00046 template<class ArrayT>
00047 inline int
00048 ArrayCD(ArrayT* a)
00049 {
00050     // Stub function to avoid compilation errors of PxHorus extensions.
00051 
00052     return 1;
00053 }
00054 
00055 
00056 /**********************************************************************/
00057 
00058 template<class ArrayT>
00059 ArrayT*
00060 PxArrayCreate(int cw, int ch, int cd, int bw = 0, int bh = 0, int bd = 0,
00061               typename ArrayT::StorType* data = 0, bool isWrapper = false)
00062 {
00063     return new ArrayT(cw, ch, bw, bh, data, isWrapper);
00064 }
00065 
00066 
00067 template<class ArrayT>
00068 inline void
00069 PxArrayCreatePD(ArrayT* a, int lw, int lh, int ld,
00070                 int bw = 0, int bh = 0, int bd = 0)
00071 {
00072     a->mPartArray = PxArrayCreate<ArrayT>(lw, lh, ld, bw, bh, bd);
00073     a->mPartArray->mIsPartial = true;
00074 }
00075 
00076 
00077 template<class ArrayT>
00078 inline void
00079 PxArrayDeletePD(ArrayT* a)
00080 {
00081     if (a->mPartArray != 0) {
00082         delete a->mPartArray;
00083         a->mPartArray = 0;
00084     }
00085 }
00086 
00087 
00088 template<class ArrayT>
00089 inline ArrayT*
00090 PxArrayPD(ArrayT* a)
00091 {
00092     return a->mPartArray;
00093 }
00094 
00095 
00096 template<class ArrayT>
00097 inline int
00098 PxArrayGetState(ArrayT* a)
00099 {
00100     return a->mState;
00101 }
00102 
00103 
00104 template<class ArrayT>
00105 inline void
00106 PxArraySetState(ArrayT* a, int state)
00107 {
00108     a->mState = state;
00109 }
00110 
00111 
00112 template<class ArrayT>
00113 inline bool
00114 PxArrayIsPD(ArrayT* a)
00115 {
00116     return a->mIsPartial;
00117 }
00118 
00119 
00120 } // namespace Pattern
00121 } // namespace Array
00122 } // namespace Core
00123 } // namespace Impala
00124 
00125 #endif /* __PxArrayFunc_h_ */

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