kmat 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. checksums.yaml +7 -0
  2. data/.gitattributes +3 -0
  3. data/.gitignore +15 -0
  4. data/CHANGELOG.md +15 -0
  5. data/Gemfile +4 -0
  6. data/LICENSE.md +675 -0
  7. data/README.md +224 -0
  8. data/Rakefile +26 -0
  9. data/bin/console +14 -0
  10. data/bin/setup +8 -0
  11. data/ext/kmat/arith/binary.c +1121 -0
  12. data/ext/kmat/arith/logical.c +332 -0
  13. data/ext/kmat/arith/math.c +34 -0
  14. data/ext/kmat/arith/statistics.c +173 -0
  15. data/ext/kmat/arith/unary.c +165 -0
  16. data/ext/kmat/auto_collect.rb +118 -0
  17. data/ext/kmat/elementwise_function.rb +149 -0
  18. data/ext/kmat/extconf.rb +75 -0
  19. data/ext/kmat/id.txt +80 -0
  20. data/ext/kmat/id_sym.rb +40 -0
  21. data/ext/kmat/km_util.h +97 -0
  22. data/ext/kmat/kmat.h +96 -0
  23. data/ext/kmat/lapack_headers/blas.h +354 -0
  24. data/ext/kmat/lapack_headers/lapacke.h +19455 -0
  25. data/ext/kmat/lapack_headers/lapacke_config.h +119 -0
  26. data/ext/kmat/lapack_headers/lapacke_mangling.h +17 -0
  27. data/ext/kmat/lapack_headers/lapacke_utils.h +579 -0
  28. data/ext/kmat/linalg/dla.c +1629 -0
  29. data/ext/kmat/linalg/linalg.c +267 -0
  30. data/ext/kmat/linalg/norm.c +727 -0
  31. data/ext/kmat/linalg/vla.c +102 -0
  32. data/ext/kmat/linalg/working.c +240 -0
  33. data/ext/kmat/main.c +95 -0
  34. data/ext/kmat/smat/accessor.c +719 -0
  35. data/ext/kmat/smat/array.c +108 -0
  36. data/ext/kmat/smat/boxmuller.c +72 -0
  37. data/ext/kmat/smat/constructer.c +302 -0
  38. data/ext/kmat/smat/convert.c +375 -0
  39. data/ext/kmat/smat/elem.c +171 -0
  40. data/ext/kmat/smat/fund.c +702 -0
  41. data/ext/kmat/smat/share.c +427 -0
  42. data/ext/kmat/smat/smat.c +530 -0
  43. data/ext/kmat/smat/sort.c +1156 -0
  44. data/ext/kmat/sym.txt +34 -0
  45. data/kmat.gemspec +46 -0
  46. data/lib/kmat.rb +20 -0
  47. data/lib/kmat/accessor.rb +164 -0
  48. data/lib/kmat/arith.rb +189 -0
  49. data/lib/kmat/linalg.rb +279 -0
  50. data/lib/kmat/logical.rb +150 -0
  51. data/lib/kmat/misc.rb +122 -0
  52. data/lib/kmat/random.rb +106 -0
  53. data/lib/kmat/statistics.rb +98 -0
  54. data/lib/kmat/version.rb +3 -0
  55. metadata +156 -0
