auxlib_bones.hpp 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476
  1. // Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au)
  2. // Copyright 2008-2016 National ICT Australia (NICTA)
  3. //
  4. // Licensed under the Apache License, Version 2.0 (the "License");
  5. // you may not use this file except in compliance with the License.
  6. // You may obtain a copy of the License at
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. // ------------------------------------------------------------------------
  15. //! \addtogroup auxlib
  16. //! @{
  17. //! interface functions for accessing decompositions in LAPACK and ATLAS
  18. class auxlib
  19. {
  20. public:
  21. template<const uword row, const uword col>
  22. struct pos
  23. {
  24. static const uword n2 = row + col*2;
  25. static const uword n3 = row + col*3;
  26. static const uword n4 = row + col*4;
  27. };
  28. //
  29. // inv
  30. template<typename eT>
  31. inline static bool inv(Mat<eT>& out, const Mat<eT>& A);
  32. template<typename eT>
  33. arma_cold inline static bool inv_tiny(Mat<eT>& out, const Mat<eT>& X);
  34. template<typename eT, typename T1>
  35. inline static bool inv_tr(Mat<eT>& out, const Base<eT,T1>& X, const uword layout);
  36. template<typename eT, typename T1>
  37. inline static bool inv_sympd(Mat<eT>& out, const Base<eT,T1>& X);
  38. template<typename eT>
  39. arma_cold inline static bool inv_sympd_tiny(Mat<eT>& out, const Mat<eT>& X);
  40. //
  41. // det
  42. template<typename eT>
  43. inline static eT det(const Mat<eT>& A);
  44. template<typename eT>
  45. arma_cold inline static eT det_tinymat(const Mat<eT>& X, const uword N);
  46. template<typename eT>
  47. inline static eT det_lapack(const Mat<eT>& X);
  48. //
  49. // log_det
  50. template<typename eT, typename T1>
  51. inline static bool log_det(eT& out_val, typename get_pod_type<eT>::result& out_sign, const Base<eT,T1>& X);
  52. //
  53. // lu
  54. template<typename eT, typename T1>
  55. inline static bool lu(Mat<eT>& L, Mat<eT>& U, podarray<blas_int>& ipiv, const Base<eT,T1>& X);
  56. template<typename eT, typename T1>
  57. inline static bool lu(Mat<eT>& L, Mat<eT>& U, Mat<eT>& P, const Base<eT,T1>& X);
  58. template<typename eT, typename T1>
  59. inline static bool lu(Mat<eT>& L, Mat<eT>& U, const Base<eT,T1>& X);
  60. //
  61. // eig_gen
  62. template<typename T1>
  63. inline static bool eig_gen(Mat< std::complex<typename T1::pod_type> >& vals, Mat< std::complex<typename T1::pod_type> >& vecs, const bool vecs_on, const Base<typename T1::pod_type,T1>& expr);
  64. template<typename T1>
  65. inline static bool eig_gen(Mat< std::complex<typename T1::pod_type> >& vals, Mat< std::complex<typename T1::pod_type> >& vecs, const bool vecs_on, const Base< std::complex<typename T1::pod_type>, T1 >& expr);
  66. //
  67. // eig_gen_balance
  68. template<typename T1>
  69. inline static bool eig_gen_balance(Mat< std::complex<typename T1::pod_type> >& vals, Mat< std::complex<typename T1::pod_type> >& vecs, const bool vecs_on, const Base<typename T1::pod_type,T1>& expr);
  70. template<typename T1>
  71. inline static bool eig_gen_balance(Mat< std::complex<typename T1::pod_type> >& vals, Mat< std::complex<typename T1::pod_type> >& vecs, const bool vecs_on, const Base< std::complex<typename T1::pod_type>, T1 >& expr);
  72. //
  73. // eig_gen_twosided
  74. template<typename T1>
  75. inline static bool eig_gen_twosided(Mat< std::complex<typename T1::pod_type> >& vals, Mat< std::complex<typename T1::pod_type> >& lvecs, Mat< std::complex<typename T1::pod_type> >& rvecs, const Base<typename T1::pod_type,T1>& expr);
  76. template<typename T1>
  77. inline static bool eig_gen_twosided(Mat< std::complex<typename T1::pod_type> >& vals, Mat< std::complex<typename T1::pod_type> >& lvecs, Mat< std::complex<typename T1::pod_type> >& rvecs, const Base< std::complex<typename T1::pod_type>, T1 >& expr);
  78. //
  79. // eig_gen_twosided_balance
  80. template<typename T1>
  81. inline static bool eig_gen_twosided_balance(Mat< std::complex<typename T1::pod_type> >& vals, Mat< std::complex<typename T1::pod_type> >& lvecs, Mat< std::complex<typename T1::pod_type> >& rvecs, const Base<typename T1::pod_type,T1>& expr);
  82. template<typename T1>
  83. inline static bool eig_gen_twosided_balance(Mat< std::complex<typename T1::pod_type> >& vals, Mat< std::complex<typename T1::pod_type> >& lvecs, Mat< std::complex<typename T1::pod_type> >& rvecs, const Base< std::complex<typename T1::pod_type>, T1 >& expr);
  84. //
  85. // eig_pair
  86. template<typename T1, typename T2>
  87. inline static bool eig_pair(Mat< std::complex<typename T1::pod_type> >& vals, Mat< std::complex<typename T1::pod_type> >& vecs, const bool vecs_on, const Base<typename T1::pod_type,T1>& A_expr, const Base<typename T1::pod_type,T2>& B_expr);
  88. template<typename T1, typename T2>
  89. inline static bool eig_pair(Mat< std::complex<typename T1::pod_type> >& vals, Mat< std::complex<typename T1::pod_type> >& vecs, const bool vecs_on, const Base< std::complex<typename T1::pod_type>, T1 >& A_expr, const Base< std::complex<typename T1::pod_type>, T2 >& B_expr);
  90. //
  91. // eig_pair_twosided
  92. template<typename T1, typename T2>
  93. inline static bool eig_pair_twosided(Mat< std::complex<typename T1::pod_type> >& vals, Mat< std::complex<typename T1::pod_type> >& lvecs, Mat< std::complex<typename T1::pod_type> >& rvecs, const Base<typename T1::pod_type,T1>& A_expr, const Base<typename T1::pod_type,T2>& B_expr);
  94. template<typename T1, typename T2>
  95. inline static bool eig_pair_twosided(Mat< std::complex<typename T1::pod_type> >& vals, Mat< std::complex<typename T1::pod_type> >& lvecs, Mat< std::complex<typename T1::pod_type> >& rvecs, const Base< std::complex<typename T1::pod_type>, T1 >& A_expr, const Base< std::complex<typename T1::pod_type>, T2 >& B_expr);
  96. //
  97. // eig_sym
  98. template<typename eT, typename T1>
  99. inline static bool eig_sym(Col<eT>& eigval, const Base<eT,T1>& X);
  100. template<typename T, typename T1>
  101. inline static bool eig_sym(Col<T>& eigval, const Base<std::complex<T>,T1>& X);
  102. template<typename eT>
  103. inline static bool eig_sym(Col<eT>& eigval, Mat<eT>& eigvec, const Mat<eT>& X);
  104. template<typename T>
  105. inline static bool eig_sym(Col<T>& eigval, Mat< std::complex<T> >& eigvec, const Mat< std::complex<T> >& X);
  106. template<typename eT>
  107. inline static bool eig_sym_dc(Col<eT>& eigval, Mat<eT>& eigvec, const Mat<eT>& X);
  108. template<typename T>
  109. inline static bool eig_sym_dc(Col<T>& eigval, Mat< std::complex<T> >& eigvec, const Mat< std::complex<T> >& X);
  110. //
  111. // chol
  112. template<typename eT>
  113. inline static bool chol_simple(Mat<eT>& X);
  114. template<typename eT>
  115. inline static bool chol(Mat<eT>& X, const uword layout);
  116. template<typename eT>
  117. inline static bool chol_band(Mat<eT>& X, const uword KD, const uword layout);
  118. template<typename T>
  119. inline static bool chol_band(Mat< std::complex<T> >& X, const uword KD, const uword layout);
  120. template<typename eT>
  121. inline static bool chol_band_common(Mat<eT>& X, const uword KD, const uword layout);
  122. //
  123. // hessenberg decomposition
  124. template<typename eT, typename T1>
  125. inline static bool hess(Mat<eT>& H, const Base<eT,T1>& X, Col<eT>& tao);
  126. //
  127. // qr
  128. template<typename eT, typename T1>
  129. inline static bool qr(Mat<eT>& Q, Mat<eT>& R, const Base<eT,T1>& X);
  130. template<typename eT, typename T1>
  131. inline static bool qr_econ(Mat<eT>& Q, Mat<eT>& R, const Base<eT,T1>& X);
  132. template<typename eT, typename T1>
  133. inline static bool qr_pivot(Mat<eT>& Q, Mat<eT>& R, Mat<uword>& P, const Base<eT,T1>& X);
  134. template<typename T, typename T1>
  135. inline static bool qr_pivot(Mat< std::complex<T> >& Q, Mat< std::complex<T> >& R, Mat<uword>& P, const Base<std::complex<T>,T1>& X);
  136. //
  137. // svd
  138. template<typename eT, typename T1>
  139. inline static bool svd(Col<eT>& S, const Base<eT,T1>& X, uword& n_rows, uword& n_cols);
  140. template<typename T, typename T1>
  141. inline static bool svd(Col<T>& S, const Base<std::complex<T>, T1>& X, uword& n_rows, uword& n_cols);
  142. template<typename eT, typename T1>
  143. inline static bool svd(Col<eT>& S, const Base<eT,T1>& X);
  144. template<typename T, typename T1>
  145. inline static bool svd(Col<T>& S, const Base<std::complex<T>, T1>& X);
  146. template<typename eT, typename T1>
  147. inline static bool svd(Mat<eT>& U, Col<eT>& S, Mat<eT>& V, const Base<eT,T1>& X);
  148. template<typename T, typename T1>
  149. inline static bool svd(Mat< std::complex<T> >& U, Col<T>& S, Mat< std::complex<T> >& V, const Base< std::complex<T>, T1>& X);
  150. template<typename eT, typename T1>
  151. inline static bool svd_econ(Mat<eT>& U, Col<eT>& S, Mat<eT>& V, const Base<eT,T1>& X, const char mode);
  152. template<typename T, typename T1>
  153. inline static bool svd_econ(Mat< std::complex<T> >& U, Col<T>& S, Mat< std::complex<T> >& V, const Base< std::complex<T>, T1>& X, const char mode);
  154. template<typename eT, typename T1>
  155. inline static bool svd_dc(Col<eT>& S, const Base<eT,T1>& X, uword& n_rows, uword& n_cols);
  156. template<typename T, typename T1>
  157. inline static bool svd_dc(Col<T>& S, const Base<std::complex<T>, T1>& X, uword& n_rows, uword& n_cols);
  158. template<typename eT, typename T1>
  159. inline static bool svd_dc(Col<eT>& S, const Base<eT,T1>& X);
  160. template<typename T, typename T1>
  161. inline static bool svd_dc(Col<T>& S, const Base<std::complex<T>, T1>& X);
  162. template<typename eT, typename T1>
  163. inline static bool svd_dc(Mat<eT>& U, Col<eT>& S, Mat<eT>& V, const Base<eT,T1>& X);
  164. template<typename T, typename T1>
  165. inline static bool svd_dc(Mat< std::complex<T> >& U, Col<T>& S, Mat< std::complex<T> >& V, const Base< std::complex<T>, T1>& X);
  166. template<typename eT, typename T1>
  167. inline static bool svd_dc_econ(Mat<eT>& U, Col<eT>& S, Mat<eT>& V, const Base<eT,T1>& X);
  168. template<typename T, typename T1>
  169. inline static bool svd_dc_econ(Mat< std::complex<T> >& U, Col<T>& S, Mat< std::complex<T> >& V, const Base< std::complex<T>, T1>& X);
  170. //
  171. // solve
  172. template<typename T1>
  173. arma_cold inline static bool solve_square_tiny(Mat<typename T1::elem_type>& out, const Mat<typename T1::elem_type>& A, const Base<typename T1::elem_type,T1>& B_expr);
  174. template<typename T1>
  175. inline static bool solve_square_fast(Mat<typename T1::elem_type>& out, Mat<typename T1::elem_type>& A, const Base<typename T1::elem_type,T1>& B_expr);
  176. template<typename T1>
  177. inline static bool solve_square_rcond(Mat<typename T1::elem_type>& out, typename T1::pod_type& out_rcond, Mat<typename T1::elem_type>& A, const Base<typename T1::elem_type,T1>& B_expr, const bool allow_ugly);
  178. template<typename T1>
  179. inline static bool solve_square_refine(Mat<typename T1::pod_type>& out, typename T1::pod_type& out_rcond, Mat<typename T1::pod_type>& A, const Base<typename T1::pod_type,T1>& B_expr, const bool equilibrate, const bool allow_ugly);
  180. template<typename T1>
  181. inline static bool solve_square_refine(Mat< std::complex<typename T1::pod_type> >& out, typename T1::pod_type& out_rcond, Mat< std::complex<typename T1::pod_type> >& A, const Base<std::complex<typename T1::pod_type>,T1>& B_expr, const bool equilibrate, const bool allow_ugly);
  182. //
  183. template<typename T1>
  184. inline static bool solve_sympd_fast(Mat<typename T1::elem_type>& out, Mat<typename T1::elem_type>& A, const Base<typename T1::elem_type,T1>& B_expr);
  185. template<typename T1>
  186. inline static bool solve_sympd_fast_common(Mat<typename T1::elem_type>& out, Mat<typename T1::elem_type>& A, const Base<typename T1::elem_type,T1>& B_expr);
  187. template<typename T1>
  188. inline static bool solve_sympd_rcond(Mat<typename T1::pod_type>& out, typename T1::pod_type& out_rcond, Mat<typename T1::pod_type>& A, const Base<typename T1::pod_type,T1>& B_expr, const bool allow_ugly);
  189. template<typename T1>
  190. inline static bool solve_sympd_rcond(Mat< std::complex<typename T1::pod_type> >& out, typename T1::pod_type& out_rcond, Mat< std::complex<typename T1::pod_type> >& A, const Base< std::complex<typename T1::pod_type>,T1>& B_expr, const bool allow_ugly);
  191. template<typename T1>
  192. inline static bool solve_sympd_refine(Mat<typename T1::pod_type>& out, typename T1::pod_type& out_rcond, Mat<typename T1::pod_type>& A, const Base<typename T1::pod_type,T1>& B_expr, const bool equilibrate, const bool allow_ugly);
  193. template<typename T1>
  194. inline static bool solve_sympd_refine(Mat< std::complex<typename T1::pod_type> >& out, typename T1::pod_type& out_rcond, Mat< std::complex<typename T1::pod_type> >& A, const Base<std::complex<typename T1::pod_type>,T1>& B_expr, const bool equilibrate, const bool allow_ugly);
  195. //
  196. template<typename T1>
  197. inline static bool solve_rect_fast(Mat<typename T1::elem_type>& out, Mat<typename T1::elem_type>& A, const Base<typename T1::elem_type,T1>& B_expr);
  198. template<typename T1>
  199. inline static bool solve_rect_rcond(Mat<typename T1::elem_type>& out, typename T1::pod_type& out_rcond, Mat<typename T1::elem_type>& A, const Base<typename T1::elem_type,T1>& B_expr, const bool allow_ugly);
  200. //
  201. template<typename T1>
  202. inline static bool solve_approx_svd(Mat<typename T1::pod_type>& out, Mat<typename T1::pod_type>& A, const Base<typename T1::pod_type,T1>& B_expr);
  203. template<typename T1>
  204. inline static bool solve_approx_svd(Mat< std::complex<typename T1::pod_type> >& out, Mat< std::complex<typename T1::pod_type> >& A, const Base<std::complex<typename T1::pod_type>,T1>& B_expr);
  205. //
  206. template<typename T1>
  207. inline static bool solve_trimat_fast(Mat<typename T1::elem_type>& out, const Mat<typename T1::elem_type>& A, const Base<typename T1::elem_type,T1>& B_expr, const uword layout);
  208. template<typename T1>
  209. inline static bool solve_trimat_rcond(Mat<typename T1::elem_type>& out, typename T1::pod_type& out_rcond, const Mat<typename T1::elem_type>& A, const Base<typename T1::elem_type,T1>& B_expr, const uword layout, const bool allow_ugly);
  210. //
  211. template<typename T1>
  212. inline static bool solve_band_fast(Mat<typename T1::pod_type>& out, Mat<typename T1::pod_type>& A, const uword KL, const uword KU, const Base<typename T1::pod_type,T1>& B_expr);
  213. template<typename T1>
  214. inline static bool solve_band_fast(Mat< std::complex<typename T1::pod_type> >& out, Mat< std::complex<typename T1::pod_type> >& A, const uword KL, const uword KU, const Base< std::complex<typename T1::pod_type>,T1>& B_expr);
  215. template<typename T1>
  216. inline static bool solve_band_fast_common(Mat<typename T1::elem_type>& out, const Mat<typename T1::elem_type>& A, const uword KL, const uword KU, const Base<typename T1::elem_type,T1>& B_expr);
  217. template<typename T1>
  218. inline static bool solve_band_rcond(Mat<typename T1::pod_type>& out, typename T1::pod_type& out_rcond, Mat<typename T1::pod_type>& A, const uword KL, const uword KU, const Base<typename T1::pod_type,T1>& B_expr, const bool allow_ugly);
  219. template<typename T1>
  220. inline static bool solve_band_rcond(Mat< std::complex<typename T1::pod_type> >& out, typename T1::pod_type& out_rcond, Mat< std::complex<typename T1::pod_type> >& A, const uword KL, const uword KU, const Base< std::complex<typename T1::pod_type>,T1>& B_expr, const bool allow_ugly);
  221. template<typename T1>
  222. inline static bool solve_band_rcond_common(Mat<typename T1::elem_type>& out, typename T1::pod_type& out_rcond, const Mat<typename T1::elem_type>& A, const uword KL, const uword KU, const Base<typename T1::elem_type,T1>& B_expr, const bool allow_ugly);
  223. template<typename T1>
  224. inline static bool solve_band_refine(Mat<typename T1::pod_type>& out, typename T1::pod_type& out_rcond, Mat<typename T1::pod_type>& A, const uword KL, const uword KU, const Base<typename T1::pod_type,T1>& B_expr, const bool equilibrate, const bool allow_ugly);
  225. template<typename T1>
  226. inline static bool solve_band_refine(Mat< std::complex<typename T1::pod_type> >& out, typename T1::pod_type& out_rcond, Mat< std::complex<typename T1::pod_type> >& A, const uword KL, const uword KU, const Base<std::complex<typename T1::pod_type>,T1>& B_expr, const bool equilibrate, const bool allow_ugly);
  227. //
  228. template<typename T1>
  229. inline static bool solve_tridiag_fast(Mat<typename T1::pod_type>& out, Mat<typename T1::pod_type>& A, const Base<typename T1::pod_type,T1>& B_expr);
  230. template<typename T1>
  231. inline static bool solve_tridiag_fast(Mat< std::complex<typename T1::pod_type> >& out, Mat< std::complex<typename T1::pod_type> >& A, const Base< std::complex<typename T1::pod_type>,T1>& B_expr);
  232. template<typename T1>
  233. inline static bool solve_tridiag_fast_common(Mat<typename T1::elem_type>& out, const Mat<typename T1::elem_type>& A, const Base<typename T1::elem_type,T1>& B_expr);
  234. //
  235. // Schur decomposition
  236. template<typename eT, typename T1>
  237. inline static bool schur(Mat<eT>& U, Mat<eT>& S, const Base<eT,T1>& X, const bool calc_U = true);
  238. template<typename T, typename T1>
  239. inline static bool schur(Mat<std::complex<T> >& U, Mat<std::complex<T> >& S, const Base<std::complex<T>,T1>& X, const bool calc_U = true);
  240. template<typename T>
  241. inline static bool schur(Mat<std::complex<T> >& U, Mat<std::complex<T> >& S, const bool calc_U = true);
  242. //
  243. // syl (solution of the Sylvester equation AX + XB = C)
  244. template<typename eT>
  245. inline static bool syl(Mat<eT>& X, const Mat<eT>& A, const Mat<eT>& B, const Mat<eT>& C);
  246. //
  247. // QZ decomposition
  248. template<typename T, typename T1, typename T2>
  249. inline static bool qz(Mat<T>& A, Mat<T>& B, Mat<T>& vsl, Mat<T>& vsr, const Base<T,T1>& X_expr, const Base<T,T2>& Y_expr, const char mode);
  250. template<typename T, typename T1, typename T2>
  251. inline static bool qz(Mat< std::complex<T> >& A, Mat< std::complex<T> >& B, Mat< std::complex<T> >& vsl, Mat< std::complex<T> >& vsr, const Base< std::complex<T>, T1 >& X_expr, const Base< std::complex<T>, T2 >& Y_expr, const char mode);
  252. //
  253. // rcond
  254. template<typename eT>
  255. inline static eT rcond(Mat<eT>& A);
  256. template<typename T>
  257. inline static T rcond(Mat< std::complex<T> >& A);
  258. template<typename eT>
  259. inline static eT rcond_sympd(Mat<eT>& A, bool& calc_ok);
  260. template<typename T>
  261. inline static T rcond_sympd(Mat< std::complex<T> >& A, bool& calc_ok);
  262. template<typename eT>
  263. inline static eT rcond_trimat(const Mat<eT>& A, const uword layout);
  264. template<typename T>
  265. inline static T rcond_trimat(const Mat< std::complex<T> >& A, const uword layout);
  266. //
  267. // lu_rcond (rcond from pre-computed LU decomposition)
  268. template<typename eT>
  269. inline static eT lu_rcond(const Mat<eT>& A, const eT norm_val);
  270. template<typename T>
  271. inline static T lu_rcond(const Mat< std::complex<T> >& A, const T norm_val);
  272. template<typename eT>
  273. inline static eT lu_rcond_sympd(const Mat<eT>& A, const eT norm_val);
  274. template<typename T>
  275. inline static T lu_rcond_sympd(const Mat< std::complex<T> >& A, const T norm_val);
  276. template<typename eT>
  277. inline static eT lu_rcond_band(const Mat<eT>& AB, const uword KL, const uword KU, const podarray<blas_int>& ipiv, const eT norm_val);
  278. template<typename T>
  279. inline static T lu_rcond_band(const Mat< std::complex<T> >& AB, const uword KL, const uword KU, const podarray<blas_int>& ipiv, const T norm_val);
  280. //
  281. // misc
  282. template<typename T1>
  283. inline static bool crippled_lapack(const Base<typename T1::elem_type, T1>&);
  284. template<typename T1>
  285. inline static typename T1::pod_type epsilon_lapack(const Base<typename T1::elem_type, T1>&);
  286. template<typename eT>
  287. inline static bool rudimentary_sym_check(const Mat<eT>& X);
  288. template<typename T>
  289. inline static bool rudimentary_sym_check(const Mat< std::complex<T> >& X);
  290. };
  291. namespace qz_helper
  292. {
  293. template<typename T> inline blas_int select_lhp(const T* x_ptr, const T* y_ptr, const T* z_ptr);
  294. template<typename T> inline blas_int select_rhp(const T* x_ptr, const T* y_ptr, const T* z_ptr);
  295. template<typename T> inline blas_int select_iuc(const T* x_ptr, const T* y_ptr, const T* z_ptr);
  296. template<typename T> inline blas_int select_ouc(const T* x_ptr, const T* y_ptr, const T* z_ptr);
  297. template<typename T> inline blas_int cx_select_lhp(const std::complex<T>* x_ptr, const std::complex<T>* y_ptr);
  298. template<typename T> inline blas_int cx_select_rhp(const std::complex<T>* x_ptr, const std::complex<T>* y_ptr);
  299. template<typename T> inline blas_int cx_select_iuc(const std::complex<T>* x_ptr, const std::complex<T>* y_ptr);
  300. template<typename T> inline blas_int cx_select_ouc(const std::complex<T>* x_ptr, const std::complex<T>* y_ptr);
  301. template<typename T> inline void_ptr ptr_cast(blas_int (*function)(const T*, const T*, const T*));
  302. template<typename T> inline void_ptr ptr_cast(blas_int (*function)(const std::complex<T>*, const std::complex<T>*));
  303. }
  304. //! @}