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

ShLibMisc.hpp

00001 // Sh: A GPU metaprogramming language.
00002 //
00003 // Copyright 2003-2005 Serious Hack Inc.
00004 // 
00005 // This software is provided 'as-is', without any express or implied
00006 // warranty. In no event will the authors be held liable for any damages
00007 // arising from the use of this software.
00008 // 
00009 // Permission is granted to anyone to use this software for any purpose,
00010 // including commercial applications, and to alter it and redistribute it
00011 // freely, subject to the following restrictions:
00012 // 
00013 // 1. The origin of this software must not be misrepresented; you must
00014 // not claim that you wrote the original software. If you use this
00015 // software in a product, an acknowledgment in the product documentation
00016 // would be appreciated but is not required.
00017 // 
00018 // 2. Altered source versions must be plainly marked as such, and must
00019 // not be misrepresented as being the original software.
00020 // 
00021 // 3. This notice may not be removed or altered from any source
00022 // distribution.
00024 #ifndef SHLIBMISC_HPP
00025 #define SHLIBMISC_HPP
00026 
00027 #include "ShGeneric.hpp"
00028 #include "ShLib.hpp"
00029 
00030 #ifndef WIN32
00031 namespace SH {
00032 
00045 template<int M, int N, typename T> 
00046 ShGeneric<M, T> cast(const ShGeneric<N, T>& a);
00047 template<int M> 
00048 ShGeneric<M, double> cast(double a); // @todo type do a cpp type -> value type map
00049 
00055 template<int M, int N, typename T> 
00056 ShGeneric<M, T> fillcast(const ShGeneric<N, T>& a);
00057 template<int M> 
00058 ShGeneric<M, double> fillcast(double a); // @todo type do a cpp type -> value type map
00059 
00063 template<int M, int N, typename T1, typename T2> 
00064 ShGeneric<M+N, CT1T2> 
00065 join(const ShGeneric<M, T1>& a, const ShGeneric<N, T2> &b);
00066 
00070 template<int M, int N, int O, typename T1, typename T2, typename T3> 
00071 ShGeneric<M+N+O, CT1T2T3> 
00072 join(const ShGeneric<M, T1>& a, const ShGeneric<N, T2> &b, const ShGeneric<O, T3> &c);
00073 
00077 template<int M, int N, int O, int P, typename T1, typename T2, typename T3, typename T4> 
00078 ShGeneric<M+N+O+P, CT1T2T3T4> 
00079 join(const ShGeneric<M, T1>& a, const ShGeneric<N, T2> &b, const ShGeneric<O, T3> &c, const ShGeneric<P, T4> &d);
00080 
00084 template<int N, typename T>
00085 void discard(const ShGeneric<N, T>& c);
00086 
00090 template<int N, typename T>
00091 void kill(const ShGeneric<N, T>& c);
00092 
00098 template<int N, typename T> 
00099 ShGeneric<N, T> sort(const ShGeneric<N, T>& a);
00100 
00105 template<int S, int N, typename T>
00106 void groupsort(ShGeneric<N, T> v[]);
00107 
00114 template<typename T>
00115 ShProgram freeze(const ShProgram& p,
00116                  const T& uniform);
00117 
00120 }
00121 #endif
00122 
00123 #include "ShLibMiscImpl.hpp"
00124 
00125 #endif

Generated on Thu Apr 21 17:32:47 2005 for Sh by  doxygen 1.4.2