@@ -0,0 +1,119 @@
1
+ /*****************************************************************************
2
+ Copyright (c) 2010, Intel Corp.
3
+ All rights reserved.
4
+
5
+ Redistribution and use in source and binary forms, with or without
6
+ modification, are permitted provided that the following conditions are met:
7
+
8
+ * Redistributions of source code must retain the above copyright notice,
9
+ this list of conditions and the following disclaimer.
10
+ * Redistributions in binary form must reproduce the above copyright
11
+ notice, this list of conditions and the following disclaimer in the
12
+ documentation and/or other materials provided with the distribution.
13
+ * Neither the name of Intel Corporation nor the names of its contributors
14
+ may be used to endorse or promote products derived from this software
15
+ without specific prior written permission.
16
+
17
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
21
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
27
+ THE POSSIBILITY OF SUCH DAMAGE.
28
+ ******************************************************************************
29
+ * Contents: Native C interface to LAPACK
30
+ * Author: Intel Corporation
31
+ * Generated May, 2011
32
+ *****************************************************************************/
33
+
34
+ #ifndef _LAPACKE_CONFIG_H_
35
+ #define _LAPACKE_CONFIG_H_
36
+
37
+ #ifdef __cplusplus
38
+ #if defined(LAPACK_COMPLEX_CPP)
39
+ #include <complex>
40
+ #endif
41
+ extern "C" {
42
+ #endif /* __cplusplus */
43
+
44
+ #include <stdlib.h>
45
+
46
+ #ifndef lapack_int
47
+ #if defined(LAPACK_ILP64)
48
+ #define lapack_int long
49
+ #else
50
+ #define lapack_int int
51
+ #endif
52
+ #endif
53
+
54
+ #ifndef lapack_logical
55
+ #define lapack_logical lapack_int
56
+ #endif
57
+
58
+ #ifndef LAPACK_COMPLEX_CUSTOM
59
+
60
+ #if defined(LAPACK_COMPLEX_STRUCTURE)
61
+
62
+ typedef struct { float real, imag; } _lapack_complex_float;
63
+ typedef struct { double real, imag; } _lapack_complex_double;
64
+ #define lapack_complex_float _lapack_complex_float
65
+ #define lapack_complex_double _lapack_complex_double
66
+ #define lapack_complex_float_real(z) ((z).real)
67
+ #define lapack_complex_float_imag(z) ((z).imag)
68
+ #define lapack_complex_double_real(z) ((z).real)
69
+ #define lapack_complex_double_imag(z) ((z).imag)
70
+
71
+ #elif defined(LAPACK_COMPLEX_C99)
72
+
73
+ #include <complex.h>
74
+ #define lapack_complex_float float _Complex
75
+ #define lapack_complex_double double _Complex
76
+ #define lapack_complex_float_real(z) (creal(z))
77
+ #define lapack_complex_float_imag(z) (cimag(z))
78
+ #define lapack_complex_double_real(z) (creal(z))
79
+ #define lapack_complex_double_imag(z) (cimag(z))
80
+
81
+ #elif defined(LAPACK_COMPLEX_CPP)
82
+
83
+ #define lapack_complex_float std::complex<float>
84
+ #define lapack_complex_double std::complex<double>
85
+ #define lapack_complex_float_real(z) ((z).real())
86
+ #define lapack_complex_float_imag(z) ((z).imag())
87
+ #define lapack_complex_double_real(z) ((z).real())
88
+ #define lapack_complex_double_imag(z) ((z).imag())
89
+
90
+ #else
91
+
92
+ #include <complex.h>
93
+ #define lapack_complex_float float _Complex
94
+ #define lapack_complex_double double _Complex
95
+ #define lapack_complex_float_real(z) (creal(z))
96
+ #define lapack_complex_float_imag(z) (cimag(z))
97
+ #define lapack_complex_double_real(z) (creal(z))
98
+ #define lapack_complex_double_imag(z) (cimag(z))
99
+
100
+ #endif
101
+
102
+ lapack_complex_float lapack_make_complex_float( float re, float im );
103
+ lapack_complex_double lapack_make_complex_double( double re, double im );
104
+
105
+ #endif
106
+
107
+ #ifndef LAPACK_malloc
108
+ #define LAPACK_malloc( size ) malloc( size )
109
+ #endif
110
+
111
+ #ifndef LAPACK_free
112
+ #define LAPACK_free( p ) free( p )
113
+ #endif
114
+
115
+ #ifdef __cplusplus
116
+ }
117
+ #endif /* __cplusplus */
118
+
119
+ #endif /* _LAPACKE_CONFIG_H_ */
@@ -0,0 +1,17 @@
1
+ #ifndef LAPACK_HEADER_INCLUDED
2
+ #define LAPACK_HEADER_INCLUDED
3
+
4
+ #ifndef LAPACK_GLOBAL
5
+ #if defined(LAPACK_GLOBAL_PATTERN_LC) || defined(ADD_)
6
+ #define LAPACK_GLOBAL(lcname,UCNAME) lcname##_
7
+ #elif defined(LAPACK_GLOBAL_PATTERN_UC) || defined(UPPER)
8
+ #define LAPACK_GLOBAL(lcname,UCNAME) UCNAME
9
+ #elif defined(LAPACK_GLOBAL_PATTERN_MC) || defined(NOCHANGE)
10
+ #define LAPACK_GLOBAL(lcname,UCNAME) lcname
11
+ #else
12
+ #define LAPACK_GLOBAL(lcname,UCNAME) lcname##_
13
+ #endif
14
+ #endif
15
+
16
+ #endif
17
+
@@ -0,0 +1,579 @@
1
+ /*****************************************************************************
2
+ Copyright (c) 2014, Intel Corp.
3
+ All rights reserved.
4
+
5
+ Redistribution and use in source and binary forms, with or without
6
+ modification, are permitted provided that the following conditions are met:
7
+
8
+ * Redistributions of source code must retain the above copyright notice,
9
+ this list of conditions and the following disclaimer.
10
+ * Redistributions in binary form must reproduce the above copyright
11
+ notice, this list of conditions and the following disclaimer in the
12
+ documentation and/or other materials provided with the distribution.
13
+ * Neither the name of Intel Corporation nor the names of its contributors
14
+ may be used to endorse or promote products derived from this software
15
+ without specific prior written permission.
16
+
17
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
21
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
27
+ THE POSSIBILITY OF SUCH DAMAGE.
28
+ ******************************************************************************
29
+ * Contents: Native C interface to LAPACK utility functions
30
+ * Author: Intel Corporation
31
+ * Created in January, 2010
32
+ *****************************************************************************/
33
+
34
+ #ifndef _LAPACKE_UTILS_H_
35
+ #define _LAPACKE_UTILS_H_
36
+
37
+ #include "lapacke.h"
38
+
39
+ #ifdef __cplusplus
40
+ extern "C" {
41
+ #endif /* __cplusplus */
42
+
43
+ #ifndef ABS
44
+ #define ABS(x) (((x) < 0) ? -(x) : (x))
45
+ #endif
46
+ #ifndef MAX
47
+ #define MAX(x,y) (((x) > (y)) ? (x) : (y))
48
+ #endif
49
+ #ifndef MIN
50
+ #define MIN(x,y) (((x) < (y)) ? (x) : (y))
51
+ #endif
52
+ #ifndef MAX3
53
+ #define MAX3(x,y,z) (((x) > MAX(y,z)) ? (x) : MAX(y,z))
54
+ #endif
55
+ #ifndef MIN3
56
+ #define MIN3(x,y,z) (((x) < MIN(y,z)) ? (x) : MIN(y,z))
57
+ #endif
58
+
59
+ #define IS_S_NONZERO(x) ( (x) < 0 || (x) > 0 )
60
+ #define IS_D_NONZERO(x) ( (x) < 0 || (x) > 0 )
61
+ #define IS_C_NONZERO(x) ( IS_S_NONZERO(*((float*)&x)) || \
62
+ IS_S_NONZERO(*(((float*)&x)+1)) )
63
+ #define IS_Z_NONZERO(x) ( IS_D_NONZERO(*((double*)&x)) || \
64
+ IS_D_NONZERO(*(((double*)&x)+1)) )
65
+
66
+ /* Error handler */
67
+ void LAPACKE_xerbla( const char *name, lapack_int info );
68
+
69
+ /* Compare two chars (case-insensitive) */
70
+ lapack_logical LAPACKE_lsame( char ca, char cb );
71
+
72
+ /* Functions to convert column-major to row-major 2d arrays and vice versa. */
73
+ void LAPACKE_cgb_trans( int matrix_layout, lapack_int m, lapack_int n,
74
+ lapack_int kl, lapack_int ku,
75
+ const lapack_complex_float *in, lapack_int ldin,
76
+ lapack_complex_float *out, lapack_int ldout );
77
+ void LAPACKE_cge_trans( int matrix_layout, lapack_int m, lapack_int n,
78
+ const lapack_complex_float* in, lapack_int ldin,
79
+ lapack_complex_float* out, lapack_int ldout );
80
+ void LAPACKE_cgg_trans( int matrix_layout, lapack_int m, lapack_int n,
81
+ const lapack_complex_float* in, lapack_int ldin,
82
+ lapack_complex_float* out, lapack_int ldout );
83
+ void LAPACKE_chb_trans( int matrix_layout, char uplo, lapack_int n,
84
+ lapack_int kd,
85
+ const lapack_complex_float *in, lapack_int ldin,
86
+ lapack_complex_float *out, lapack_int ldout );
87
+ void LAPACKE_che_trans( int matrix_layout, char uplo, lapack_int n,
88
+ const lapack_complex_float *in, lapack_int ldin,
89
+ lapack_complex_float *out, lapack_int ldout );
90
+ void LAPACKE_chp_trans( int matrix_layout, char uplo, lapack_int n,
91
+ const lapack_complex_float *in,
92
+ lapack_complex_float *out );
93
+ void LAPACKE_chs_trans( int matrix_layout, lapack_int n,
94
+ const lapack_complex_float *in, lapack_int ldin,
95
+ lapack_complex_float *out, lapack_int ldout );
96
+ void LAPACKE_cpb_trans( int matrix_layout, char uplo, lapack_int n,
97
+ lapack_int kd,
98
+ const lapack_complex_float *in, lapack_int ldin,
99
+ lapack_complex_float *out, lapack_int ldout );
100
+ void LAPACKE_cpf_trans( int matrix_layout, char transr, char uplo,
101
+ lapack_int n, const lapack_complex_float *in,
102
+ lapack_complex_float *out );
103
+ void LAPACKE_cpo_trans( int matrix_layout, char uplo, lapack_int n,
104
+ const lapack_complex_float *in, lapack_int ldin,
105
+ lapack_complex_float *out, lapack_int ldout );
106
+ void LAPACKE_cpp_trans( int matrix_layout, char uplo, lapack_int n,
107
+ const lapack_complex_float *in,
108
+ lapack_complex_float *out );
109
+ void LAPACKE_csp_trans( int matrix_layout, char uplo, lapack_int n,
110
+ const lapack_complex_float *in,
111
+ lapack_complex_float *out );
112
+ void LAPACKE_csy_trans( int matrix_layout, char uplo, lapack_int n,
113
+ const lapack_complex_float *in, lapack_int ldin,
114
+ lapack_complex_float *out, lapack_int ldout );
115
+ void LAPACKE_ctb_trans( int matrix_layout, char uplo, char diag,
116
+ lapack_int n, lapack_int kd,
117
+ const lapack_complex_float *in, lapack_int ldin,
118
+ lapack_complex_float *out, lapack_int ldout );
119
+ void LAPACKE_ctf_trans( int matrix_layout, char transr, char uplo, char diag,
120
+ lapack_int n, const lapack_complex_float *in,
121
+ lapack_complex_float *out );
122
+ void LAPACKE_ctp_trans( int matrix_layout, char uplo, char diag,
123
+ lapack_int n, const lapack_complex_float *in,
124
+ lapack_complex_float *out );
125
+ void LAPACKE_ctr_trans( int matrix_layout, char uplo, char diag, lapack_int n,
126
+ const lapack_complex_float *in, lapack_int ldin,
127
+ lapack_complex_float *out, lapack_int ldout );
128
+
129
+ void LAPACKE_dgb_trans( int matrix_layout, lapack_int m, lapack_int n,
130
+ lapack_int kl, lapack_int ku,
131
+ const double *in, lapack_int ldin,
132
+ double *out, lapack_int ldout );
133
+ void LAPACKE_dge_trans( int matrix_layout, lapack_int m, lapack_int n,
134
+ const double* in, lapack_int ldin,
135
+ double* out, lapack_int ldout );
136
+ void LAPACKE_dgg_trans( int matrix_layout, lapack_int m, lapack_int n,
137
+ const double* in, lapack_int ldin,
138
+ double* out, lapack_int ldout );
139
+ void LAPACKE_dhs_trans( int matrix_layout, lapack_int n,
140
+ const double *in, lapack_int ldin,
141
+ double *out, lapack_int ldout );
142
+ void LAPACKE_dpb_trans( int matrix_layout, char uplo, lapack_int n,
143
+ lapack_int kd,
144
+ const double *in, lapack_int ldin,
145
+ double *out, lapack_int ldout );
146
+ void LAPACKE_dpf_trans( int matrix_layout, char transr, char uplo,
147
+ lapack_int n, const double *in,
148
+ double *out );
149
+ void LAPACKE_dpo_trans( int matrix_layout, char uplo, lapack_int n,
150
+ const double *in, lapack_int ldin,
151
+ double *out, lapack_int ldout );
152
+ void LAPACKE_dpp_trans( int matrix_layout, char uplo, lapack_int n,
153
+ const double *in,
154
+ double *out );
155
+ void LAPACKE_dsb_trans( int matrix_layout, char uplo, lapack_int n,
156
+ lapack_int kd,
157
+ const double *in, lapack_int ldin,
158
+ double *out, lapack_int ldout );
159
+ void LAPACKE_dsp_trans( int matrix_layout, char uplo, lapack_int n,
160
+ const double *in,
161
+ double *out );
162
+ void LAPACKE_dsy_trans( int matrix_layout, char uplo, lapack_int n,
163
+ const double *in, lapack_int ldin,
164
+ double *out, lapack_int ldout );
165
+ void LAPACKE_dtb_trans( int matrix_layout, char uplo, char diag,
166
+ lapack_int n, lapack_int kd,
167
+ const double *in, lapack_int ldin,
168
+ double *out, lapack_int ldout );
169
+ void LAPACKE_dtf_trans( int matrix_layout, char transr, char uplo, char diag,
170
+ lapack_int n, const double *in,
171
+ double *out );
172
+ void LAPACKE_dtp_trans( int matrix_layout, char uplo, char diag,
173
+ lapack_int n, const double *in,
174
+ double *out );
175
+ void LAPACKE_dtr_trans( int matrix_layout, char uplo, char diag, lapack_int n,
176
+ const double *in, lapack_int ldin,
177
+ double *out, lapack_int ldout );
178
+
179
+ void LAPACKE_sgb_trans( int matrix_layout, lapack_int m, lapack_int n,
180
+ lapack_int kl, lapack_int ku,
181
+ const float *in, lapack_int ldin,
182
+ float *out, lapack_int ldout );
183
+ void LAPACKE_sge_trans( int matrix_layout, lapack_int m, lapack_int n,
184
+ const float* in, lapack_int ldin,
185
+ float* out, lapack_int ldout );
186
+ void LAPACKE_sgg_trans( int matrix_layout, lapack_int m, lapack_int n,
187
+ const float* in, lapack_int ldin,
188
+ float* out, lapack_int ldout );
189
+ void LAPACKE_shs_trans( int matrix_layout, lapack_int n,
190
+ const float *in, lapack_int ldin,
191
+ float *out, lapack_int ldout );
192
+ void LAPACKE_spb_trans( int matrix_layout, char uplo, lapack_int n,
193
+ lapack_int kd,
194
+ const float *in, lapack_int ldin,
195
+ float *out, lapack_int ldout );
196
+ void LAPACKE_spf_trans( int matrix_layout, char transr, char uplo,
197
+ lapack_int n, const float *in,
198
+ float *out );
199
+ void LAPACKE_spo_trans( int matrix_layout, char uplo, lapack_int n,
200
+ const float *in, lapack_int ldin,
201
+ float *out, lapack_int ldout );
202
+ void LAPACKE_spp_trans( int matrix_layout, char uplo, lapack_int n,
203
+ const float *in,
204
+ float *out );
205
+ void LAPACKE_ssb_trans( int matrix_layout, char uplo, lapack_int n,
206
+ lapack_int kd,
207
+ const float *in, lapack_int ldin,
208
+ float *out, lapack_int ldout );
209
+ void LAPACKE_ssp_trans( int matrix_layout, char uplo, lapack_int n,
210
+ const float *in,
211
+ float *out );
212
+ void LAPACKE_ssy_trans( int matrix_layout, char uplo, lapack_int n,
213
+ const float *in, lapack_int ldin,
214
+ float *out, lapack_int ldout );
215
+ void LAPACKE_stb_trans( int matrix_layout, char uplo, char diag,
216
+ lapack_int n, lapack_int kd,
217
+ const float *in, lapack_int ldin,
218
+ float *out, lapack_int ldout );
219
+ void LAPACKE_stf_trans( int matrix_layout, char transr, char uplo, char diag,
220
+ lapack_int n, const float *in,
221
+ float *out );
222
+ void LAPACKE_stp_trans( int matrix_layout, char uplo, char diag,
223
+ lapack_int n, const float *in,
224
+ float *out );
225
+ void LAPACKE_str_trans( int matrix_layout, char uplo, char diag, lapack_int n,
226
+ const float *in, lapack_int ldin,
227
+ float *out, lapack_int ldout );
228
+
229
+ void LAPACKE_zgb_trans( int matrix_layout, lapack_int m, lapack_int n,
230
+ lapack_int kl, lapack_int ku,
231
+ const lapack_complex_double *in, lapack_int ldin,
232
+ lapack_complex_double *out, lapack_int ldout );
233
+ void LAPACKE_zge_trans( int matrix_layout, lapack_int m, lapack_int n,
234
+ const lapack_complex_double* in, lapack_int ldin,
235
+ lapack_complex_double* out, lapack_int ldout );
236
+ void LAPACKE_zgg_trans( int matrix_layout, lapack_int m, lapack_int n,
237
+ const lapack_complex_double* in, lapack_int ldin,
238
+ lapack_complex_double* out, lapack_int ldout );
239
+ void LAPACKE_zhb_trans( int matrix_layout, char uplo, lapack_int n,
240
+ lapack_int kd,
241
+ const lapack_complex_double *in, lapack_int ldin,
242
+ lapack_complex_double *out, lapack_int ldout );
243
+ void LAPACKE_zhe_trans( int matrix_layout, char uplo, lapack_int n,
244
+ const lapack_complex_double *in, lapack_int ldin,
245
+ lapack_complex_double *out, lapack_int ldout );
246
+ void LAPACKE_zhp_trans( int matrix_layout, char uplo, lapack_int n,
247
+ const lapack_complex_double *in,
248
+ lapack_complex_double *out );
249
+ void LAPACKE_zhs_trans( int matrix_layout, lapack_int n,
250
+ const lapack_complex_double *in, lapack_int ldin,
251
+ lapack_complex_double *out, lapack_int ldout );
252
+ void LAPACKE_zpb_trans( int matrix_layout, char uplo, lapack_int n,
253
+ lapack_int kd,
254
+ const lapack_complex_double *in, lapack_int ldin,
255
+ lapack_complex_double *out, lapack_int ldout );
256
+ void LAPACKE_zpf_trans( int matrix_layout, char transr, char uplo,
257
+ lapack_int n, const lapack_complex_double *in,
258
+ lapack_complex_double *out );
259
+ void LAPACKE_zpo_trans( int matrix_layout, char uplo, lapack_int n,
260
+ const lapack_complex_double *in, lapack_int ldin,
261
+ lapack_complex_double *out, lapack_int ldout );
262
+ void LAPACKE_zpp_trans( int matrix_layout, char uplo, lapack_int n,
263
+ const lapack_complex_double *in,
264
+ lapack_complex_double *out );
265
+ void LAPACKE_zsp_trans( int matrix_layout, char uplo, lapack_int n,
266
+ const lapack_complex_double *in,
267
+ lapack_complex_double *out );
268
+ void LAPACKE_zsy_trans( int matrix_layout, char uplo, lapack_int n,
269
+ const lapack_complex_double *in, lapack_int ldin,
270
+ lapack_complex_double *out, lapack_int ldout );
271
+ void LAPACKE_ztb_trans( int matrix_layout, char uplo, char diag,
272
+ lapack_int n, lapack_int kd,
273
+ const lapack_complex_double *in, lapack_int ldin,
274
+ lapack_complex_double *out, lapack_int ldout );
275
+ void LAPACKE_ztf_trans( int matrix_layout, char transr, char uplo, char diag,
276
+ lapack_int n, const lapack_complex_double *in,
277
+ lapack_complex_double *out );
278
+ void LAPACKE_ztp_trans( int matrix_layout, char uplo, char diag,
279
+ lapack_int n, const lapack_complex_double *in,
280
+ lapack_complex_double *out );
281
+ void LAPACKE_ztr_trans( int matrix_layout, char uplo, char diag, lapack_int n,
282
+ const lapack_complex_double *in, lapack_int ldin,
283
+ lapack_complex_double *out, lapack_int ldout );
284
+
285
+ /* NaN checkers */
286
+ #define LAPACK_SISNAN( x ) ( x != x )
287
+ #define LAPACK_DISNAN( x ) ( x != x )
288
+ #define LAPACK_CISNAN( x ) ( LAPACK_SISNAN(*((float*) &x)) || \
289
+ LAPACK_SISNAN(*(((float*) &x)+1)) )
290
+ #define LAPACK_ZISNAN( x ) ( LAPACK_DISNAN(*((double*)&x)) || \
291
+ LAPACK_DISNAN(*(((double*)&x)+1)) )
292
+
293
+ /* NaN checkers for vectors */
294
+ lapack_logical LAPACKE_c_nancheck( lapack_int n,
295
+ const lapack_complex_float *x,
296
+ lapack_int incx );
297
+ lapack_logical LAPACKE_d_nancheck( lapack_int n,
298
+ const double *x,
299
+ lapack_int incx );
300
+ lapack_logical LAPACKE_s_nancheck( lapack_int n,
301
+ const float *x,
302
+ lapack_int incx );
303
+ lapack_logical LAPACKE_z_nancheck( lapack_int n,
304
+ const lapack_complex_double *x,
305
+ lapack_int incx );
306
+ /* NaN checkers for matrices */
307
+ lapack_logical LAPACKE_cgb_nancheck( int matrix_layout, lapack_int m,
308
+ lapack_int n, lapack_int kl,
309
+ lapack_int ku,
310
+ const lapack_complex_float *ab,
311
+ lapack_int ldab );
312
+ lapack_logical LAPACKE_cge_nancheck( int matrix_layout, lapack_int m,
313
+ lapack_int n,
314
+ const lapack_complex_float *a,
315
+ lapack_int lda );
316
+ lapack_logical LAPACKE_cgg_nancheck( int matrix_layout, lapack_int m,
317
+ lapack_int n,
318
+ const lapack_complex_float *a,
319
+ lapack_int lda );
320
+ lapack_logical LAPACKE_cgt_nancheck( lapack_int n,
321
+ const lapack_complex_float *dl,
322
+ const lapack_complex_float *d,
323
+ const lapack_complex_float *du );
324
+ lapack_logical LAPACKE_chb_nancheck( int matrix_layout, char uplo,
325
+ lapack_int n, lapack_int kd,
326
+ const lapack_complex_float* ab,
327
+ lapack_int ldab );
328
+ lapack_logical LAPACKE_che_nancheck( int matrix_layout, char uplo,
329
+ lapack_int n,
330
+ const lapack_complex_float *a,
331
+ lapack_int lda );
332
+ lapack_logical LAPACKE_chp_nancheck( lapack_int n,
333
+ const lapack_complex_float *ap );
334
+ lapack_logical LAPACKE_chs_nancheck( int matrix_layout, lapack_int n,
335
+ const lapack_complex_float *a,
336
+ lapack_int lda );
337
+ lapack_logical LAPACKE_cpb_nancheck( int matrix_layout, char uplo,
338
+ lapack_int n, lapack_int kd,
339
+ const lapack_complex_float* ab,
340
+ lapack_int ldab );
341
+ lapack_logical LAPACKE_cpf_nancheck( lapack_int n,
342
+ const lapack_complex_float *a );
343
+ lapack_logical LAPACKE_cpo_nancheck( int matrix_layout, char uplo,
344
+ lapack_int n,
345
+ const lapack_complex_float *a,
346
+ lapack_int lda );
347
+ lapack_logical LAPACKE_cpp_nancheck( lapack_int n,
348
+ const lapack_complex_float *ap );
349
+ lapack_logical LAPACKE_cpt_nancheck( lapack_int n,
350
+ const float *d,
351
+ const lapack_complex_float *e );
352
+ lapack_logical LAPACKE_csp_nancheck( lapack_int n,
353
+ const lapack_complex_float *ap );
354
+ lapack_logical LAPACKE_cst_nancheck( lapack_int n,
355
+ const lapack_complex_float *d,
356
+ const lapack_complex_float *e );
357
+ lapack_logical LAPACKE_csy_nancheck( int matrix_layout, char uplo,
358
+ lapack_int n,
359
+ const lapack_complex_float *a,
360
+ lapack_int lda );
361
+ lapack_logical LAPACKE_ctb_nancheck( int matrix_layout, char uplo, char diag,
362
+ lapack_int n, lapack_int kd,
363
+ const lapack_complex_float* ab,
364
+ lapack_int ldab );
365
+ lapack_logical LAPACKE_ctf_nancheck( int matrix_layout, char transr,
366
+ char uplo, char diag,
367
+ lapack_int n,
368
+ const lapack_complex_float *a );
369
+ lapack_logical LAPACKE_ctp_nancheck( int matrix_layout, char uplo, char diag,
370
+ lapack_int n,
371
+ const lapack_complex_float *ap );
372
+ lapack_logical LAPACKE_ctr_nancheck( int matrix_layout, char uplo, char diag,
373
+ lapack_int n,
374
+ const lapack_complex_float *a,
375
+ lapack_int lda );
376
+
377
+ lapack_logical LAPACKE_dgb_nancheck( int matrix_layout, lapack_int m,
378
+ lapack_int n, lapack_int kl,
379
+ lapack_int ku,
380
+ const double *ab,
381
+ lapack_int ldab );
382
+ lapack_logical LAPACKE_dge_nancheck( int matrix_layout, lapack_int m,
383
+ lapack_int n,
384
+ const double *a,
385
+ lapack_int lda );
386
+ lapack_logical LAPACKE_dgg_nancheck( int matrix_layout, lapack_int m,
387
+ lapack_int n,
388
+ const double *a,
389
+ lapack_int lda );
390
+ lapack_logical LAPACKE_dgt_nancheck( lapack_int n,
391
+ const double *dl,
392
+ const double *d,
393
+ const double *du );
394
+ lapack_logical LAPACKE_dhs_nancheck( int matrix_layout, lapack_int n,
395
+ const double *a,
396
+ lapack_int lda );
397
+ lapack_logical LAPACKE_dpb_nancheck( int matrix_layout, char uplo,
398
+ lapack_int n, lapack_int kd,
399
+ const double* ab,
400
+ lapack_int ldab );
401
+ lapack_logical LAPACKE_dpf_nancheck( lapack_int n,
402
+ const double *a );
403
+ lapack_logical LAPACKE_dpo_nancheck( int matrix_layout, char uplo,
404
+ lapack_int n,
405
+ const double *a,
406
+ lapack_int lda );
407
+ lapack_logical LAPACKE_dpp_nancheck( lapack_int n,
408
+ const double *ap );
409
+ lapack_logical LAPACKE_dpt_nancheck( lapack_int n,
410
+ const double *d,
411
+ const double *e );
412
+ lapack_logical LAPACKE_dsb_nancheck( int matrix_layout, char uplo,
413
+ lapack_int n, lapack_int kd,
414
+ const double* ab,
415
+ lapack_int ldab );
416
+ lapack_logical LAPACKE_dsp_nancheck( lapack_int n,
417
+ const double *ap );
418
+ lapack_logical LAPACKE_dst_nancheck( lapack_int n,
419
+ const double *d,
420
+ const double *e );
421
+ lapack_logical LAPACKE_dsy_nancheck( int matrix_layout, char uplo,
422
+ lapack_int n,
423
+ const double *a,
424
+ lapack_int lda );
425
+ lapack_logical LAPACKE_dtb_nancheck( int matrix_layout, char uplo, char diag,
426
+ lapack_int n, lapack_int kd,
427
+ const double* ab,
428
+ lapack_int ldab );
429
+ lapack_logical LAPACKE_dtf_nancheck( int matrix_layout, char transr,
430
+ char uplo, char diag,
431
+ lapack_int n,
432
+ const double *a );
433
+ lapack_logical LAPACKE_dtp_nancheck( int matrix_layout, char uplo, char diag,
434
+ lapack_int n,
435
+ const double *ap );
436
+ lapack_logical LAPACKE_dtr_nancheck( int matrix_layout, char uplo, char diag,
437
+ lapack_int n,
438
+ const double *a,
439
+ lapack_int lda );
440
+
441
+ lapack_logical LAPACKE_sgb_nancheck( int matrix_layout, lapack_int m,
442
+ lapack_int n, lapack_int kl,
443
+ lapack_int ku,
444
+ const float *ab,
445
+ lapack_int ldab );
446
+ lapack_logical LAPACKE_sge_nancheck( int matrix_layout, lapack_int m,
447
+ lapack_int n,
448
+ const float *a,
449
+ lapack_int lda );
450
+ lapack_logical LAPACKE_sgg_nancheck( int matrix_layout, lapack_int m,
451
+ lapack_int n,
452
+ const float *a,
453
+ lapack_int lda );
454
+ lapack_logical LAPACKE_sgt_nancheck( lapack_int n,
455
+ const float *dl,
456
+ const float *d,
457
+ const float *du );
458
+ lapack_logical LAPACKE_shs_nancheck( int matrix_layout, lapack_int n,
459
+ const float *a,
460
+ lapack_int lda );
461
+ lapack_logical LAPACKE_spb_nancheck( int matrix_layout, char uplo,
462
+ lapack_int n, lapack_int kd,
463
+ const float* ab,
464
+ lapack_int ldab );
465
+ lapack_logical LAPACKE_spf_nancheck( lapack_int n,
466
+ const float *a );
467
+ lapack_logical LAPACKE_spo_nancheck( int matrix_layout, char uplo,
468
+ lapack_int n,
469
+ const float *a,
470
+ lapack_int lda );
471
+ lapack_logical LAPACKE_spp_nancheck( lapack_int n,
472
+ const float *ap );
473
+ lapack_logical LAPACKE_spt_nancheck( lapack_int n,
474
+ const float *d,
475
+ const float *e );
476
+ lapack_logical LAPACKE_ssb_nancheck( int matrix_layout, char uplo,
477
+ lapack_int n, lapack_int kd,
478
+ const float* ab,
479
+ lapack_int ldab );
480
+ lapack_logical LAPACKE_ssp_nancheck( lapack_int n,
481
+ const float *ap );
482
+ lapack_logical LAPACKE_sst_nancheck( lapack_int n,
483
+ const float *d,
484
+ const float *e );
485
+ lapack_logical LAPACKE_ssy_nancheck( int matrix_layout, char uplo,
486
+ lapack_int n,
487
+ const float *a,
488
+ lapack_int lda );
489
+ lapack_logical LAPACKE_stb_nancheck( int matrix_layout, char uplo, char diag,
490
+ lapack_int n, lapack_int kd,
491
+ const float* ab,
492
+ lapack_int ldab );
493
+ lapack_logical LAPACKE_stf_nancheck( int matrix_layout, char transr,
494
+ char uplo, char diag,
495
+ lapack_int n,
496
+ const float *a );
497
+ lapack_logical LAPACKE_stp_nancheck( int matrix_layout, char uplo, char diag,
498
+ lapack_int n,
499
+ const float *ap );
500
+ lapack_logical LAPACKE_str_nancheck( int matrix_layout, char uplo, char diag,
501
+ lapack_int n,
502
+ const float *a,
503
+ lapack_int lda );
504
+
505
+ lapack_logical LAPACKE_zgb_nancheck( int matrix_layout, lapack_int m,
506
+ lapack_int n, lapack_int kl,
507
+ lapack_int ku,
508
+ const lapack_complex_double *ab,
509
+ lapack_int ldab );
510
+ lapack_logical LAPACKE_zge_nancheck( int matrix_layout, lapack_int m,
511
+ lapack_int n,
512
+ const lapack_complex_double *a,
513
+ lapack_int lda );
514
+ lapack_logical LAPACKE_zgg_nancheck( int matrix_layout, lapack_int m,
515
+ lapack_int n,
516
+ const lapack_complex_double *a,
517
+ lapack_int lda );
518
+ lapack_logical LAPACKE_zgt_nancheck( lapack_int n,
519
+ const lapack_complex_double *dl,
520
+ const lapack_complex_double *d,
521
+ const lapack_complex_double *du );
522
+ lapack_logical LAPACKE_zhb_nancheck( int matrix_layout, char uplo,
523
+ lapack_int n, lapack_int kd,
524
+ const lapack_complex_double* ab,
525
+ lapack_int ldab );
526
+ lapack_logical LAPACKE_zhe_nancheck( int matrix_layout, char uplo,
527
+ lapack_int n,
528
+ const lapack_complex_double *a,
529
+ lapack_int lda );
530
+ lapack_logical LAPACKE_zhp_nancheck( lapack_int n,
531
+ const lapack_complex_double *ap );
532
+ lapack_logical LAPACKE_zhs_nancheck( int matrix_layout, lapack_int n,
533
+ const lapack_complex_double *a,
534
+ lapack_int lda );
535
+ lapack_logical LAPACKE_zpb_nancheck( int matrix_layout, char uplo,
536
+ lapack_int n, lapack_int kd,
537
+ const lapack_complex_double* ab,
538
+ lapack_int ldab );
539
+ lapack_logical LAPACKE_zpf_nancheck( lapack_int n,
540
+ const lapack_complex_double *a );
541
+ lapack_logical LAPACKE_zpo_nancheck( int matrix_layout, char uplo,
542
+ lapack_int n,
543
+ const lapack_complex_double *a,
544
+ lapack_int lda );
545
+ lapack_logical LAPACKE_zpp_nancheck( lapack_int n,
546
+ const lapack_complex_double *ap );
547
+ lapack_logical LAPACKE_zpt_nancheck( lapack_int n,
548
+ const double *d,
549
+ const lapack_complex_double *e );
550
+ lapack_logical LAPACKE_zsp_nancheck( lapack_int n,
551
+ const lapack_complex_double *ap );
552
+ lapack_logical LAPACKE_zst_nancheck( lapack_int n,
553
+ const lapack_complex_double *d,
554
+ const lapack_complex_double *e );
555
+ lapack_logical LAPACKE_zsy_nancheck( int matrix_layout, char uplo,
556
+ lapack_int n,
557
+ const lapack_complex_double *a,
558
+ lapack_int lda );
559
+ lapack_logical LAPACKE_ztb_nancheck( int matrix_layout, char uplo, char diag,
560
+ lapack_int n, lapack_int kd,
561
+ const lapack_complex_double* ab,
562
+ lapack_int ldab );
563
+ lapack_logical LAPACKE_ztf_nancheck( int matrix_layout, char transr,
564
+ char uplo, char diag,
565
+ lapack_int n,
566
+ const lapack_complex_double *a );
567
+ lapack_logical LAPACKE_ztp_nancheck( int matrix_layout, char uplo, char diag,
568
+ lapack_int n,
569
+ const lapack_complex_double *ap );
570
+ lapack_logical LAPACKE_ztr_nancheck( int matrix_layout, char uplo, char diag,
571
+ lapack_int n,
572
+ const lapack_complex_double *a,
573
+ lapack_int lda );
574
+
575
+ #ifdef __cplusplus
576
+ }
577
+ #endif /* __cplusplus */
578
+
579
+ #endif /* _LAPACKE_UTILS_H_ */