hpl_pgesv.h 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347
  1. /*
  2. * -- High Performance Computing Linpack Benchmark (HPL)
  3. * HPL - 2.0 - September 10, 2008
  4. * Antoine P. Petitet
  5. * University of Tennessee, Knoxville
  6. * Innovative Computing Laboratory
  7. * (C) Copyright 2000-2008 All Rights Reserved
  8. *
  9. * -- Copyright notice and Licensing terms:
  10. *
  11. * Redistribution and use in source and binary forms, with or without
  12. * modification, are permitted provided that the following conditions
  13. * are met:
  14. *
  15. * 1. Redistributions of source code must retain the above copyright
  16. * notice, this list of conditions and the following disclaimer.
  17. *
  18. * 2. Redistributions in binary form must reproduce the above copyright
  19. * notice, this list of conditions, and the following disclaimer in the
  20. * documentation and/or other materials provided with the distribution.
  21. *
  22. * 3. All advertising materials mentioning features or use of this
  23. * software must display the following acknowledgement:
  24. * This product includes software developed at the University of
  25. * Tennessee, Knoxville, Innovative Computing Laboratory.
  26. *
  27. * 4. The name of the University, the name of the Laboratory, or the
  28. * names of its contributors may not be used to endorse or promote
  29. * products derived from this software without specific written
  30. * permission.
  31. *
  32. * -- Disclaimer:
  33. *
  34. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  35. * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  36. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  37. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY
  38. * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  39. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  40. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  41. * DATA OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  42. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  43. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  44. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  45. */
  46. #ifndef HPL_PGESV_H
  47. #define HPL_PGESV_H
  48. /*
  49. * ---------------------------------------------------------------------
  50. * Include files
  51. * ---------------------------------------------------------------------
  52. */
  53. #include "hpl_misc.h"
  54. #include "hpl_blas.h"
  55. #include "hpl_auxil.h"
  56. #include "hpl_pmisc.h"
  57. #include "hpl_grid.h"
  58. #include "hpl_comm.h"
  59. #include "hpl_pauxil.h"
  60. #include "hpl_panel.h"
  61. #include "hpl_pfact.h"
  62. /*
  63. * ---------------------------------------------------------------------
  64. * #typedefs and data structures
  65. * ---------------------------------------------------------------------
  66. */
  67. typedef enum
  68. {
  69. HPL_SWAP00 = 451, /* Use HPL_pdlaswp00 */
  70. HPL_SWAP01 = 452, /* Use HPL_pdlaswp01 */
  71. HPL_SW_MIX = 453, /* Use HPL_pdlaswp00_ for small number of */
  72. /* columns, and HPL_pdlaswp01_ otherwise. */
  73. HPL_NO_SWP = 499
  74. } HPL_T_SWAP;
  75. typedef struct HPL_S_palg
  76. {
  77. HPL_T_TOP btopo; /* row broadcast topology */
  78. int depth; /* look-ahead depth */
  79. int nbdiv; /* recursive division factor */
  80. int nbmin; /* recursion stopping criterium */
  81. HPL_T_FACT pfact; /* panel fact variant */
  82. HPL_T_FACT rfact; /* recursive fact variant */
  83. HPL_T_PFA_FUN pffun; /* panel fact function ptr */
  84. HPL_T_RFA_FUN rffun; /* recursive fact function ptr */
  85. HPL_T_UPD_FUN upfun; /* update function */
  86. HPL_T_SWAP fswap; /* Swapping algorithm */
  87. int fsthr; /* Swapping threshold */
  88. int equil; /* Equilibration */
  89. int align; /* data alignment constant */
  90. } HPL_T_palg;
  91. typedef struct HPL_S_pmat
  92. {
  93. #ifdef HPL_CALL_VSIPL
  94. vsip_block_d * block;
  95. #endif
  96. double * A; /* pointer to local piece of A */
  97. double * X; /* pointer to solution vector */
  98. int n; /* global problem size */
  99. int nb; /* blocking factor */
  100. int ld; /* local leading dimension */
  101. int mp; /* local number of rows */
  102. int nq; /* local number of columns */
  103. int info; /* computational flag */
  104. } HPL_T_pmat;
  105. /*
  106. * ---------------------------------------------------------------------
  107. * #define macro constants
  108. * ---------------------------------------------------------------------
  109. */
  110. #define MSGID_BEGIN_PFACT 1001 /* message id ranges */
  111. #define MSGID_END_PFACT 2000
  112. #define MSGID_BEGIN_FACT 2001
  113. #define MSGID_END_FACT 3000
  114. #define MSGID_BEGIN_PTRSV 3001
  115. #define MSGID_END_PTRSV 4000
  116. #define MSGID_BEGIN_COLL 9001
  117. #define MSGID_END_COLL 10000
  118. /*
  119. * ---------------------------------------------------------------------
  120. * #define macros definitions
  121. * ---------------------------------------------------------------------
  122. */
  123. #define MNxtMgid( id_, beg_, end_ ) \
  124. (( (id_)+1 > (end_) ? (beg_) : (id_)+1 ))
  125. /*
  126. * ---------------------------------------------------------------------
  127. * Function prototypes
  128. * ---------------------------------------------------------------------
  129. */
  130. void HPL_pipid
  131. STDC_ARGS( (
  132. HPL_T_panel *,
  133. int *,
  134. int *
  135. ) );
  136. void HPL_plindx0
  137. STDC_ARGS( (
  138. HPL_T_panel *,
  139. const int,
  140. int *,
  141. int *,
  142. int *,
  143. int *
  144. ) );
  145. void HPL_pdlaswp00N
  146. STDC_ARGS( (
  147. HPL_T_panel *,
  148. int *,
  149. HPL_T_panel *,
  150. const int
  151. ) );
  152. void HPL_pdlaswp00T
  153. STDC_ARGS( (
  154. HPL_T_panel *,
  155. int *,
  156. HPL_T_panel *,
  157. const int
  158. ) );
  159. void HPL_perm
  160. STDC_ARGS( (
  161. const int,
  162. int *,
  163. int *,
  164. int *
  165. ) );
  166. void HPL_logsort
  167. STDC_ARGS( (
  168. const int,
  169. const int,
  170. int *,
  171. int *,
  172. int *
  173. ) );
  174. void HPL_plindx10
  175. STDC_ARGS( (
  176. HPL_T_panel *,
  177. const int,
  178. const int *,
  179. int *,
  180. int *,
  181. int *
  182. ) );
  183. void HPL_plindx1
  184. STDC_ARGS( (
  185. HPL_T_panel *,
  186. const int,
  187. const int *,
  188. int *,
  189. int *,
  190. int *,
  191. int *,
  192. int *,
  193. int *,
  194. int *,
  195. int *
  196. ) );
  197. void HPL_spreadN
  198. STDC_ARGS( (
  199. HPL_T_panel *,
  200. int *,
  201. HPL_T_panel *,
  202. const enum HPL_SIDE,
  203. const int,
  204. double *,
  205. const int,
  206. const int,
  207. const int *,
  208. const int *,
  209. const int *
  210. ) );
  211. void HPL_spreadT
  212. STDC_ARGS( (
  213. HPL_T_panel *,
  214. int *,
  215. HPL_T_panel *,
  216. const enum HPL_SIDE,
  217. const int,
  218. double *,
  219. const int,
  220. const int,
  221. const int *,
  222. const int *,
  223. const int *
  224. ) );
  225. void HPL_equil
  226. STDC_ARGS( (
  227. HPL_T_panel *,
  228. int *,
  229. HPL_T_panel *,
  230. const enum HPL_TRANS,
  231. const int,
  232. double *,
  233. const int,
  234. int *,
  235. const int *,
  236. const int *,
  237. int *
  238. ) );
  239. void HPL_rollN
  240. STDC_ARGS( (
  241. HPL_T_panel *,
  242. int *,
  243. HPL_T_panel *,
  244. const int,
  245. double *,
  246. const int,
  247. const int *,
  248. const int *,
  249. const int *
  250. ) );
  251. void HPL_rollT
  252. STDC_ARGS( (
  253. HPL_T_panel *,
  254. int *,
  255. HPL_T_panel *,
  256. const int,
  257. double *,
  258. const int,
  259. const int *,
  260. const int *,
  261. const int *
  262. ) );
  263. void HPL_pdlaswp01N
  264. STDC_ARGS( (
  265. HPL_T_panel *,
  266. int *,
  267. HPL_T_panel *,
  268. const int
  269. ) );
  270. void HPL_pdlaswp01T
  271. STDC_ARGS( (
  272. HPL_T_panel *,
  273. int *,
  274. HPL_T_panel *,
  275. const int
  276. ) );
  277. void HPL_pdupdateNN
  278. STDC_ARGS( (
  279. HPL_T_panel *,
  280. int *,
  281. HPL_T_panel *,
  282. const int
  283. ) );
  284. void HPL_pdupdateNT
  285. STDC_ARGS( (
  286. HPL_T_panel *,
  287. int *,
  288. HPL_T_panel *,
  289. const int
  290. ) );
  291. void HPL_pdupdateTN
  292. STDC_ARGS( (
  293. HPL_T_panel *,
  294. int *,
  295. HPL_T_panel *,
  296. const int
  297. ) );
  298. void HPL_pdupdateTT
  299. STDC_ARGS( (
  300. HPL_T_panel *,
  301. int *,
  302. HPL_T_panel *,
  303. const int
  304. ) );
  305. void HPL_pdgesv0
  306. STDC_ARGS( (
  307. HPL_T_grid *,
  308. HPL_T_palg *,
  309. HPL_T_pmat *
  310. ) );
  311. void HPL_pdgesvK1
  312. STDC_ARGS( (
  313. HPL_T_grid *,
  314. HPL_T_palg *,
  315. HPL_T_pmat *
  316. ) );
  317. void HPL_pdgesvK2
  318. STDC_ARGS( (
  319. HPL_T_grid *,
  320. HPL_T_palg *,
  321. HPL_T_pmat *
  322. ) );
  323. void HPL_pdgesv
  324. STDC_ARGS( (
  325. HPL_T_grid *,
  326. HPL_T_palg *,
  327. HPL_T_pmat *
  328. ) );
  329. void HPL_pdtrsv
  330. STDC_ARGS( (
  331. HPL_T_grid *,
  332. HPL_T_pmat *
  333. ) );
  334. #endif
  335. /*
  336. * End of hpl_pgesv.h
  337. */