00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
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);
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);
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