hpl_auxil.h 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  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_AUXIL_H
  47. #define HPL_AUXIL_H
  48. /*
  49. * ---------------------------------------------------------------------
  50. * Include files
  51. * ---------------------------------------------------------------------
  52. */
  53. #include "hpl_misc.h"
  54. #include "hpl_blas.h"
  55. /*
  56. * ---------------------------------------------------------------------
  57. * typedef definitions
  58. * ---------------------------------------------------------------------
  59. */
  60. typedef enum
  61. { HPL_NORM_A = 800, HPL_NORM_1 = 801, HPL_NORM_I = 802 } HPL_T_NORM;
  62. typedef enum
  63. {
  64. HPL_MACH_EPS = 900, /* relative machine precision */
  65. HPL_MACH_SFMIN = 901, /* safe minimum st 1/sfmin does not overflow */
  66. HPL_MACH_BASE = 902, /* base = base of the machine */
  67. HPL_MACH_PREC = 903, /* prec = eps*base */
  68. HPL_MACH_MLEN = 904, /* number of (base) digits in the mantissa */
  69. HPL_MACH_RND = 905, /* 1.0 if rounding occurs in addition */
  70. HPL_MACH_EMIN = 906, /* min exponent before (gradual) underflow */
  71. HPL_MACH_RMIN = 907, /* underflow threshold base**(emin-1) */
  72. HPL_MACH_EMAX = 908, /* largest exponent before overflow */
  73. HPL_MACH_RMAX = 909 /* overflow threshold - (base**emax)*(1-eps) */
  74. } HPL_T_MACH;
  75. /*
  76. * ---------------------------------------------------------------------
  77. * Function prototypes
  78. * ---------------------------------------------------------------------
  79. */
  80. void HPL_fprintf
  81. STDC_ARGS( (
  82. FILE *,
  83. const char *,
  84. ...
  85. ) );
  86. void HPL_warn
  87. STDC_ARGS( (
  88. FILE *,
  89. int,
  90. const char *,
  91. const char *,
  92. ...
  93. ) );
  94. void HPL_abort
  95. STDC_ARGS( (
  96. int,
  97. const char *,
  98. const char *,
  99. ...
  100. ) );
  101. void HPL_dlacpy
  102. STDC_ARGS( (
  103. const int,
  104. const int,
  105. const double *,
  106. const int,
  107. double *,
  108. const int
  109. ) );
  110. void HPL_dlatcpy
  111. STDC_ARGS( (
  112. const int,
  113. const int,
  114. const double *,
  115. const int,
  116. double *,
  117. const int
  118. ) );
  119. void HPL_dlaprnt
  120. STDC_ARGS( (
  121. const int,
  122. const int,
  123. double *,
  124. const int,
  125. const int,
  126. const int,
  127. const char *
  128. ) );
  129. double HPL_dlange
  130. STDC_ARGS( (
  131. const HPL_T_NORM,
  132. const int,
  133. const int,
  134. const double *,
  135. const int
  136. ) );
  137. double HPL_dlamch
  138. STDC_ARGS( (
  139. const HPL_T_MACH
  140. ) );
  141. #endif
  142. /*
  143. * End of hpl_auxil.h
  144. */