00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef __PHYSSIM_CBLAS_H__
00010 #define __PHYSSIM_CBLAS_H__
00011 #include <stddef.h>
00012
00013 #undef __BEGIN_DECLS
00014 #undef __END_DECLS
00015 #ifdef __cplusplus
00016 #include <iostream>
00017 #include <cmath>
00018 #define __BEGIN_DECLS extern "C" {
00019 #define __END_DECLS }
00020 #else
00021 #define __BEGIN_DECLS
00022 #define __END_DECLS
00023 #endif
00024
00025 __BEGIN_DECLS
00026
00027
00028
00029
00030 #define CBLAS_INDEX size_t
00031
00032 enum CBLAS_ORDER {CblasRowMajor=101, CblasColMajor=102};
00033 enum CBLAS_TRANSPOSE {CblasNoTrans=111, CblasTrans=112, CblasConjTrans=113};
00034 enum CBLAS_UPLO {CblasUpper=121, CblasLower=122};
00035 enum CBLAS_DIAG {CblasNonUnit=131, CblasUnit=132};
00036 enum CBLAS_SIDE {CblasLeft=141, CblasRight=142};
00037
00038
00039
00040
00041
00042
00043 float cblas_sdsdot(const int N, const float alpha, const float *X,
00044 const int incX, const float *Y, const int incY);
00045 double cblas_dsdot(const int N, const float *X, const int incX, const float *Y,
00046 const int incY);
00047 float cblas_sdot(const int N, const float *X, const int incX,
00048 const float *Y, const int incY);
00049 double cblas_ddot(const int N, const double *X, const int incX,
00050 const double *Y, const int incY);
00051
00052
00053
00054
00055 void cblas_cdotu_sub(const int N, const void *X, const int incX,
00056 const void *Y, const int incY, void *dotu);
00057 void cblas_cdotc_sub(const int N, const void *X, const int incX,
00058 const void *Y, const int incY, void *dotc);
00059
00060 void cblas_zdotu_sub(const int N, const void *X, const int incX,
00061 const void *Y, const int incY, void *dotu);
00062 void cblas_zdotc_sub(const int N, const void *X, const int incX,
00063 const void *Y, const int incY, void *dotc);
00064
00065
00066
00067
00068
00069 float cblas_snrm2(const int N, const float *X, const int incX);
00070 float cblas_sasum(const int N, const float *X, const int incX);
00071
00072 double cblas_dnrm2(const int N, const double *X, const int incX);
00073 double cblas_dasum(const int N, const double *X, const int incX);
00074
00075 float cblas_scnrm2(const int N, const void *X, const int incX);
00076 float cblas_scasum(const int N, const void *X, const int incX);
00077
00078 double cblas_dznrm2(const int N, const void *X, const int incX);
00079 double cblas_dzasum(const int N, const void *X, const int incX);
00080
00081
00082
00083
00084
00085 CBLAS_INDEX cblas_isamax(const int N, const float *X, const int incX);
00086 CBLAS_INDEX cblas_idamax(const int N, const double *X, const int incX);
00087 CBLAS_INDEX cblas_icamax(const int N, const void *X, const int incX);
00088 CBLAS_INDEX cblas_izamax(const int N, const void *X, const int incX);
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099 void cblas_sswap(const int N, float *X, const int incX,
00100 float *Y, const int incY);
00101 void cblas_scopy(const int N, const float *X, const int incX,
00102 float *Y, const int incY);
00103 void cblas_saxpy(const int N, const float alpha, const float *X,
00104 const int incX, float *Y, const int incY);
00105
00106 void cblas_dswap(const int N, double *X, const int incX,
00107 double *Y, const int incY);
00108 void cblas_dcopy(const int N, const double *X, const int incX,
00109 double *Y, const int incY);
00110 void cblas_daxpy(const int N, const double alpha, const double *X,
00111 const int incX, double *Y, const int incY);
00112
00113 void cblas_cswap(const int N, void *X, const int incX,
00114 void *Y, const int incY);
00115 void cblas_ccopy(const int N, const void *X, const int incX,
00116 void *Y, const int incY);
00117 void cblas_caxpy(const int N, const void *alpha, const void *X,
00118 const int incX, void *Y, const int incY);
00119
00120 void cblas_zswap(const int N, void *X, const int incX,
00121 void *Y, const int incY);
00122 void cblas_zcopy(const int N, const void *X, const int incX,
00123 void *Y, const int incY);
00124 void cblas_zaxpy(const int N, const void *alpha, const void *X,
00125 const int incX, void *Y, const int incY);
00126
00127
00128
00129
00130
00131 void cblas_srotg(float *a, float *b, float *c, float *s);
00132 void cblas_srotmg(float *d1, float *d2, float *b1, const float b2, float *P);
00133 void cblas_srot(const int N, float *X, const int incX,
00134 float *Y, const int incY, const float c, const float s);
00135 void cblas_srotm(const int N, float *X, const int incX,
00136 float *Y, const int incY, const float *P);
00137
00138 void cblas_drotg(double *a, double *b, double *c, double *s);
00139 void cblas_drotmg(double *d1, double *d2, double *b1, const double b2, double *P);
00140 void cblas_drot(const int N, double *X, const int incX,
00141 double *Y, const int incY, const double c, const double s);
00142 void cblas_drotm(const int N, double *X, const int incX,
00143 double *Y, const int incY, const double *P);
00144
00145
00146
00147
00148
00149 void cblas_sscal(const int N, const float alpha, float *X, const int incX);
00150 void cblas_dscal(const int N, const double alpha, double *X, const int incX);
00151 void cblas_cscal(const int N, const void *alpha, void *X, const int incX);
00152 void cblas_zscal(const int N, const void *alpha, void *X, const int incX);
00153 void cblas_csscal(const int N, const float alpha, void *X, const int incX);
00154 void cblas_zdscal(const int N, const double alpha, void *X, const int incX);
00155
00156
00157
00158
00159
00160
00161
00162
00163
00164
00165 void cblas_sgemv(const enum CBLAS_ORDER order,
00166 const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
00167 const float alpha, const float *A, const int lda,
00168 const float *X, const int incX, const float beta,
00169 float *Y, const int incY);
00170 void cblas_sgbmv(const enum CBLAS_ORDER order,
00171 const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
00172 const int KL, const int KU, const float alpha,
00173 const float *A, const int lda, const float *X,
00174 const int incX, const float beta, float *Y, const int incY);
00175 void cblas_strmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
00176 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
00177 const int N, const float *A, const int lda,
00178 float *X, const int incX);
00179 void cblas_stbmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
00180 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
00181 const int N, const int K, const float *A, const int lda,
00182 float *X, const int incX);
00183 void cblas_stpmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
00184 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
00185 const int N, const float *Ap, float *X, const int incX);
00186 void cblas_strsv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
00187 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
00188 const int N, const float *A, const int lda, float *X,
00189 const int incX);
00190 void cblas_stbsv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
00191 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
00192 const int N, const int K, const float *A, const int lda,
00193 float *X, const int incX);
00194 void cblas_stpsv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
00195 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
00196 const int N, const float *Ap, float *X, const int incX);
00197
00198 void cblas_dgemv(const enum CBLAS_ORDER order,
00199 const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
00200 const double alpha, const double *A, const int lda,
00201 const double *X, const int incX, const double beta,
00202 double *Y, const int incY);
00203 void cblas_dgbmv(const enum CBLAS_ORDER order,
00204 const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
00205 const int KL, const int KU, const double alpha,
00206 const double *A, const int lda, const double *X,
00207 const int incX, const double beta, double *Y, const int incY);
00208 void cblas_dtrmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
00209 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
00210 const int N, const double *A, const int lda,
00211 double *X, const int incX);
00212 void cblas_dtbmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
00213 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
00214 const int N, const int K, const double *A, const int lda,
00215 double *X, const int incX);
00216 void cblas_dtpmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
00217 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
00218 const int N, const double *Ap, double *X, const int incX);
00219 void cblas_dtrsv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
00220 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
00221 const int N, const double *A, const int lda, double *X,
00222 const int incX);
00223 void cblas_dtbsv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
00224 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
00225 const int N, const int K, const double *A, const int lda,
00226 double *X, const int incX);
00227 void cblas_dtpsv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
00228 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
00229 const int N, const double *Ap, double *X, const int incX);
00230
00231 void cblas_cgemv(const enum CBLAS_ORDER order,
00232 const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
00233 const void *alpha, const void *A, const int lda,
00234 const void *X, const int incX, const void *beta,
00235 void *Y, const int incY);
00236 void cblas_cgbmv(const enum CBLAS_ORDER order,
00237 const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
00238 const int KL, const int KU, const void *alpha,
00239 const void *A, const int lda, const void *X,
00240 const int incX, const void *beta, void *Y, const int incY);
00241 void cblas_ctrmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
00242 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
00243 const int N, const void *A, const int lda,
00244 void *X, const int incX);
00245 void cblas_ctbmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
00246 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
00247 const int N, const int K, const void *A, const int lda,
00248 void *X, const int incX);
00249 void cblas_ctpmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
00250 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
00251 const int N, const void *Ap, void *X, const int incX);
00252 void cblas_ctrsv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
00253 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
00254 const int N, const void *A, const int lda, void *X,
00255 const int incX);
00256 void cblas_ctbsv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
00257 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
00258 const int N, const int K, const void *A, const int lda,
00259 void *X, const int incX);
00260 void cblas_ctpsv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
00261 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
00262 const int N, const void *Ap, void *X, const int incX);
00263
00264 void cblas_zgemv(const enum CBLAS_ORDER order,
00265 const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
00266 const void *alpha, const void *A, const int lda,
00267 const void *X, const int incX, const void *beta,
00268 void *Y, const int incY);
00269 void cblas_zgbmv(const enum CBLAS_ORDER order,
00270 const enum CBLAS_TRANSPOSE TransA, const int M, const int N,
00271 const int KL, const int KU, const void *alpha,
00272 const void *A, const int lda, const void *X,
00273 const int incX, const void *beta, void *Y, const int incY);
00274 void cblas_ztrmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
00275 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
00276 const int N, const void *A, const int lda,
00277 void *X, const int incX);
00278 void cblas_ztbmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
00279 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
00280 const int N, const int K, const void *A, const int lda,
00281 void *X, const int incX);
00282 void cblas_ztpmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
00283 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
00284 const int N, const void *Ap, void *X, const int incX);
00285 void cblas_ztrsv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
00286 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
00287 const int N, const void *A, const int lda, void *X,
00288 const int incX);
00289 void cblas_ztbsv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
00290 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
00291 const int N, const int K, const void *A, const int lda,
00292 void *X, const int incX);
00293 void cblas_ztpsv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
00294 const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag,
00295 const int N, const void *Ap, void *X, const int incX);
00296
00297
00298
00299
00300
00301 void cblas_ssymv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
00302 const int N, const float alpha, const float *A,
00303 const int lda, const float *X, const int incX,
00304 const float beta, float *Y, const int incY);
00305 void cblas_ssbmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
00306 const int N, const int K, const float alpha, const float *A,
00307 const int lda, const float *X, const int incX,
00308 const float beta, float *Y, const int incY);
00309 void cblas_sspmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
00310 const int N, const float alpha, const float *Ap,
00311 const float *X, const int incX,
00312 const float beta, float *Y, const int incY);
00313 void cblas_sger(const enum CBLAS_ORDER order, const int M, const int N,
00314 const float alpha, const float *X, const int incX,
00315 const float *Y, const int incY, float *A, const int lda);
00316 void cblas_ssyr(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
00317 const int N, const float alpha, const float *X,
00318 const int incX, float *A, const int lda);
00319 void cblas_sspr(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
00320 const int N, const float alpha, const float *X,
00321 const int incX, float *Ap);
00322 void cblas_ssyr2(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
00323 const int N, const float alpha, const float *X,
00324 const int incX, const float *Y, const int incY, float *A,
00325 const int lda);
00326 void cblas_sspr2(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
00327 const int N, const float alpha, const float *X,
00328 const int incX, const float *Y, const int incY, float *A);
00329
00330 void cblas_dsymv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
00331 const int N, const double alpha, const double *A,
00332 const int lda, const double *X, const int incX,
00333 const double beta, double *Y, const int incY);
00334 void cblas_dsbmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
00335 const int N, const int K, const double alpha, const double *A,
00336 const int lda, const double *X, const int incX,
00337 const double beta, double *Y, const int incY);
00338 void cblas_dspmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
00339 const int N, const double alpha, const double *Ap,
00340 const double *X, const int incX,
00341 const double beta, double *Y, const int incY);
00342 void cblas_dger(const enum CBLAS_ORDER order, const int M, const int N,
00343 const double alpha, const double *X, const int incX,
00344 const double *Y, const int incY, double *A, const int lda);
00345 void cblas_dsyr(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
00346 const int N, const double alpha, const double *X,
00347 const int incX, double *A, const int lda);
00348 void cblas_dspr(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
00349 const int N, const double alpha, const double *X,
00350 const int incX, double *Ap);
00351 void cblas_dsyr2(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
00352 const int N, const double alpha, const double *X,
00353 const int incX, const double *Y, const int incY, double *A,
00354 const int lda);
00355 void cblas_dspr2(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
00356 const int N, const double alpha, const double *X,
00357 const int incX, const double *Y, const int incY, double *A);
00358
00359
00360
00361
00362
00363 void cblas_chemv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
00364 const int N, const void *alpha, const void *A,
00365 const int lda, const void *X, const int incX,
00366 const void *beta, void *Y, const int incY);
00367 void cblas_chbmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
00368 const int N, const int K, const void *alpha, const void *A,
00369 const int lda, const void *X, const int incX,
00370 const void *beta, void *Y, const int incY);
00371 void cblas_chpmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
00372 const int N, const void *alpha, const void *Ap,
00373 const void *X, const int incX,
00374 const void *beta, void *Y, const int incY);
00375 void cblas_cgeru(const enum CBLAS_ORDER order, const int M, const int N,
00376 const void *alpha, const void *X, const int incX,
00377 const void *Y, const int incY, void *A, const int lda);
00378 void cblas_cgerc(const enum CBLAS_ORDER order, const int M, const int N,
00379 const void *alpha, const void *X, const int incX,
00380 const void *Y, const int incY, void *A, const int lda);
00381 void cblas_cher(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
00382 const int N, const float alpha, const void *X, const int incX,
00383 void *A, const int lda);
00384 void cblas_chpr(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
00385 const int N, const float alpha, const void *X,
00386 const int incX, void *A);
00387 void cblas_cher2(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N,
00388 const void *alpha, const void *X, const int incX,
00389 const void *Y, const int incY, void *A, const int lda);
00390 void cblas_chpr2(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N,
00391 const void *alpha, const void *X, const int incX,
00392 const void *Y, const int incY, void *Ap);
00393
00394 void cblas_zhemv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
00395 const int N, const void *alpha, const void *A,
00396 const int lda, const void *X, const int incX,
00397 const void *beta, void *Y, const int incY);
00398 void cblas_zhbmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
00399 const int N, const int K, const void *alpha, const void *A,
00400 const int lda, const void *X, const int incX,
00401 const void *beta, void *Y, const int incY);
00402 void cblas_zhpmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
00403 const int N, const void *alpha, const void *Ap,
00404 const void *X, const int incX,
00405 const void *beta, void *Y, const int incY);
00406 void cblas_zgeru(const enum CBLAS_ORDER order, const int M, const int N,
00407 const void *alpha, const void *X, const int incX,
00408 const void *Y, const int incY, void *A, const int lda);
00409 void cblas_zgerc(const enum CBLAS_ORDER order, const int M, const int N,
00410 const void *alpha, const void *X, const int incX,
00411 const void *Y, const int incY, void *A, const int lda);
00412 void cblas_zher(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
00413 const int N, const double alpha, const void *X, const int incX,
00414 void *A, const int lda);
00415 void cblas_zhpr(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo,
00416 const int N, const double alpha, const void *X,
00417 const int incX, void *A);
00418 void cblas_zher2(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N,
00419 const void *alpha, const void *X, const int incX,
00420 const void *Y, const int incY, void *A, const int lda);
00421 void cblas_zhpr2(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N,
00422 const void *alpha, const void *X, const int incX,
00423 const void *Y, const int incY, void *Ap);
00424
00425
00426
00427
00428
00429
00430
00431
00432
00433
00434 void cblas_sgemm(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA,
00435 const enum CBLAS_TRANSPOSE TransB, const int M, const int N,
00436 const int K, const float alpha, const float *A,
00437 const int lda, const float *B, const int ldb,
00438 const float beta, float *C, const int ldc);
00439 void cblas_ssymm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
00440 const enum CBLAS_UPLO Uplo, const int M, const int N,
00441 const float alpha, const float *A, const int lda,
00442 const float *B, const int ldb, const float beta,
00443 float *C, const int ldc);
00444 void cblas_ssyrk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
00445 const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
00446 const float alpha, const float *A, const int lda,
00447 const float beta, float *C, const int ldc);
00448 void cblas_ssyr2k(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
00449 const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
00450 const float alpha, const float *A, const int lda,
00451 const float *B, const int ldb, const float beta,
00452 float *C, const int ldc);
00453 void cblas_strmm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
00454 const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
00455 const enum CBLAS_DIAG Diag, const int M, const int N,
00456 const float alpha, const float *A, const int lda,
00457 float *B, const int ldb);
00458 void cblas_strsm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
00459 const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
00460 const enum CBLAS_DIAG Diag, const int M, const int N,
00461 const float alpha, const float *A, const int lda,
00462 float *B, const int ldb);
00463
00464 void cblas_dgemm(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA,
00465 const enum CBLAS_TRANSPOSE TransB, const int M, const int N,
00466 const int K, const double alpha, const double *A,
00467 const int lda, const double *B, const int ldb,
00468 const double beta, double *C, const int ldc);
00469 void cblas_dsymm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
00470 const enum CBLAS_UPLO Uplo, const int M, const int N,
00471 const double alpha, const double *A, const int lda,
00472 const double *B, const int ldb, const double beta,
00473 double *C, const int ldc);
00474 void cblas_dsyrk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
00475 const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
00476 const double alpha, const double *A, const int lda,
00477 const double beta, double *C, const int ldc);
00478 void cblas_dsyr2k(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
00479 const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
00480 const double alpha, const double *A, const int lda,
00481 const double *B, const int ldb, const double beta,
00482 double *C, const int ldc);
00483 void cblas_dtrmm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
00484 const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
00485 const enum CBLAS_DIAG Diag, const int M, const int N,
00486 const double alpha, const double *A, const int lda,
00487 double *B, const int ldb);
00488 void cblas_dtrsm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
00489 const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
00490 const enum CBLAS_DIAG Diag, const int M, const int N,
00491 const double alpha, const double *A, const int lda,
00492 double *B, const int ldb);
00493
00494 void cblas_cgemm(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA,
00495 const enum CBLAS_TRANSPOSE TransB, const int M, const int N,
00496 const int K, const void *alpha, const void *A,
00497 const int lda, const void *B, const int ldb,
00498 const void *beta, void *C, const int ldc);
00499 void cblas_csymm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
00500 const enum CBLAS_UPLO Uplo, const int M, const int N,
00501 const void *alpha, const void *A, const int lda,
00502 const void *B, const int ldb, const void *beta,
00503 void *C, const int ldc);
00504 void cblas_csyrk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
00505 const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
00506 const void *alpha, const void *A, const int lda,
00507 const void *beta, void *C, const int ldc);
00508 void cblas_csyr2k(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
00509 const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
00510 const void *alpha, const void *A, const int lda,
00511 const void *B, const int ldb, const void *beta,
00512 void *C, const int ldc);
00513 void cblas_ctrmm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
00514 const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
00515 const enum CBLAS_DIAG Diag, const int M, const int N,
00516 const void *alpha, const void *A, const int lda,
00517 void *B, const int ldb);
00518 void cblas_ctrsm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
00519 const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
00520 const enum CBLAS_DIAG Diag, const int M, const int N,
00521 const void *alpha, const void *A, const int lda,
00522 void *B, const int ldb);
00523
00524 void cblas_zgemm(const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA,
00525 const enum CBLAS_TRANSPOSE TransB, const int M, const int N,
00526 const int K, const void *alpha, const void *A,
00527 const int lda, const void *B, const int ldb,
00528 const void *beta, void *C, const int ldc);
00529 void cblas_zsymm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
00530 const enum CBLAS_UPLO Uplo, const int M, const int N,
00531 const void *alpha, const void *A, const int lda,
00532 const void *B, const int ldb, const void *beta,
00533 void *C, const int ldc);
00534 void cblas_zsyrk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
00535 const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
00536 const void *alpha, const void *A, const int lda,
00537 const void *beta, void *C, const int ldc);
00538 void cblas_zsyr2k(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
00539 const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
00540 const void *alpha, const void *A, const int lda,
00541 const void *B, const int ldb, const void *beta,
00542 void *C, const int ldc);
00543 void cblas_ztrmm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
00544 const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
00545 const enum CBLAS_DIAG Diag, const int M, const int N,
00546 const void *alpha, const void *A, const int lda,
00547 void *B, const int ldb);
00548 void cblas_ztrsm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
00549 const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA,
00550 const enum CBLAS_DIAG Diag, const int M, const int N,
00551 const void *alpha, const void *A, const int lda,
00552 void *B, const int ldb);
00553
00554
00555
00556
00557
00558 void cblas_chemm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
00559 const enum CBLAS_UPLO Uplo, const int M, const int N,
00560 const void *alpha, const void *A, const int lda,
00561 const void *B, const int ldb, const void *beta,
00562 void *C, const int ldc);
00563 void cblas_cherk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
00564 const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
00565 const float alpha, const void *A, const int lda,
00566 const float beta, void *C, const int ldc);
00567 void cblas_cher2k(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
00568 const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
00569 const void *alpha, const void *A, const int lda,
00570 const void *B, const int ldb, const float beta,
00571 void *C, const int ldc);
00572
00573 void cblas_zhemm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side,
00574 const enum CBLAS_UPLO Uplo, const int M, const int N,
00575 const void *alpha, const void *A, const int lda,
00576 const void *B, const int ldb, const void *beta,
00577 void *C, const int ldc);
00578 void cblas_zherk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
00579 const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
00580 const double alpha, const void *A, const int lda,
00581 const double beta, void *C, const int ldc);
00582 void cblas_zher2k(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo,
00583 const enum CBLAS_TRANSPOSE Trans, const int N, const int K,
00584 const void *alpha, const void *A, const int lda,
00585 const void *B, const int ldb, const double beta,
00586 void *C, const int ldc);
00587
00588 void cblas_xerbla(int p, const char *rout, const char *form, ...);
00589
00590 __END_DECLS
00591
00592 class CBLAS
00593 {
00594 public:
00595 template <class T>
00596 static void scal(int N, T alpha, T* X, int incX);
00597
00598 template <class T>
00599 static void copy(int N, const T* X, int incX, T* Y, int incY);
00600
00601 template <class T>
00602 static void axpy(int N, T alpha, const T* X, int incX, T* Y, int incY);
00603
00604 template <class T>
00605 static T dot(int N, const T* X, int incX, const T* Y, int incY);
00606
00607 template <class T>
00608 static T nrm2(int N, const T* X, int incX);
00609
00610 template <class T>
00611 static void ger(enum CBLAS_ORDER order, int M, int N, T alpha, const T* X, int incX, const T* Y, int incY, T* A, int lda);
00612
00613 template <class T>
00614 static void gemv(enum CBLAS_ORDER order, CBLAS_TRANSPOSE transA, int M, int N, T alpha, const T* A, int lda, const T* X, int incX, T beta, T* Y, int incY);
00615
00616 template <class T>
00617 static void gemm(enum CBLAS_ORDER order, CBLAS_TRANSPOSE transA, CBLAS_TRANSPOSE transB, int M, int N, int K, T alpha, const T* A, int lda, const T* B, int ldb, T beta, T* C, int ldc);
00618 };
00619
00620
00621
00622
00623
00624
00625
00626
00627
00628
00629
00630
00631
00632
00633
00634
00635
00636
00637
00638
00639
00640
00641
00642
00643
00644
00645
00646
00647
00648
00649
00650
00651
00652
00653
00654
00655
00656
00657
00658
00659
00660
00661
00662
00663
00664
00665
00666
00667
00668
00669
00670
00671
00672
00673
00674
00675
00676
00677
00678
00679
00680
00681
00682
00683
00684
00685
00686
00687
00688
00689
00690
00691
00692
00693
00694
00695
00696
00697
00698
00699
00700
00701
00702
00703
00704
00705
00706
00707
00708
00709
00710
00711
00712
00713
00714
00715
00716
00717
00718
00719
00720
00721
00722
00723
00724
00725
00726
00727
00728
00729
00730
00731
00732
00733
00734
00735
00736
00737
00738
00739
00740
00741
00742
00743
00744
00745
00746
00747
00748
00749
00750
00751
00752
00753
00754
00755
00756
00757
00758
00759
00760
00761
00762
00763
00764
00765
00766
00767
00768
00769
00770
00771
00772
00773
00774
00775
00776
00777
00778
00779
00780
00781
00782
00783
00784
00785
00786
00787
00788
00789
00790
00791
00792
00793
00794
00795
00796
00797
00798
00799
00800
00801
00802
00803
00804
00805
00806
00807
00808 #endif
00809