00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00020 #include "ShLib.hpp"
00021
00022 #ifndef SHLIBMISC_HPP
00023 #define SHLIBMISC_HPP
00024
00025 #include "ShGeneric.hpp"
00026
00027 #ifndef _WIN32
00028 namespace SH {
00029
00042 template<int M, int N, typename T>
00043 ShGeneric<M, T> cast(const ShGeneric<N, T>& a);
00044 template<int M>
00045 ShGeneric<M, double> cast(double a);
00046
00052 template<int M, int N, typename T>
00053 ShGeneric<M, T> fillcast(const ShGeneric<N, T>& a);
00054 template<int M>
00055 ShGeneric<M, double> fillcast(double a);
00056
00060 template<int M, int N, typename T1, typename T2>
00061 ShGeneric<M+N, CT1T2>
00062 join(const ShGeneric<M, T1>& a, const ShGeneric<N, T2> &b);
00063 template<int M, typename T>
00064 ShGeneric<M+1, T>
00065 join(const T& a, const ShGeneric<M, T>& b);
00066 template<int M, typename T>
00067 ShGeneric<M+1, T>
00068 join(const ShGeneric<M, T>& a, const T& b);
00069
00070
00074 template<int M, int N, int O, typename T1, typename T2, typename T3>
00075 ShGeneric<M+N+O, CT1T2T3>
00076 join(const ShGeneric<M, T1>& a, const ShGeneric<N, T2> &b, const ShGeneric<O, T3> &c);
00077
00081 template<int M, int N, int O, int P, typename T1, typename T2, typename T3, typename T4>
00082 ShGeneric<M+N+O+P, CT1T2T3T4>
00083 join(const ShGeneric<M, T1>& a, const ShGeneric<N, T2> &b, const ShGeneric<O, T3> &c, const ShGeneric<P, T4> &d);
00084
00088 template<int N, typename T>
00089 void discard(const ShGeneric<N, T>& c);
00090
00094 template<int N, typename T>
00095 void kill(const ShGeneric<N, T>& c);
00096
00102 template<int N, typename T>
00103 ShGeneric<N, T> sort(const ShGeneric<N, T>& a);
00104
00109 template<int S, typename T>
00110 void groupsort(T v[]);
00111
00118 template<typename T>
00119 ShProgram freeze(const ShProgram& p,
00120 const T& uniform);
00121
00122
00123
00124 template<int N, int M, typename T1, typename T2>
00125 ShGeneric<N, CT1T2>
00126 poly(const ShGeneric<N, T1>& a, const ShGeneric<M, T2>& b);
00127
00130 }
00131 #endif
00132
00133 #include "ShLibMiscImpl.hpp"
00134
00135 #endif