INGOR
Loading...
Searching...
No Matches
ytMatrix.h
1/*
2 math/ytMatrix.{h,c} : Matrix routines.
3 Copyright (C) 2018, Yoshinori Tamada <tamada A T ytlab.jp>
4 All rights reserved.
5
6 Redistribution and use in source and binary forms, with or without
7 modification, are permitted provided that the following conditions
8 are met:
9
10 * Redistributions of source code must retain the above copyright
11 notice, this list of conditions and the following disclaimer.
12
13 * Redistributions in binary form must reproduce the above copyright
14 notice, this list of conditions and the following disclaimer in
15 the documentation and/or other materials provided with the
16 distribution.
17
18 * Neither the name of Kyoto University nor the names of its
19 contributors may be used to endorse or promote products derived
20 from this software without specific prior written permission.
21
22 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
25 FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
26 COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
27 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
28 BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
30 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
32 ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33 POSSIBILITY OF SUCH DAMAGE.
34*/
35
36#ifndef __YTLIB_MATRIX_H
37#define __YTLIB_MATRIX_H
38
39/* Predefined constants */
40extern int ytMatrix_INT_ONE;
41extern int ytMatrix_INT_ZERO;
42extern double ytMatrix_DOUBLE_ONE;
43extern double ytMatrix_DOUBLE_ZERO;
44extern double ytMatrix_DOUBLE_MINUS_ONE;/* Minus One (-1)*/
45
46#include <stdio.h>
47
48void ytMatrix_dsyaxpy(const int n, double alpha, double * X, double * Y);
50int ytMatrix_dsyev_work_size(int n);
51void ytMatrix_print(FILE * fp, const double * X, int m, int n, int N);
52void ytMatrix_printTrans(FILE * fp, const double * X, int m, int n, int N);
53void ytMatrix_vprint(FILE * fp, const double * X, int n, int N);
54
55/* ------------------------------------------------------------------------- */
56/* Mac OS X vecLib */
57/* ------------------------------------------------------------------------- */
58#if defined(USE_MACOSX_VECLIB)
59
60#include <Accelerate/Accelerate.h>
61
62typedef __CLPK_integer ytMatrix_int;
63typedef __CLPK_doublereal ytMatrix_double;
64
65#ifndef USE_CBLAS_ROUTINES
66#define USE_CBLAS_ROUTINES
67#endif
68
69/* LAPACK Routines */
70extern char * ytMatrix_LU;
71extern char * ytMatrix_LL;
72extern char * ytMatrix_LN;
73extern char * ytMatrix_LV;
74extern char * ytMatrix_L_NO_TRANS;
75extern char * ytMatrix_L_TRANS;
76extern char * ytMatrix_LA;
77extern char * ytMatrix_LO;
78
79#define ytMatrix_dsytrf(UL,N,A,LA,IP,W,LW,IF) dsytrf_(UL,N,A,LA,IP,W,LW,IF)
80#define ytMatrix_dsytri(UL,N,A,LA,IP,W,IF) dsytri_(UL,N,A,LA,IP,W,IF)
81#define ytMatrix_dsytrs(UL,N,M,A,LA,IP,B,LB,IF) dsytrs_(UL,N,M,A,LA,IP,B,LB,IF)
82#define ytMatrix_dsyev(JB,UL,N,A,LA,W,WO,LW,IF) dsyev_(JB,UL,N,A,LA,W,WO,LW,IF)
83#define ytMatrix_dgesv(N,M,A,LDA,IP,B,LDB,IF) dgesv_(N,M,A,LDA,IP,B,LDB,IF)
84#define ytMatrix_dgetrf(M,N,A,LA,IP,IF) dgetrf_(M,N,A,LA,IP,IF)
85#define ytMatrix_dgetri(N,A,LA,IP,W,LW,IF) dgetri_(N,A,LA,IP,W,LW,IF)
86#define ytMatrix_dgetrs(TA,N,M,A,LA,IP,B,LB,IF) dgetrs_(TA,N,M,A,LA,IP,B,LB,IF)
87#define ytMatrix_dgesvd(JU,JV,M,N,A,LA,S,U,LU,VT,LVT,W,LW,IF) \
88 dgesvd_(JU,JV,M,N,A,LA,S,U,LU,VT,LVT,W,LW,IF)
89
90/* USE_MACOSX_VECLIB */
91
92/* ------------------------------------------------------------------------- */
93/* INTEL MKL */
94/* ------------------------------------------------------------------------- */
95#elif defined(USE_INTEL_MKL)
96
97#include <mkl_blas.h>
98#include <mkl_lapack.h>
99#include <mkl_lapacke.h>
100
101typedef MKL_INT ytMatrix_int;
102typedef double ytMatrix_double;
103
104extern char * ytMatrix_T;
105extern char * ytMatrix_N;
106extern char * ytMatrix_C;
107extern char * ytMatrix_NO_TRANS;
108extern char * ytMatrix_TRANS;
109extern char * ytMatrix_U;
110extern char * ytMatrix_L;
111
112/* CBLAS ROUTINE */
113/* Level 1 BLAS */
114#define ytMatrix_dscal(N,ALPHA,X,IX) dscal(N,ALPHA,X,IX)
115#define ytMatrix_dcopy(N,X,IX,Y,IY) dcopy(N,X,IX,Y,IY)
116#define ytMatrix_daxpy(N,ALPHA,X,IX,Y,IY) daxpy(N,ALPHA,X,IX,Y,IY)
117#define ytMatrix_ddot(N,X,IX,Y,IY) ddot(N,X,IX,Y,IY)
118#define ytMatrix_dnrm2(N,X,IX) dnrm2(N,X,IX)
119#define ytMatrix_dasum(N,X,IX) dasum(N,X,IX)
120
121/* Level 2 BLAS */
122#define ytMatrix_dgemv(T,M,N,ALPHA,A,LDA,X,IX,BETA,Y,IY)\
123 dgemv(T,M,N,ALPHA,A,LDA,X,IX,BETA,Y,IY)
124#define ytMatrix_dsymv(UL,N,ALPHA,A,LA,X,IX,BETA,Y,IY)\
125 dsymv(UL,N,ALPHA,A,LA,X,IX,BETA,Y,IY)
126#define ytMatrix_dger(M,N,ALPHA,X,IX,Y,IY,A,LDA)\
127 dger(M,N,ALPHA,X,IX,Y,IY,A,LDA)
128
129/* Level 3 BLAS */
130#define ytMatrix_dgemm(TA,TB,M,N,K,ALPHA,A,LA,B,LB,BETA,C,LC) \
131 dgemm(TA,TB,M,N,K,ALPHA,A,LA,B,LB,BETA,C,LC)
132#define ytMatrix_dsyrk(UL,T,N,K,ALPHA,A,LDA,BETA,C,LC) \
133 dsyrk(UL,T,N,K,ALPHA,A,LDA,BETA,C,LC)
134
135/* LAPACK ROUTINE */
136extern char * ytMatrix_LU;
137extern char * ytMatrix_LL;
138extern char * ytMatrix_LN;
139extern char * ytMatrix_LV;
140extern char * ytMatrix_L_NO_TRANS;
141extern char * ytMatrix_L_TRANS;
142extern char * ytMatrix_LA;
143extern char * ytMatrix_LO;
144
145#define ytMatrix_dsytrf(UL,N,A,LA,IP,W,LW,IF) \
146 LAPACKE_dsytrf(LAPACK_COL_MAJOR, *(UL), *(N), A, *(LA), IP)
147#define ytMatrix_dsytri(UL,N,A,LA,IP,W,IF) \
148 LAPACKE_dsytri(LAPACK_COL_MAJOR, *(UL), *(N), A, *(LA), IP)
149//#define ytMatrix_dsytri(UL,N,A,LA,IP,W,IF) dsytri_(UL,N,A,LA,IP,W,IF)
150//#define ytMatrix_dsyev(JB,UL,N,A,LA,W,WO,LW,IF)\
151// dsyev_(JB,UL,N,A,LA,W,WO,LW,IF)
152#define ytMatrix_dsytrs(UL,N,M,A,LA,IP,B,LB,IF) \
153 LAPACKE_dsytrs(LAPACK_COL_MAJOR,*(UL),*(N),*(M),A,*(LA),IP,B,*(LB))
154#define ytMatrix_dsyev(JB,UL,N,A,LA,W,WO,LW,IF) \
155 LAPACKE_dsyev(LAPACK_COL_MAJOR,*(JB),*(UL),*(N),A,*(LA),W)
156#define ytMatrix_dgesv(N,M,A,LDA,IP,B,LDB,IF) dgesv_(N,M,A,LDA,IP,B,LDB,IF)
157#define ytMatrix_dgetrf(M,N,A,LA,IP,IF) dgetrf_(M,N,A,LA,IP,IF)
158#define ytMatrix_dgetri(N,A,LA,IP,W,LW,IF) dgetri_(N,A,LA,IP,W,LW,IF)
159#define ytMatrix_dgetrs(TA,N,M,A,LA,IP,B,LB,IF) dgetrs_(TA,N,M,A,LA,IP,B,LB,IF)
160#define ytMatrix_dgesvd(JU,JV,M,N,A,LA,S,U,LU,VT,LVT,W,LW,IF) \
161 dgesvd_(JU,JV,M,N,A,LA,S,U,LU,VT,LVT,W,LW,IF)
162
163
164/* ------------------------------------------------------------------------- */
165/* FUJITSU FCC/SSL */
166/* ------------------------------------------------------------------------- */
167#elif defined(USE_FUJITSU_FCC_SSL)
168
169#include <fj_lapack.h>
170
171typedef int ytMatrix_int;
172typedef double ytMatrix_double;
173
174extern char * ytMatrix_T;
175extern char * ytMatrix_N;
176extern char * ytMatrix_C;
177extern char * ytMatrix_NO_TRANS;
178extern char * ytMatrix_TRANS;
179extern char * ytMatrix_U;
180extern char * ytMatrix_L;
181extern char * ytMatrix_LEFT;
182extern char * ytMatrix_RIGHT;
183
184/* BLAS Routines */
185/* Level 1 BLAS */
186#define ytMatrix_dscal(N,ALPHA,X,IX) dscal_(N,ALPHA,X,IX)
187#define ytMatrix_dcopy(N,X,IX,Y,IY) dcopy_(N,X,IX,Y,IY)
188#define ytMatrix_daxpy(N,ALPHA,X,IX,Y,IY) daxpy_(N,ALPHA,X,IX,Y,IY)
189#define ytMatrix_ddot(N,X,IX,Y,IY) ddot_(N,X,IX,Y,IY)
190#define ytMatrix_dnrm2(N,X,IX) dnrm2_(N,X,IX)
191#define ytMatrix_dasum(N,X,IX) dasum_(N,X,IX)
192
193/* Level 2 BLAS */
194#define ytMatrix_dgemv(T,M,N,ALPHA,A,LDA,X,IX,BETA,Y,IY)\
195 dgemv_(T,M,N,ALPHA,A,LDA,X,IX,BETA,Y,IY,1)
196#define ytMatrix_dsymv(UL,N,ALPHA,A,LA,X,IX,BETA,Y,IY)\
197 dsymv_(UL,N,ALPHA,A,LA,X,IX,BETA,Y,IY,1)
198#define ytMatrix_dger(M,N,ALPHA,X,IX,Y,IY,A,LDA)\
199 dger_(M,N,ALPHA,X,IX,Y,IY,A,LDA)
200
201/* Level 3 BLAS */
202
203#define ytMatrix_dgemm(TA,TB,M,N,K,ALPHA,A,LA,B,LB,BETA,C,LC) \
204 dgemm_(TA,TB,M,N,K,ALPHA,A,LA,B,LB,BETA,C,LC,1,1)
205#define ytMatrix_dsymm(LR,UL,M,N,ALPHA,A,LA,B,LB,BETA,C,LC) \
206 dsymm_(LR,UL,M,N,ALPHA,A,LA,B,LB,BETA,C,LC,1,1)
207#define ytMatrix_dsyrk(UL,T,N,K,ALPHA,A,LDA,BETA,C,LC) \
208 dsyrk_(UL,T,N,K,ALPHA,A,LDA,BETA,C,LC,1,1)
209
210/* LAPACK Routines */
211extern char * ytMatrix_LU;
212extern char * ytMatrix_LL;
213extern char * ytMatrix_LN;
214extern char * ytMatrix_LV;
215extern char * ytMatrix_L_NO_TRANS;
216extern char * ytMatrix_L_TRANS;
217extern char * ytMatrix_LA;
218extern char * ytMatrix_LO;
219
220#define ytMatrix_dsytrf(UL,N,A,LA,IP,W,IW,IF) dsytrf_(UL,N,A,LA,IP,W,IW,IF,1)
221#define ytMatrix_dsytri(UL,N,A,LA,IP,W,IF) dsytri_(UL,N,A,LA,IP,W,IF,1)
222#define ytMatrix_dsytrs(UL,N,M,A,LA,IP,B,LB,IF) dsytrs_(UL,N,M,A,LA,IP,B,LB,IF,1)
223#define ytMatrix_dsyev(JB,UL,N,A,LA,W,WO,LW,IF) dsyev_(JB,UL,N,A,LA,W,WO,LW,IF,1,1)
224#define ytMatrix_dgesv(N,M,A,LDA,IP,B,LDB,IF) dgesv_(N,M,A,LDA,IP,B,LDB,IF)
225#define ytMatrix_dgetrf(M,N,A,LA,IP,IF) dgetrf_(M,N,A,LA,IP,IF)
226#define ytMatrix_dgetri(N,A,LA,IP,W,LW,IF) dgetri_(N,A,LA,IP,W,LW,IF)
227#define ytMatrix_dgetrs(TA,N,M,A,LA,IP,B,LB,IF) dgetrs_(TA,N,M,A,LA,IP,B,LB,IF,1)
228#define ytMatrix_dgesvd(JU,JV,M,N,A,LA,S,U,LU,VT,LVT,W,LW,IF) \
229 dgesvd_(JU,JV,M,N,A,LA,S,U,LU,VT,LVT,W,LW,IF,1,1)
230
231/* End of FUJITSU FCC/SSL */
232
233
234#endif
235
236/* -- Arm Performace Libraries --------------------------------------------- */
237#if defined(USE_ARMPL)
238#include <armpl.h>
239#ifndef USE_CBLAS
240#define USE_CBLAS
241#endif
242
243extern char * ytMatrix_LU;
244extern char * ytMatrix_LL;
245extern char * ytMatrix_LN;
246extern char * ytMatrix_LV;
247extern char * ytMatrix_L_NO_TRANS;
248extern char * ytMatrix_L_TRANS;
249extern char * ytMatrix_LA;
250extern char * ytMatrix_LO;
251
252#define ytMatrix_dsytrf(UL,N,A,LA,IP,W,LW,IF) dsytrf_(UL,N,A,LA,IP,W,LW,IF)
253#define ytMatrix_dsytri(UL,N,A,LA,IP,W,IF) dsytri_(UL,N,A,LA,IP,W,IF)
254#define ytMatrix_dsytrs(UL,N,M,A,LA,IP,B,LB,IF) dsytrs_(UL,N,M,A,LA,IP,B,LB,IF)
255#define ytMatrix_dsyev(JB,UL,N,A,LA,W,WO,LW,IF) dsyev_(JB,UL,N,A,LA,W,WO,LW,IF)
256#define ytMatrix_dgesv(N,M,A,LDA,IP,B,LDB,IF) dgesv_(N,M,A,LDA,IP,B,LDB,IF)
257#define ytMatrix_dgetrf(M,N,A,LA,IP,IF) dgetrf_(M,N,A,LA,IP,IF)
258#define ytMatrix_dgetri(N,A,LA,IP,W,LW,IF) dgetri_(N,A,LA,IP,W,LW,IF)
259#define ytMatrix_dgetrs(TA,N,M,A,LA,IP,B,LB,IF) dgetrs_(TA,N,M,A,LA,IP,B,LB,IF)
260#define ytMatrix_dgesvd(JU,JV,M,N,A,LA,S,U,LU,VT,LVT,W,LW,IF) \
261 dgesvd_(JU,JV,M,N,A,LA,S,U,LU,VT,LVT,W,LW,IF)
262
263#endif
264
265/* -- CBLAS ---------------------------------------------------------------- */
266#if defined(USE_CBLAS)
267#include <cblas.h>
268#ifndef USE_CBLAS_ROUTINES
269#define USE_CBLAS_ROUTINES
270#endif /* ifndef USE_CBLAS_ROUTINES */
271#endif /* USE_CBLAS */
272
273#if defined(USE_CBLAS_ROUTINES)
274
275#define ytMatrix_T CblasTrans
276#define ytMatrix_N CblasNoTrans
277#define ytMatrix_C CblasConjTrans
278
279#define ytMatrix_NO_TRANS CblasNoTrans
280#define ytMatrix_TRANS CblasTrans
281
282#define ytMatrix_U CblasUpper
283#define ytMatrix_L CblasLower
284
285#define ytMatrix_LEFT CblasLeft
286#define ytMatrix_RIGHT CblasRight
287
288#define ytMatrix_dscal(N,ALPHA,X,IX) cblas_dscal(*N,*ALPHA,X,*IX)
289#define ytMatrix_dcopy(N,X,IX,Y,IY) cblas_dcopy(*N,X,*IX,Y,*IY)
290#define ytMatrix_daxpy(N,ALPHA,X,IX,Y,IY) cblas_daxpy(*N,*ALPHA,X,*IX,Y,*IY)
291#define ytMatrix_ddot(N,X,IX,Y,IY) cblas_ddot(*N,X,*IX,Y,*IY)
292#define ytMatrix_dnrm2(N,X,IX) cblas_dnrm2(*N,X,*IX)
293#define ytMatrix_dasum(N,X,IX) cblas_dasum(*N,X,*IX)
294
295/* Level 2 BLAS */
296#define ytMatrix_dgemv(T,M,N,ALPHA,A,LDA,X,IX,BETA,Y,IY)\
297 cblas_dgemv(CblasColMajor,T,*M,*N,*ALPHA,A,*LDA,X,*IX,*BETA,Y,*IY)
298#define ytMatrix_dsymv(UL,N,ALPHA,A,LA,X,IX,BETA,Y,IY)\
299 cblas_dsymv(CblasColMajor,UL,*N,*ALPHA,A,*LA,X,*IX,*BETA,Y,*IY)
300#define ytMatrix_dger(M,N,ALPHA,X,IX,Y,IY,A,LDA)\
301 cblas_dger(CblasColMajor,*M,*N,*ALPHA,X,*IX,Y,*IY,A,*LDA)
302
303/* Level 3 BLAS */
304#define ytMatrix_dgemm(TA,TB,M,N,K,ALPHA,A,LA,B,LB,BETA,C,LC) \
305 cblas_dgemm(CblasColMajor,TA,TB,*M,*N,*K,*ALPHA,A,*LA,B,*LB,*BETA,C,*LC)
306#define ytMatrix_dsymm(LR,UL,M,N,ALPHA,A,LA,B,LB,BETA,C,LC) \
307 cblas_dsymm(CblasColMajor,LR,UL,*M,*N,*ALPHA,A,*LA,B,*LB,*BETA,C,*LC)
308#define ytMatrix_dsyrk(UL,T,N,K,ALPHA,A,LDA,BETA,C,LC) \
309 cblas_dsyrk(CblasColMajor,UL,T,*N,*K,*ALPHA,A,*LDA,*BETA,C,*LC)
310
311#endif /* USE_CBLAS_ROUTINES */
312
313#ifdef USE_LAPACKE
314
315#include <lapacke.h>
316extern char * ytMatrix_LU;
317extern char * ytMatrix_LL;
318extern char * ytMatrix_LN;
319extern char * ytMatrix_LV;
320extern char * ytMatrix_L_NO_TRANS;
321extern char * ytMatrix_L_TRANS;
322extern char * ytMatrix_LA;
323extern char * ytMatrix_LO;
324
325/* LAPACK ROUTINES */
326#define ytMatrix_dsytrf(UL,N,A,LA,IP,W,LW,IF) \
327 LAPACKE_dsytrf(LAPACK_COL_MAJOR, *(UL), *(N), A, *(LA), IP)
328#define ytMatrix_dsytri(UL,N,A,LA,IP,W,IF) \
329 LAPACKE_dsytri(LAPACK_COL_MAJOR, *(UL), *(N), A, *(LA), IP)
330#define ytMatrix_dsyev(JB,UL,N,A,LA,W,WO,LW,IF) \
331 LAPACKE_dsyev(LAPACK_COL_MAJOR,*(JB),*(UL),*(N),A,*(LA),W)
332#endif /* End of USE_LAPACKE */
333
334/* ------------------------------------------------------------------------- */
335
336#ifdef USE_LAPACK
337/* LAPACK Routines */
338extern char * ytMatrix_LU;
339extern char * ytMatrix_LL;
340extern char * ytMatrix_LN;
341extern char * ytMatrix_LV;
342extern char * ytMatrix_L_NO_TRANS;
343extern char * ytMatrix_L_TRANS;
344extern char * ytMatrix_LA;
345extern char * ytMatrix_LO;
346
347void dsytrf_(char * UL, int * N, double * A, int * ldA, int * IP, double * WORK, int * LWORK, int * info);
348void dsytri_(char * UL, int * N, double * A, int * ldA, int * IP, double * W, int * info);
349void dsyev_(char * JB, char * UL, int * N, double * A, int * ldA, double * W,
350 double * WORK, int * LWORK, int * info);
351void dgesv_(int * N, int * M, double * A, int * ldA, int * IP, double * B, int * ldB, int * info);
352void dgetrf_(int * M, int * N, double * A, int * ldA, int * IP, int * info);
353void dgetri_(int * N, double * A, int * ldA, int * IP, double * WORK, int * LWORK, int * info);
354void dgetrs_(char * TA, int * N, int * M, double * A, int * ldA, int * IP,
355 double * B, int * ldB, int * info);
356void dgesvd_(char * JU, char * JV, int * M, int * N, double * A, int * ldA, double * S,
357 double * U, int * ldU, double * VT, int * ldVT, double * WORK, int * LWORK, int * info);
358
359#define ytMatrix_dsytrf(UL,N,A,LA,IP,W,LW,IF) dsytrf_(UL,N,A,LA,IP,W,LW,IF)
360#define ytMatrix_dsytri(UL,N,A,LA,IP,W,IF) dsytri_(UL,N,A,LA,IP,W,IF)
361#define ytMatrix_dsytrs(UL,N,M,A,LA,IP,B,LB,IF) dsytrs_(UL,N,M,A,LA,IP,B,LB,IF)
362#define ytMatrix_dsyev(JB,UL,N,A,LA,W,WO,LW,IF) dsyev_(JB,UL,N,A,LA,W,WO,LW,IF)
363#define ytMatrix_dgesv(N,M,A,LDA,IP,B,LDB,IF) dgesv_(N,M,A,LDA,IP,B,LDB,IF)
364#define ytMatrix_dgetrf(M,N,A,LA,IP,IF) dgetrf_(M,N,A,LA,IP,IF)
365#define ytMatrix_dgetri(N,A,LA,IP,W,LW,IF) dgetri_(N,A,LA,IP,W,LW,IF)
366#define ytMatrix_dgetrs(TA,N,M,A,LA,IP,B,LB,IF) dgetrs_(TA,N,M,A,LA,IP,B,LB,IF)
367#define ytMatrix_dgesvd(JU,JV,M,N,A,LA,S,U,LU,VT,LVT,W,LW,IF) \
368 dgesvd_(JU,JV,M,N,A,LA,S,U,LU,VT,LVT,W,LW,IF)
369
370#endif /* USE_LAPACK */
371
372
373
374#endif /* __YTLIB_MATRIX_H */
int ytMatrix_dsytrf_work_size(int n)
Returns the optimal working memory size for dsytrf routine.
Definition ytMatrix.c:117
void ytMatrix_print(FILE *fp, const double *X, int m, int n, int N)
Prints the matrix.
Definition ytMatrix.c:162
void ytMatrix_printTrans(FILE *fp, const double *X, int m, int n, int N)
Prints the transposed or row-major matrix.
Definition ytMatrix.c:179
@ ytMatrix_L_NO_TRANS
No transpose.
Definition ytMatrix.c:90
@ ytMatrix_L_TRANS
Transpose.
Definition ytMatrix.c:93