Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

ShLibBoolean.hpp

00001 // Sh: A GPU metaprogramming language. 00002 // 00003 // Copyright (c) 2003 University of Waterloo Computer Graphics Laboratory 00004 // Project administrator: Michael D. McCool 00005 // Authors: Zheng Qin, Stefanus Du Toit, Kevin Moule, Tiberiu S. Popa, 00006 // Michael D. McCool 00007 // 00008 // This software is provided 'as-is', without any express or implied 00009 // warranty. In no event will the authors be held liable for any damages 00010 // arising from the use of this software. 00011 // 00012 // Permission is granted to anyone to use this software for any purpose, 00013 // including commercial applications, and to alter it and redistribute it 00014 // freely, subject to the following restrictions: 00015 // 00016 // 1. The origin of this software must not be misrepresented; you must 00017 // not claim that you wrote the original software. If you use this 00018 // software in a product, an acknowledgment in the product documentation 00019 // would be appreciated but is not required. 00020 // 00021 // 2. Altered source versions must be plainly marked as such, and must 00022 // not be misrepresented as being the original software. 00023 // 00024 // 3. This notice may not be removed or altered from any source 00025 // distribution. 00027 #ifndef SHLIBBOOLEAN_HPP 00028 #define SHLIBBOOLEAN_HPP 00029 00030 #include "ShGeneric.hpp" 00031 #include "ShLib.hpp" 00032 00033 00034 namespace SH { 00035 00041 00042 template<int N, typename T> 00043 ShGeneric<N, T> operator<(const ShGeneric<N, T>& left, const ShGeneric<N, T>& right); 00044 template<int N, typename T> 00045 ShGeneric<N, T> operator<(const ShGeneric<N, T>& left, const ShGeneric<1, T>& right); 00046 template<int N, typename T> 00047 ShGeneric<N, T> operator<(const ShGeneric<1, T>& left, const ShGeneric<N, T>& right); 00048 template<typename T> 00049 ShGeneric<1, T> operator<(const ShGeneric<1, T>& left, const ShGeneric<1, T>& right); 00050 SH_SHLIB_CONST_SCALAR_OP(operator<); 00051 SH_SHLIB_CONST_N_OP_BOTH(operator<); 00052 00054 template<int N, typename T> 00055 ShGeneric<N, T> operator<=(const ShGeneric<N, T>& left, const ShGeneric<N, T>& right); 00056 template<int N, typename T> 00057 ShGeneric<N, T> operator<=(const ShGeneric<N, T>& left, const ShGeneric<1, T>& right); 00058 template<int N, typename T> 00059 ShGeneric<N, T> operator<=(const ShGeneric<1, T>& left, const ShGeneric<N, T>& right); 00060 template<typename T> 00061 ShGeneric<1, T> operator<=(const ShGeneric<1, T>& left, const ShGeneric<1, T>& right); 00062 SH_SHLIB_CONST_SCALAR_OP(operator<=); 00063 SH_SHLIB_CONST_N_OP_BOTH(operator<=); 00064 00066 template<int N, typename T> 00067 ShGeneric<N, T> operator>(const ShGeneric<N, T>& left, const ShGeneric<N, T>& right); 00068 template<int N, typename T> 00069 ShGeneric<N, T> operator>(const ShGeneric<N, T>& left, const ShGeneric<1, T>& right); 00070 template<int N, typename T> 00071 ShGeneric<N, T> operator>(const ShGeneric<1, T>& left, const ShGeneric<N, T>& right); 00072 template<typename T> 00073 ShGeneric<1, T> operator>(const ShGeneric<1, T>& left, const ShGeneric<1, T>& right); 00074 SH_SHLIB_CONST_SCALAR_OP(operator>); 00075 SH_SHLIB_CONST_N_OP_BOTH(operator>); 00076 00078 template<int N, typename T> 00079 ShGeneric<N, T> operator>=(const ShGeneric<N, T>& left, const ShGeneric<N, T>& right); 00080 template<int N, typename T> 00081 ShGeneric<N, T> operator>=(const ShGeneric<N, T>& left, const ShGeneric<1, T>& right); 00082 template<int N, typename T> 00083 ShGeneric<N, T> operator>=(const ShGeneric<1, T>& left, const ShGeneric<N, T>& right); 00084 template<typename T> 00085 ShGeneric<1, T> operator>=(const ShGeneric<1, T>& left, const ShGeneric<1, T>& right); 00086 SH_SHLIB_CONST_SCALAR_OP(operator>=); 00087 SH_SHLIB_CONST_N_OP_BOTH(operator>=); 00088 00090 template<int N, typename T> 00091 ShGeneric<N, T> operator==(const ShGeneric<N, T>& left, const ShGeneric<N, T>& right); 00092 template<int N, typename T> 00093 ShGeneric<N, T> operator==(const ShGeneric<N, T>& left, const ShGeneric<1, T>& right); 00094 template<int N, typename T> 00095 ShGeneric<N, T> operator==(const ShGeneric<1, T>& left, const ShGeneric<N, T>& right); 00096 template<typename T> 00097 ShGeneric<1, T> operator==(const ShGeneric<1, T>& left, const ShGeneric<1, T>& right); 00098 SH_SHLIB_CONST_SCALAR_OP(operator==); 00099 SH_SHLIB_CONST_N_OP_BOTH(operator==); 00100 00102 template<int N, typename T> 00103 ShGeneric<N, T> operator!=(const ShGeneric<N, T>& left, const ShGeneric<N, T>& right); 00104 template<int N, typename T> 00105 ShGeneric<N, T> operator!=(const ShGeneric<N, T>& left, const ShGeneric<1, T>& right); 00106 template<int N, typename T> 00107 ShGeneric<N, T> operator!=(const ShGeneric<1, T>& left, const ShGeneric<N, T>& right); 00108 template<typename T> 00109 ShGeneric<1, T> operator!=(const ShGeneric<1, T>& left, const ShGeneric<1, T>& right); 00110 SH_SHLIB_CONST_SCALAR_OP(operator!=); 00111 SH_SHLIB_CONST_N_OP_BOTH(operator!=); 00112 00124 template<int N, typename T> 00125 ShGeneric<N, T> cond(const ShGeneric<N, T>& condition, const ShGeneric<N, T>& left, 00126 const ShGeneric<N, T>& right); 00127 template<int N, typename T> 00128 ShGeneric<N, T> cond(const ShGeneric<1, T>& condition, const ShGeneric<N, T>& left, 00129 const ShGeneric<N, T>& right); 00130 template<typename T> 00131 ShGeneric<1, T> cond(const ShGeneric<1, T>& condition, const ShGeneric<1, T>& left, 00132 const ShGeneric<1, T>& right); 00133 00135 template<int N, typename T> 00136 ShGeneric<N, T> operator!(const ShGeneric<N, T>& a); 00137 00139 template<int N, typename T> 00140 ShGeneric<N, T> operator&&(const ShGeneric<N, T>& a, const ShGeneric<N, T>& b); 00141 00143 template<int N, typename T> 00144 ShGeneric<N, T> operator||(const ShGeneric<N, T>& a, const ShGeneric<N, T>& b); 00145 00147 template<int N, typename T> 00148 ShGeneric<1, T> any(const ShGeneric<N, T>& a); 00149 00151 template<int N, typename T> 00152 ShGeneric<1, T> all(const ShGeneric<N, T>& a); 00153 00156 } 00157 00158 #include "ShLibBooleanImpl.hpp" 00159 00160 #endif

Generated on Mon Oct 18 14:17:39 2004 for Sh by doxygen 1.3.7