v0.8.16
Macros | Enumerations | Functions
cblas.h File Reference
#include <stddef.h>

Go to the source code of this file.

Macros

#define CBLAS_INDEX   size_t /* this may vary between platforms */
 

Enumerations

enum  CBLAS_ORDER { CblasRowMajor =101, CblasColMajor =102 }
 
enum  CBLAS_TRANSPOSE { CblasNoTrans =111, CblasTrans =112, CblasConjTrans =113 }
 
enum  CBLAS_UPLO { CblasUpper =121, CblasLower =122 }
 
enum  CBLAS_DIAG { CblasNonUnit =131, CblasUnit =132 }
 
enum  CBLAS_SIDE { CblasLeft =141, CblasRight =142 }
 

Functions

float cblas_sdsdot (const int N, const float alpha, const float *X, const int incX, const float *Y, const int incY)
 
double cblas_dsdot (const int N, const float *X, const int incX, const float *Y, const int incY)
 
float cblas_sdot (const int N, const float *X, const int incX, const float *Y, const int incY)
 
double cblas_ddot (const int N, const double *X, const int incX, const double *Y, const int incY)
 
void cblas_cdotu_sub (const int N, const void *X, const int incX, const void *Y, const int incY, void *dotu)
 
void cblas_cdotc_sub (const int N, const void *X, const int incX, const void *Y, const int incY, void *dotc)
 
void cblas_zdotu_sub (const int N, const void *X, const int incX, const void *Y, const int incY, void *dotu)
 
void cblas_zdotc_sub (const int N, const void *X, const int incX, const void *Y, const int incY, void *dotc)
 
float cblas_snrm2 (const int N, const float *X, const int incX)
 
float cblas_sasum (const int N, const float *X, const int incX)
 
double cblas_dnrm2 (const int N, const double *X, const int incX)
 
double cblas_dasum (const int N, const double *X, const int incX)
 
float cblas_scnrm2 (const int N, const void *X, const int incX)
 
float cblas_scasum (const int N, const void *X, const int incX)
 
double cblas_dznrm2 (const int N, const void *X, const int incX)
 
double cblas_dzasum (const int N, const void *X, const int incX)
 
CBLAS_INDEX cblas_isamax (const int N, const float *X, const int incX)
 
CBLAS_INDEX cblas_idamax (const int N, const double *X, const int incX)
 
CBLAS_INDEX cblas_icamax (const int N, const void *X, const int incX)
 
CBLAS_INDEX cblas_izamax (const int N, const void *X, const int incX)
 
void cblas_sswap (const int N, float *X, const int incX, float *Y, const int incY)
 
void cblas_scopy (const int N, const float *X, const int incX, float *Y, const int incY)
 
void cblas_saxpy (const int N, const float alpha, const float *X, const int incX, float *Y, const int incY)
 
void cblas_dswap (const int N, double *X, const int incX, double *Y, const int incY)
 
void cblas_dcopy (const int N, const double *X, const int incX, double *Y, const int incY)
 
void cblas_daxpy (const int N, const double alpha, const double *X, const int incX, double *Y, const int incY)
 
void cblas_cswap (const int N, void *X, const int incX, void *Y, const int incY)
 
void cblas_ccopy (const int N, const void *X, const int incX, void *Y, const int incY)
 
void cblas_caxpy (const int N, const void *alpha, const void *X, const int incX, void *Y, const int incY)
 
void cblas_zswap (const int N, void *X, const int incX, void *Y, const int incY)
 
void cblas_zcopy (const int N, const void *X, const int incX, void *Y, const int incY)
 
void cblas_zaxpy (const int N, const void *alpha, const void *X, const int incX, void *Y, const int incY)
 
void cblas_srotg (float *a, float *b, float *c, float *s)
 
void cblas_srotmg (float *d1, float *d2, float *b1, const float b2, float *P)
 
void cblas_srot (const int N, float *X, const int incX, float *Y, const int incY, const float c, const float s)
 
void cblas_srotm (const int N, float *X, const int incX, float *Y, const int incY, const float *P)
 
void cblas_drotg (double *a, double *b, double *c, double *s)
 
void cblas_drotmg (double *d1, double *d2, double *b1, const double b2, double *P)
 
void cblas_drot (const int N, double *X, const int incX, double *Y, const int incY, const double c, const double s)
 
void cblas_drotm (const int N, double *X, const int incX, double *Y, const int incY, const double *P)
 
void cblas_sscal (const int N, const float alpha, float *X, const int incX)
 
void cblas_dscal (const int N, const double alpha, double *X, const int incX)
 
void cblas_cscal (const int N, const void *alpha, void *X, const int incX)
 
void cblas_zscal (const int N, const void *alpha, void *X, const int incX)
 
void cblas_csscal (const int N, const float alpha, void *X, const int incX)
 
void cblas_zdscal (const int N, const double alpha, void *X, const int incX)
 
void cblas_sgemv (const enum CBLAS_ORDER order, const enum CBLAS_TRANSPOSE TransA, const int M, const int N, const float alpha, const float *A, const int lda, const float *X, const int incX, const float beta, float *Y, const int incY)
 
void cblas_sgbmv (const enum CBLAS_ORDER order, const enum CBLAS_TRANSPOSE TransA, const int M, const int N, const int KL, const int KU, const float alpha, const float *A, const int lda, const float *X, const int incX, const float beta, float *Y, const int incY)
 
void cblas_strmv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, const int N, const float *A, const int lda, float *X, const int incX)
 
void cblas_stbmv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, const int N, const int K, const float *A, const int lda, float *X, const int incX)
 
void cblas_stpmv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, const int N, const float *Ap, float *X, const int incX)
 
void cblas_strsv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, const int N, const float *A, const int lda, float *X, const int incX)
 
void cblas_stbsv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, const int N, const int K, const float *A, const int lda, float *X, const int incX)
 
void cblas_stpsv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, const int N, const float *Ap, float *X, const int incX)
 
void cblas_dgemv (const enum CBLAS_ORDER order, const enum CBLAS_TRANSPOSE TransA, const int M, const int N, const double alpha, const double *A, const int lda, const double *X, const int incX, const double beta, double *Y, const int incY)
 
void cblas_dgbmv (const enum CBLAS_ORDER order, const enum CBLAS_TRANSPOSE TransA, const int M, const int N, const int KL, const int KU, const double alpha, const double *A, const int lda, const double *X, const int incX, const double beta, double *Y, const int incY)
 
void cblas_dtrmv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, const int N, const double *A, const int lda, double *X, const int incX)
 
void cblas_dtbmv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, const int N, const int K, const double *A, const int lda, double *X, const int incX)
 
void cblas_dtpmv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, const int N, const double *Ap, double *X, const int incX)
 
void cblas_dtrsv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, const int N, const double *A, const int lda, double *X, const int incX)
 
void cblas_dtbsv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, const int N, const int K, const double *A, const int lda, double *X, const int incX)
 
void cblas_dtpsv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, const int N, const double *Ap, double *X, const int incX)
 
void cblas_cgemv (const enum CBLAS_ORDER order, const enum CBLAS_TRANSPOSE TransA, const int M, const int N, const void *alpha, const void *A, const int lda, const void *X, const int incX, const void *beta, void *Y, const int incY)
 
void cblas_cgbmv (const enum CBLAS_ORDER order, const enum CBLAS_TRANSPOSE TransA, const int M, const int N, const int KL, const int KU, const void *alpha, const void *A, const int lda, const void *X, const int incX, const void *beta, void *Y, const int incY)
 
void cblas_ctrmv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, const int N, const void *A, const int lda, void *X, const int incX)
 
void cblas_ctbmv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, const int N, const int K, const void *A, const int lda, void *X, const int incX)
 
void cblas_ctpmv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, const int N, const void *Ap, void *X, const int incX)
 
void cblas_ctrsv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, const int N, const void *A, const int lda, void *X, const int incX)
 
void cblas_ctbsv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, const int N, const int K, const void *A, const int lda, void *X, const int incX)
 
void cblas_ctpsv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, const int N, const void *Ap, void *X, const int incX)
 
void cblas_zgemv (const enum CBLAS_ORDER order, const enum CBLAS_TRANSPOSE TransA, const int M, const int N, const void *alpha, const void *A, const int lda, const void *X, const int incX, const void *beta, void *Y, const int incY)
 
void cblas_zgbmv (const enum CBLAS_ORDER order, const enum CBLAS_TRANSPOSE TransA, const int M, const int N, const int KL, const int KU, const void *alpha, const void *A, const int lda, const void *X, const int incX, const void *beta, void *Y, const int incY)
 
void cblas_ztrmv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, const int N, const void *A, const int lda, void *X, const int incX)
 
void cblas_ztbmv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, const int N, const int K, const void *A, const int lda, void *X, const int incX)
 
void cblas_ztpmv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, const int N, const void *Ap, void *X, const int incX)
 
void cblas_ztrsv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, const int N, const void *A, const int lda, void *X, const int incX)
 
void cblas_ztbsv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, const int N, const int K, const void *A, const int lda, void *X, const int incX)
 
void cblas_ztpsv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, const int N, const void *Ap, void *X, const int incX)
 
void cblas_ssymv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N, const float alpha, const float *A, const int lda, const float *X, const int incX, const float beta, float *Y, const int incY)
 
void cblas_ssbmv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N, const int K, const float alpha, const float *A, const int lda, const float *X, const int incX, const float beta, float *Y, const int incY)
 
void cblas_sspmv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N, const float alpha, const float *Ap, const float *X, const int incX, const float beta, float *Y, const int incY)
 
void cblas_sger (const enum CBLAS_ORDER order, const int M, const int N, const float alpha, const float *X, const int incX, const float *Y, const int incY, float *A, const int lda)
 
void cblas_ssyr (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N, const float alpha, const float *X, const int incX, float *A, const int lda)
 
void cblas_sspr (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N, const float alpha, const float *X, const int incX, float *Ap)
 
void cblas_ssyr2 (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N, const float alpha, const float *X, const int incX, const float *Y, const int incY, float *A, const int lda)
 
void cblas_sspr2 (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N, const float alpha, const float *X, const int incX, const float *Y, const int incY, float *A)
 
void cblas_dsymv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N, const double alpha, const double *A, const int lda, const double *X, const int incX, const double beta, double *Y, const int incY)
 
void cblas_dsbmv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N, const int K, const double alpha, const double *A, const int lda, const double *X, const int incX, const double beta, double *Y, const int incY)
 
void cblas_dspmv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N, const double alpha, const double *Ap, const double *X, const int incX, const double beta, double *Y, const int incY)
 
void cblas_dger (const enum CBLAS_ORDER order, const int M, const int N, const double alpha, const double *X, const int incX, const double *Y, const int incY, double *A, const int lda)
 
void cblas_dsyr (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N, const double alpha, const double *X, const int incX, double *A, const int lda)
 
void cblas_dspr (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N, const double alpha, const double *X, const int incX, double *Ap)
 
void cblas_dsyr2 (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N, const double alpha, const double *X, const int incX, const double *Y, const int incY, double *A, const int lda)
 
void cblas_dspr2 (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N, const double alpha, const double *X, const int incX, const double *Y, const int incY, double *A)
 
void cblas_chemv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N, const void *alpha, const void *A, const int lda, const void *X, const int incX, const void *beta, void *Y, const int incY)
 
void cblas_chbmv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N, const int K, const void *alpha, const void *A, const int lda, const void *X, const int incX, const void *beta, void *Y, const int incY)
 
void cblas_chpmv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N, const void *alpha, const void *Ap, const void *X, const int incX, const void *beta, void *Y, const int incY)
 
void cblas_cgeru (const enum CBLAS_ORDER order, const int M, const int N, const void *alpha, const void *X, const int incX, const void *Y, const int incY, void *A, const int lda)
 
void cblas_cgerc (const enum CBLAS_ORDER order, const int M, const int N, const void *alpha, const void *X, const int incX, const void *Y, const int incY, void *A, const int lda)
 
void cblas_cher (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N, const float alpha, const void *X, const int incX, void *A, const int lda)
 
void cblas_chpr (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N, const float alpha, const void *X, const int incX, void *A)
 
void cblas_cher2 (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N, const void *alpha, const void *X, const int incX, const void *Y, const int incY, void *A, const int lda)
 
void cblas_chpr2 (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N, const void *alpha, const void *X, const int incX, const void *Y, const int incY, void *Ap)
 
void cblas_zhemv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N, const void *alpha, const void *A, const int lda, const void *X, const int incX, const void *beta, void *Y, const int incY)
 
void cblas_zhbmv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N, const int K, const void *alpha, const void *A, const int lda, const void *X, const int incX, const void *beta, void *Y, const int incY)
 
void cblas_zhpmv (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N, const void *alpha, const void *Ap, const void *X, const int incX, const void *beta, void *Y, const int incY)
 
void cblas_zgeru (const enum CBLAS_ORDER order, const int M, const int N, const void *alpha, const void *X, const int incX, const void *Y, const int incY, void *A, const int lda)
 
void cblas_zgerc (const enum CBLAS_ORDER order, const int M, const int N, const void *alpha, const void *X, const int incX, const void *Y, const int incY, void *A, const int lda)
 
void cblas_zher (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N, const double alpha, const void *X, const int incX, void *A, const int lda)
 
void cblas_zhpr (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N, const double alpha, const void *X, const int incX, void *A)
 
void cblas_zher2 (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N, const void *alpha, const void *X, const int incX, const void *Y, const int incY, void *A, const int lda)
 
void cblas_zhpr2 (const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N, const void *alpha, const void *X, const int incX, const void *Y, const int incY, void *Ap)
 
void cblas_sgemm (const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_TRANSPOSE TransB, const int M, const int N, const int K, const float alpha, const float *A, const int lda, const float *B, const int ldb, const float beta, float *C, const int ldc)
 
void cblas_ssymm (const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side, const enum CBLAS_UPLO Uplo, const int M, const int N, const float alpha, const float *A, const int lda, const float *B, const int ldb, const float beta, float *C, const int ldc)
 
void cblas_ssyrk (const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE Trans, const int N, const int K, const float alpha, const float *A, const int lda, const float beta, float *C, const int ldc)
 
void cblas_ssyr2k (const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE Trans, const int N, const int K, const float alpha, const float *A, const int lda, const float *B, const int ldb, const float beta, float *C, const int ldc)
 
void cblas_strmm (const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, const int M, const int N, const float alpha, const float *A, const int lda, float *B, const int ldb)
 
void cblas_strsm (const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, const int M, const int N, const float alpha, const float *A, const int lda, float *B, const int ldb)
 
void cblas_dgemm (const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_TRANSPOSE TransB, const int M, const int N, const int K, const double alpha, const double *A, const int lda, const double *B, const int ldb, const double beta, double *C, const int ldc)
 
void cblas_dsymm (const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side, const enum CBLAS_UPLO Uplo, const int M, const int N, const double alpha, const double *A, const int lda, const double *B, const int ldb, const double beta, double *C, const int ldc)
 
void cblas_dsyrk (const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE Trans, const int N, const int K, const double alpha, const double *A, const int lda, const double beta, double *C, const int ldc)
 
void cblas_dsyr2k (const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE Trans, const int N, const int K, const double alpha, const double *A, const int lda, const double *B, const int ldb, const double beta, double *C, const int ldc)
 
void cblas_dtrmm (const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, const int M, const int N, const double alpha, const double *A, const int lda, double *B, const int ldb)
 
void cblas_dtrsm (const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, const int M, const int N, const double alpha, const double *A, const int lda, double *B, const int ldb)
 
void cblas_cgemm (const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_TRANSPOSE TransB, const int M, const int N, const int K, const void *alpha, const void *A, const int lda, const void *B, const int ldb, const void *beta, void *C, const int ldc)
 
void cblas_csymm (const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side, const enum CBLAS_UPLO Uplo, const int M, const int N, const void *alpha, const void *A, const int lda, const void *B, const int ldb, const void *beta, void *C, const int ldc)
 
void cblas_csyrk (const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE Trans, const int N, const int K, const void *alpha, const void *A, const int lda, const void *beta, void *C, const int ldc)
 
void cblas_csyr2k (const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE Trans, const int N, const int K, const void *alpha, const void *A, const int lda, const void *B, const int ldb, const void *beta, void *C, const int ldc)
 
void cblas_ctrmm (const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, const int M, const int N, const void *alpha, const void *A, const int lda, void *B, const int ldb)
 
void cblas_ctrsm (const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, const int M, const int N, const void *alpha, const void *A, const int lda, void *B, const int ldb)
 
void cblas_zgemm (const enum CBLAS_ORDER Order, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_TRANSPOSE TransB, const int M, const int N, const int K, const void *alpha, const void *A, const int lda, const void *B, const int ldb, const void *beta, void *C, const int ldc)
 
void cblas_zsymm (const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side, const enum CBLAS_UPLO Uplo, const int M, const int N, const void *alpha, const void *A, const int lda, const void *B, const int ldb, const void *beta, void *C, const int ldc)
 
void cblas_zsyrk (const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE Trans, const int N, const int K, const void *alpha, const void *A, const int lda, const void *beta, void *C, const int ldc)
 
void cblas_zsyr2k (const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE Trans, const int N, const int K, const void *alpha, const void *A, const int lda, const void *B, const int ldb, const void *beta, void *C, const int ldc)
 
void cblas_ztrmm (const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, const int M, const int N, const void *alpha, const void *A, const int lda, void *B, const int ldb)
 
void cblas_ztrsm (const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, const int M, const int N, const void *alpha, const void *A, const int lda, void *B, const int ldb)
 
void cblas_chemm (const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side, const enum CBLAS_UPLO Uplo, const int M, const int N, const void *alpha, const void *A, const int lda, const void *B, const int ldb, const void *beta, void *C, const int ldc)
 
void cblas_cherk (const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE Trans, const int N, const int K, const float alpha, const void *A, const int lda, const float beta, void *C, const int ldc)
 
void cblas_cher2k (const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE Trans, const int N, const int K, const void *alpha, const void *A, const int lda, const void *B, const int ldb, const float beta, void *C, const int ldc)
 
void cblas_zhemm (const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side, const enum CBLAS_UPLO Uplo, const int M, const int N, const void *alpha, const void *A, const int lda, const void *B, const int ldb, const void *beta, void *C, const int ldc)
 
void cblas_zherk (const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE Trans, const int N, const int K, const double alpha, const void *A, const int lda, const double beta, void *C, const int ldc)
 
void cblas_zher2k (const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE Trans, const int N, const int K, const void *alpha, const void *A, const int lda, const void *B, const int ldb, const double beta, void *C, const int ldc)
 
void cblas_xerbla (int p, const char *rout, const char *form,...)
 

Macro Definition Documentation

◆ CBLAS_INDEX

#define CBLAS_INDEX   size_t /* this may vary between platforms */

Definition at line 8 of file cblas.h.

Enumeration Type Documentation

◆ CBLAS_DIAG

enum CBLAS_DIAG
Enumerator
CblasNonUnit 
CblasUnit 

Definition at line 13 of file cblas.h.

13 {CblasNonUnit=131, CblasUnit=132};

◆ CBLAS_ORDER

Enumerator
CblasRowMajor 
CblasColMajor 

Definition at line 10 of file cblas.h.

◆ CBLAS_SIDE

enum CBLAS_SIDE
Enumerator
CblasLeft 
CblasRight 

Definition at line 14 of file cblas.h.

14 {CblasLeft=141, CblasRight=142};

◆ CBLAS_TRANSPOSE

Enumerator
CblasNoTrans 
CblasTrans 
CblasConjTrans 

Definition at line 11 of file cblas.h.

◆ CBLAS_UPLO

enum CBLAS_UPLO
Enumerator
CblasUpper 
CblasLower 

Definition at line 12 of file cblas.h.

12 {CblasUpper=121, CblasLower=122};

Function Documentation

◆ cblas_caxpy()

void cblas_caxpy ( const int  N,
const void *  alpha,
const void *  X,
const int  incX,
void *  Y,
const int  incY 
)

Definition at line 11 of file cblas_caxpy.c.

13 {
14 #ifdef F77_INT
15  F77_INT F77_N=N, F77_incX=incX, F77_incY=incY;
16 #else
17  #define F77_N N
18  #define F77_incX incX
19  #define F77_incY incY
20 #endif
21  F77_caxpy( &F77_N, alpha, X, &F77_incX, Y, &F77_incY);
22 }
#define F77_incY
#define F77_incX
#define F77_N
const int N
Definition: speed_test.cpp:3
void F77_caxpy(FINT, const void *, const void *, FINT, void *, FINT)

◆ cblas_ccopy()

void cblas_ccopy ( const int  N,
const void *  X,
const int  incX,
void *  Y,
const int  incY 
)

Definition at line 11 of file cblas_ccopy.c.

13 {
14 #ifdef F77_INT
15  F77_INT F77_N=N, F77_incX=incX, F77_incY=incY;
16 #else
17  #define F77_N N
18  #define F77_incX incX
19  #define F77_incY incY
20 #endif
21  F77_ccopy( &F77_N, X, &F77_incX, Y, &F77_incY);
22 }
#define F77_N
#define F77_incY
#define F77_incX
void F77_ccopy(FINT, const void *, FINT, void *, FINT)
const int N
Definition: speed_test.cpp:3

◆ cblas_cdotc_sub()

void cblas_cdotc_sub ( const int  N,
const void *  X,
const int  incX,
const void *  Y,
const int  incY,
void *  dotc 
)

Definition at line 12 of file cblas_cdotc_sub.c.

14 {
15 #ifdef F77_INT
16  F77_INT F77_N=N, F77_incX=incX, F77_incY=incY;
17 #else
18  #define F77_N N
19  #define F77_incX incX
20  #define F77_incY incY
21 #endif
22  F77_cdotc_sub( &F77_N, X, &F77_incX, Y, &F77_incY, dotc);
23 }
void F77_cdotc_sub(FINT, const void *, FINT, const void *, FINT, void *)
#define F77_incY
#define F77_incX
#define F77_N
const int N
Definition: speed_test.cpp:3

◆ cblas_cdotu_sub()

void cblas_cdotu_sub ( const int  N,
const void *  X,
const int  incX,
const void *  Y,
const int  incY,
void *  dotu 
)

Definition at line 12 of file cblas_cdotu_sub.c.

14 {
15 #ifdef F77_INT
16  F77_INT F77_N=N, F77_incX=incX, F77_incY=incY;
17 #else
18  #define F77_N N
19  #define F77_incX incX
20  #define F77_incY incY
21 #endif
22  F77_cdotu_sub( &F77_N, X, &F77_incX, Y, &F77_incY, dotu);
23 }
#define F77_N
#define F77_incY
#define F77_incX
const int N
Definition: speed_test.cpp:3
void F77_cdotu_sub(FINT, const void *, FINT, const void *, FINT, void *)

◆ cblas_cgbmv()

void cblas_cgbmv ( const enum CBLAS_ORDER  order,
const enum CBLAS_TRANSPOSE  TransA,
const int  M,
const int  N,
const int  KL,
const int  KU,
const void *  alpha,
const void *  A,
const int  lda,
const void *  X,
const int  incX,
const void *  beta,
void *  Y,
const int  incY 
)

Definition at line 12 of file cblas_cgbmv.c.

18 {
19  char TA;
20 #ifdef F77_CHAR
21  F77_CHAR F77_TA;
22 #else
23  #define F77_TA &TA
24 #endif
25 #ifdef F77_INT
26  F77_INT F77_M=M, F77_N=N, F77_lda=lda, F77_incX=incX, F77_incY=incY;
27  F77_INT F77_KL=KL,F77_KU=KU;
28 #else
29  #define F77_M M
30  #define F77_N N
31  #define F77_lda lda
32  #define F77_KL KL
33  #define F77_KU KU
34  #define F77_incX incx
35  #define F77_incY incY
36 #endif
37  int n=0, i=0, incx=incX;
38  const float *xx= (float *)X, *alp= (float *)alpha, *bet = (float *)beta;
39  float ALPHA[2],BETA[2];
40  int tincY, tincx;
41  float *x=(float *)X, *y=(float *)Y, *st=0, *tx=0;
42  extern int CBLAS_CallFromC;
43  extern int RowMajorStrg;
44  RowMajorStrg = 0;
45 
46  CBLAS_CallFromC = 1;
47  if (order == CblasColMajor)
48  {
49  if (TransA == CblasNoTrans) TA = 'N';
50  else if (TransA == CblasTrans) TA = 'T';
51  else if (TransA == CblasConjTrans) TA = 'C';
52  else
53  {
54  cblas_xerbla(2, "cblas_cgbmv","Illegal TransA setting, %d\n", TransA);
55  CBLAS_CallFromC = 0;
56  RowMajorStrg = 0;
57  return;
58  }
59  #ifdef F77_CHAR
60  F77_TA = C2F_CHAR(&TA);
61  #endif
62  F77_cgbmv(F77_TA, &F77_M, &F77_N, &F77_KL, &F77_KU, alpha,
63  A, &F77_lda, X, &F77_incX, beta, Y, &F77_incY);
64  }
65  else if (order == CblasRowMajor)
66  {
67  RowMajorStrg = 1;
68  if (TransA == CblasNoTrans) TA = 'T';
69  else if (TransA == CblasTrans) TA = 'N';
70  else if (TransA == CblasConjTrans)
71  {
72  ALPHA[0]= *alp;
73  ALPHA[1]= -alp[1];
74  BETA[0]= *bet;
75  BETA[1]= -bet[1];
76  TA = 'N';
77  if (M > 0)
78  {
79  n = M << 1;
80  x = malloc(n*sizeof(float));
81  tx = x;
82 
83  if( incX > 0 ) {
84  i = incX << 1 ;
85  tincx = 2;
86  st= x+n;
87  } else {
88  i = incX *(-2);
89  tincx = -2;
90  st = x-2;
91  x +=(n-2);
92  }
93  do
94  {
95  *x = *xx;
96  x[1] = -xx[1];
97  x += tincx ;
98  xx += i;
99  }
100  while (x != st);
101  x=tx;
102 
103  #ifdef F77_INT
104  F77_incX = 1;
105  #else
106  incx = 1;
107  #endif
108 
109  if( incY > 0 )
110  tincY = incY;
111  else
112  tincY = -incY;
113 
114  y++;
115 
116  if (N > 0)
117  {
118  i = tincY << 1;
119  n = i * N ;
120  st = y + n;
121  do {
122  *y = -(*y);
123  y += i;
124  } while(y != st);
125  y -= n;
126  }
127  }
128  else x = (float *) X;
129 
130 
131  }
132  else
133  {
134  cblas_xerbla(2, "cblas_cgbmv","Illegal TransA setting, %d\n", TransA);
135  CBLAS_CallFromC = 0;
136  RowMajorStrg = 0;
137  return;
138  }
139  #ifdef F77_CHAR
140  F77_TA = C2F_CHAR(&TA);
141  #endif
142  if (TransA == CblasConjTrans)
143  F77_cgbmv(F77_TA, &F77_N, &F77_M, &F77_KU, &F77_KL, ALPHA,
144  A ,&F77_lda, x,&F77_incX, BETA, Y, &F77_incY);
145  else
146  F77_cgbmv(F77_TA, &F77_N, &F77_M, &F77_KU, &F77_KL, alpha,
147  A ,&F77_lda, x,&F77_incX, beta, Y, &F77_incY);
148  if (TransA == CblasConjTrans)
149  {
150  if (x != X) free(x);
151  if (N > 0)
152  {
153  do
154  {
155  *y = -(*y);
156  y += i;
157  }
158  while (y != st);
159  }
160  }
161  }
162  else cblas_xerbla(1, "cblas_cgbmv", "Illegal Order setting, %d\n", order);
163  CBLAS_CallFromC = 0;
164  RowMajorStrg = 0;
165 }
#define F77_lda
#define F77_KL
#define F77_KU
#define F77_M
#define F77_TA
int CBLAS_CallFromC
Definition: cblas_globals.c:1
void F77_cgbmv(FCHAR, FINT, FINT, FINT, FINT, const void *, const void *, FINT, const void *, FINT, const void *, void *, FINT)
#define F77_incX
#define F77_N
void cblas_xerbla(int p, const char *rout, const char *form,...)
Definition: cblas_xerbla.c:8
#define F77_incY
const int N
Definition: speed_test.cpp:3
int RowMajorStrg
Definition: cblas_globals.c:2

◆ cblas_cgemm()

void cblas_cgemm ( const enum CBLAS_ORDER  Order,
const enum CBLAS_TRANSPOSE  TransA,
const enum CBLAS_TRANSPOSE  TransB,
const int  M,
const int  N,
const int  K,
const void *  alpha,
const void *  A,
const int  lda,
const void *  B,
const int  ldb,
const void *  beta,
void *  C,
const int  ldc 
)

Definition at line 12 of file cblas_cgemm.c.

17 {
18  char TA, TB;
19 #ifdef F77_CHAR
20  F77_CHAR F77_TA, F77_TB;
21 #else
22  #define F77_TA &TA
23  #define F77_TB &TB
24 #endif
25 
26 #ifdef F77_INT
27  F77_INT F77_M=M, F77_N=N, F77_K=K, F77_lda=lda, F77_ldb=ldb;
28  F77_INT F77_ldc=ldc;
29 #else
30  #define F77_M M
31  #define F77_N N
32  #define F77_K K
33  #define F77_lda lda
34  #define F77_ldb ldb
35  #define F77_ldc ldc
36 #endif
37 
38  extern int CBLAS_CallFromC;
39  extern int RowMajorStrg;
40  RowMajorStrg = 0;
41  CBLAS_CallFromC = 1;
42 
43  if( Order == CblasColMajor )
44  {
45  if(TransA == CblasTrans) TA='T';
46  else if ( TransA == CblasConjTrans ) TA='C';
47  else if ( TransA == CblasNoTrans ) TA='N';
48  else
49  {
50  cblas_xerbla(2, "cblas_cgemm", "Illegal TransA setting, %d\n", TransA);
51  CBLAS_CallFromC = 0;
52  RowMajorStrg = 0;
53  return;
54  }
55 
56  if(TransB == CblasTrans) TB='T';
57  else if ( TransB == CblasConjTrans ) TB='C';
58  else if ( TransB == CblasNoTrans ) TB='N';
59  else
60  {
61  cblas_xerbla(3, "cblas_cgemm", "Illegal TransB setting, %d\n", TransB);
62  CBLAS_CallFromC = 0;
63  RowMajorStrg = 0;
64  return;
65  }
66 
67  #ifdef F77_CHAR
68  F77_TA = C2F_CHAR(&TA);
69  F77_TB = C2F_CHAR(&TB);
70  #endif
71 
72  F77_cgemm(F77_TA, F77_TB, &F77_M, &F77_N, &F77_K, alpha, A,
73  &F77_lda, B, &F77_ldb, beta, C, &F77_ldc);
74  } else if (Order == CblasRowMajor)
75  {
76  RowMajorStrg = 1;
77  if(TransA == CblasTrans) TB='T';
78  else if ( TransA == CblasConjTrans ) TB='C';
79  else if ( TransA == CblasNoTrans ) TB='N';
80  else
81  {
82  cblas_xerbla(2, "cblas_cgemm", "Illegal TransA setting, %d\n", TransA);
83  CBLAS_CallFromC = 0;
84  RowMajorStrg = 0;
85  return;
86  }
87  if(TransB == CblasTrans) TA='T';
88  else if ( TransB == CblasConjTrans ) TA='C';
89  else if ( TransB == CblasNoTrans ) TA='N';
90  else
91  {
92  cblas_xerbla(2, "cblas_cgemm", "Illegal TransB setting, %d\n", TransB);
93  CBLAS_CallFromC = 0;
94  RowMajorStrg = 0;
95  return;
96  }
97  #ifdef F77_CHAR
98  F77_TA = C2F_CHAR(&TA);
99  F77_TB = C2F_CHAR(&TB);
100  #endif
101 
102  F77_cgemm(F77_TA, F77_TB, &F77_N, &F77_M, &F77_K, alpha, B,
103  &F77_ldb, A, &F77_lda, beta, C, &F77_ldc);
104  }
105  else cblas_xerbla(1, "cblas_cgemm", "Illegal Order setting, %d\n", Order);
106  CBLAS_CallFromC = 0;
107  RowMajorStrg = 0;
108  return;
109 }
#define F77_TA
#define F77_M
#define F77_TB
void F77_cgemm(FCHAR, FCHAR, FINT, FINT, FINT, const float *, const float *, FINT, const float *, FINT, const float *, float *, FINT)
int CBLAS_CallFromC
Definition: cblas_globals.c:1
#define F77_N
#define F77_ldb
#define F77_lda
void cblas_xerbla(int p, const char *rout, const char *form,...)
Definition: cblas_xerbla.c:8
#define F77_K
const int N
Definition: speed_test.cpp:3
#define F77_ldc
int RowMajorStrg
Definition: cblas_globals.c:2

◆ cblas_cgemv()

void cblas_cgemv ( const enum CBLAS_ORDER  order,
const enum CBLAS_TRANSPOSE  TransA,
const int  M,
const int  N,
const void *  alpha,
const void *  A,
const int  lda,
const void *  X,
const int  incX,
const void *  beta,
void *  Y,
const int  incY 
)

Definition at line 12 of file cblas_cgemv.c.

17 {
18  char TA;
19 #ifdef F77_CHAR
20  F77_CHAR F77_TA;
21 #else
22  #define F77_TA &TA
23 #endif
24 #ifdef F77_INT
25  F77_INT F77_M=M, F77_N=N, F77_lda=lda, F77_incX=incX, F77_incY=incY;
26 #else
27  #define F77_M M
28  #define F77_N N
29  #define F77_lda lda
30  #define F77_incX incx
31  #define F77_incY incY
32 #endif
33 
34  int n=0, i=0, incx=incX;
35  const float *xx= (const float *)X;
36  float ALPHA[2],BETA[2];
37  int tincY, tincx;
38  float *x=(float *)X, *y=(float *)Y, *st=0, *tx=0;
39  const float *stx = x;
40  extern int CBLAS_CallFromC;
41  extern int RowMajorStrg;
42  RowMajorStrg = 0;
43 
44  CBLAS_CallFromC = 1;
45 
46  if (order == CblasColMajor)
47  {
48  if (TransA == CblasNoTrans) TA = 'N';
49  else if (TransA == CblasTrans) TA = 'T';
50  else if (TransA == CblasConjTrans) TA = 'C';
51  else
52  {
53  cblas_xerbla(2, "cblas_cgemv","Illegal TransA setting, %d\n", TransA);
54  CBLAS_CallFromC = 0;
55  RowMajorStrg = 0;
56  return;
57  }
58  #ifdef F77_CHAR
59  F77_TA = C2F_CHAR(&TA);
60  #endif
61  F77_cgemv(F77_TA, &F77_M, &F77_N, alpha, A, &F77_lda, X, &F77_incX,
62  beta, Y, &F77_incY);
63  }
64  else if (order == CblasRowMajor)
65  {
66  RowMajorStrg = 1;
67 
68  if (TransA == CblasNoTrans) TA = 'T';
69  else if (TransA == CblasTrans) TA = 'N';
70  else if (TransA == CblasConjTrans)
71  {
72  ALPHA[0]= *( (const float *) alpha );
73  ALPHA[1]= -( *( (const float *) alpha+1) );
74  BETA[0]= *( (const float *) beta );
75  BETA[1]= -( *( (const float *) beta+1 ) );
76  TA = 'N';
77  if (M > 0)
78  {
79  n = M << 1;
80  x = malloc(n*sizeof(float));
81  tx = x;
82  if( incX > 0 ) {
83  i = incX << 1 ;
84  tincx = 2;
85  st= x+n;
86  } else {
87  i = incX *(-2);
88  tincx = -2;
89  st = x-2;
90  x +=(n-2);
91  }
92 
93  do
94  {
95  *x = *xx;
96  x[1] = -xx[1];
97  x += tincx ;
98  xx += i;
99  }
100  while (x != st);
101  x=tx;
102 
103  F77_incX = 1;
104 
105  if(incY > 0)
106  tincY = incY;
107  else
108  tincY = -incY;
109 
110  y++;
111 
112  if (N > 0)
113  {
114  i = tincY << 1;
115  n = i * N ;
116  st = y + n;
117  do {
118  *y = -(*y);
119  y += i;
120  } while(y != st);
121  y -= n;
122  }
123  stx = x;
124  }
125  else stx = (const float *)X;
126  }
127  else
128  {
129  cblas_xerbla(2, "cblas_cgemv","Illegal TransA setting, %d\n", TransA);
130  CBLAS_CallFromC = 0;
131  RowMajorStrg = 0;
132  return;
133  }
134  #ifdef F77_CHAR
135  F77_TA = C2F_CHAR(&TA);
136  #endif
137  if (TransA == CblasConjTrans)
138  F77_cgemv(F77_TA, &F77_N, &F77_M, ALPHA, A, &F77_lda, stx,
139  &F77_incX, BETA, Y, &F77_incY);
140  else
141  F77_cgemv(F77_TA, &F77_N, &F77_M, alpha, A, &F77_lda, x,
142  &F77_incX, beta, Y, &F77_incY);
143 
144  if (TransA == CblasConjTrans)
145  {
146  if (x != (const float *)X) free(x);
147  if (N > 0)
148  {
149  do
150  {
151  *y = -(*y);
152  y += i;
153  }
154  while (y != st);
155  }
156  }
157  }
158  else cblas_xerbla(1, "cblas_cgemv", "Illegal Order setting, %d\n", order);
159  CBLAS_CallFromC = 0;
160  RowMajorStrg = 0;
161  return;
162 }
#define F77_M
#define F77_lda
int CBLAS_CallFromC
Definition: cblas_globals.c:1
#define F77_TA
#define F77_incX
#define F77_incY
void cblas_xerbla(int p, const char *rout, const char *form,...)
Definition: cblas_xerbla.c:8
#define F77_N
const int N
Definition: speed_test.cpp:3
void F77_cgemv(FCHAR, FINT, FINT, const void *, const void *, FINT, const void *, FINT, const void *, void *, FINT)
int RowMajorStrg
Definition: cblas_globals.c:2

◆ cblas_cgerc()

void cblas_cgerc ( const enum CBLAS_ORDER  order,
const int  M,
const int  N,
const void *  alpha,
const void *  X,
const int  incX,
const void *  Y,
const int  incY,
void *  A,
const int  lda 
)

Definition at line 12 of file cblas_cgerc.c.

15 {
16 #ifdef F77_INT
17  F77_INT F77_M=M, F77_N=N, F77_lda=lda, F77_incX=incX, F77_incY=incY;
18 #else
19  #define F77_M M
20  #define F77_N N
21  #define F77_incX incX
22  #define F77_incY incy
23  #define F77_lda lda
24 #endif
25 
26  int n, i, tincy, incy=incY;
27  float *y=(float *)Y, *yy=(float *)Y, *ty, *st;
28 
29  extern int CBLAS_CallFromC;
30  extern int RowMajorStrg;
31  RowMajorStrg = 0;
32 
33  CBLAS_CallFromC = 1;
34  if (order == CblasColMajor)
35  {
36  F77_cgerc( &F77_M, &F77_N, alpha, X, &F77_incX, Y, &F77_incY, A,
37  &F77_lda);
38  } else if (order == CblasRowMajor)
39  {
40  RowMajorStrg = 1;
41  if (N > 0)
42  {
43  n = N << 1;
44  y = malloc(n*sizeof(float));
45 
46  ty = y;
47  if( incY > 0 ) {
48  i = incY << 1;
49  tincy = 2;
50  st= y+n;
51  } else {
52  i = incY *(-2);
53  tincy = -2;
54  st = y-2;
55  y +=(n-2);
56  }
57  do
58  {
59  *y = *yy;
60  y[1] = -yy[1];
61  y += tincy ;
62  yy += i;
63  }
64  while (y != st);
65  y = ty;
66 
67  #ifdef F77_INT
68  F77_incY = 1;
69  #else
70  incy = 1;
71  #endif
72  }
73  else y = (float *) Y;
74 
75  F77_cgeru( &F77_N, &F77_M, alpha, y, &F77_incY, X, &F77_incX, A,
76  &F77_lda);
77  if(Y!=y)
78  free(y);
79 
80  } else cblas_xerbla(1, "cblas_cgerc", "Illegal Order setting, %d\n", order);
81  CBLAS_CallFromC = 0;
82  RowMajorStrg = 0;
83  return;
84 }
#define F77_incX
#define F77_N
void F77_cgerc(FINT, FINT, const void *, const void *, FINT, const void *, FINT, void *, FINT)
#define F77_incY
int CBLAS_CallFromC
Definition: cblas_globals.c:1
#define F77_M
void cblas_xerbla(int p, const char *rout, const char *form,...)
Definition: cblas_xerbla.c:8
#define F77_lda
void F77_cgeru(FINT, FINT, const void *, const void *, FINT, const void *, FINT, void *, FINT)
const int N
Definition: speed_test.cpp:3
int RowMajorStrg
Definition: cblas_globals.c:2

◆ cblas_cgeru()

void cblas_cgeru ( const enum CBLAS_ORDER  order,
const int  M,
const int  N,
const void *  alpha,
const void *  X,
const int  incX,
const void *  Y,
const int  incY,
void *  A,
const int  lda 
)

Definition at line 10 of file cblas_cgeru.c.

13 {
14 #ifdef F77_INT
15  F77_INT F77_M=M, F77_N=N, F77_lda=lda, F77_incX=incX, F77_incY=incY;
16 #else
17  #define F77_M M
18  #define F77_N N
19  #define F77_incX incX
20  #define F77_incY incY
21  #define F77_lda lda
22 #endif
23 
24  extern int CBLAS_CallFromC;
25  extern int RowMajorStrg;
26  RowMajorStrg = 0;
27 
28  CBLAS_CallFromC = 1;
29 
30  if (order == CblasColMajor)
31  {
32  F77_cgeru( &F77_M, &F77_N, alpha, X, &F77_incX, Y, &F77_incY, A,
33  &F77_lda);
34  }
35  else if (order == CblasRowMajor)
36  {
37  RowMajorStrg = 1;
38  F77_cgeru( &F77_N, &F77_M, alpha, Y, &F77_incY, X, &F77_incX, A,
39  &F77_lda);
40  }
41  else cblas_xerbla(1, "cblas_cgeru","Illegal Order setting, %d\n", order);
42  CBLAS_CallFromC = 0;
43  RowMajorStrg = 0;
44  return;
45 }
#define F77_N
#define F77_incX
#define F77_incY
int CBLAS_CallFromC
Definition: cblas_globals.c:1
void cblas_xerbla(int p, const char *rout, const char *form,...)
Definition: cblas_xerbla.c:8
#define F77_M
void F77_cgeru(FINT, FINT, const void *, const void *, FINT, const void *, FINT, void *, FINT)
const int N
Definition: speed_test.cpp:3
#define F77_lda
int RowMajorStrg
Definition: cblas_globals.c:2

◆ cblas_chbmv()

void cblas_chbmv ( const enum CBLAS_ORDER  order,
const enum CBLAS_UPLO  Uplo,
const int  N,
const int  K,
const void *  alpha,
const void *  A,
const int  lda,
const void *  X,
const int  incX,
const void *  beta,
void *  Y,
const int  incY 
)

Definition at line 12 of file cblas_chbmv.c.

17 {
18  char UL;
19 #ifdef F77_CHAR
20  F77_CHAR F77_UL;
21 #else
22  #define F77_UL &UL
23 #endif
24 #ifdef F77_INT
25  F77_INT F77_N=N, F77_K=K, F77_lda=lda, F77_incX=incX, F77_incY=incY;
26 #else
27  #define F77_N N
28  #define F77_K K
29  #define F77_lda lda
30  #define F77_incX incx
31  #define F77_incY incY
32 #endif
33  int n, i=0, incx=incX;
34  const float *xx= (float *)X, *alp= (float *)alpha, *bet = (float *)beta;
35  float ALPHA[2],BETA[2];
36  int tincY, tincx;
37  float *x=(float *)X, *y=(float *)Y, *st=0, *tx;
38  extern int CBLAS_CallFromC;
39  extern int RowMajorStrg;
40  RowMajorStrg = 0;
41 
42  CBLAS_CallFromC = 1;
43  if (order == CblasColMajor)
44  {
45  if (Uplo == CblasLower) UL = 'L';
46  else if (Uplo == CblasUpper) UL = 'U';
47  else
48  {
49  cblas_xerbla(2, "cblas_chbmv","Illegal Uplo setting, %d\n",Uplo );
50  CBLAS_CallFromC = 0;
51  RowMajorStrg = 0;
52  return;
53  }
54  #ifdef F77_CHAR
55  F77_UL = C2F_CHAR(&UL);
56  #endif
57  F77_chbmv(F77_UL, &F77_N, &F77_K, alpha, A, &F77_lda, X,
58  &F77_incX, beta, Y, &F77_incY);
59  }
60  else if (order == CblasRowMajor)
61  {
62  RowMajorStrg = 1;
63  ALPHA[0]= *alp;
64  ALPHA[1]= -alp[1];
65  BETA[0]= *bet;
66  BETA[1]= -bet[1];
67 
68  if (N > 0)
69  {
70  n = N << 1;
71  x = malloc(n*sizeof(float));
72 
73  tx = x;
74  if( incX > 0 ) {
75  i = incX << 1 ;
76  tincx = 2;
77  st= x+n;
78  } else {
79  i = incX *(-2);
80  tincx = -2;
81  st = x-2;
82  x +=(n-2);
83  }
84 
85  do
86  {
87  *x = *xx;
88  x[1] = -xx[1];
89  x += tincx ;
90  xx += i;
91  }
92  while (x != st);
93  x=tx;
94 
95 
96  #ifdef F77_INT
97  F77_incX = 1;
98  #else
99  incx = 1;
100  #endif
101 
102  if(incY > 0)
103  tincY = incY;
104  else
105  tincY = -incY;
106  y++;
107 
108  i = tincY << 1;
109  n = i * N ;
110  st = y + n;
111  do {
112  *y = -(*y);
113  y += i;
114  } while(y != st);
115  y -= n;
116  } else
117  x = (float *) X;
118 
119  if (Uplo == CblasUpper) UL = 'L';
120  else if (Uplo == CblasLower) UL = 'U';
121  else
122  {
123  cblas_xerbla(2, "cblas_chbmv","Illegal Uplo setting, %d\n", Uplo);
124  CBLAS_CallFromC = 0;
125  RowMajorStrg = 0;
126  return;
127  }
128  #ifdef F77_CHAR
129  F77_UL = C2F_CHAR(&UL);
130  #endif
131  F77_chbmv(F77_UL, &F77_N, &F77_K, ALPHA,
132  A ,&F77_lda, x,&F77_incX, BETA, Y, &F77_incY);
133  }
134  else
135  {
136  cblas_xerbla(1, "cblas_chbmv","Illegal Order setting, %d\n", order);
137  CBLAS_CallFromC = 0;
138  RowMajorStrg = 0;
139  return;
140  }
141  if ( order == CblasRowMajor )
142  {
143  RowMajorStrg = 1;
144  if(X!=x)
145  free(x);
146  if (N > 0)
147  {
148  do
149  {
150  *y = -(*y);
151  y += i;
152  }
153  while (y != st);
154  }
155  }
156  CBLAS_CallFromC = 0;
157  RowMajorStrg = 0;
158  return;
159 }
#define F77_UL
#define F77_N
int CBLAS_CallFromC
Definition: cblas_globals.c:1
#define F77_incY
#define F77_K
void cblas_xerbla(int p, const char *rout, const char *form,...)
Definition: cblas_xerbla.c:8
#define F77_incX
const int N
Definition: speed_test.cpp:3
void F77_chbmv(FCHAR, FINT, FINT, const void *, const void *, FINT, const void *, FINT, const void *, void *, FINT)
#define F77_lda
int RowMajorStrg
Definition: cblas_globals.c:2

◆ cblas_chemm()

void cblas_chemm ( const enum CBLAS_ORDER  Order,
const enum CBLAS_SIDE  Side,
const enum CBLAS_UPLO  Uplo,
const int  M,
const int  N,
const void *  alpha,
const void *  A,
const int  lda,
const void *  B,
const int  ldb,
const void *  beta,
void *  C,
const int  ldc 
)

Definition at line 12 of file cblas_chemm.c.

17 {
18  char SD, UL;
19 #ifdef F77_CHAR
20  F77_CHAR F77_SD, F77_UL;
21 #else
22  #define F77_SD &SD
23  #define F77_UL &UL
24 #endif
25 
26 #ifdef F77_INT
27  F77_INT F77_M=M, F77_N=N, F77_lda=lda, F77_ldb=ldb;
28  F77_INT F77_ldc=ldc;
29 #else
30  #define F77_M M
31  #define F77_N N
32  #define F77_lda lda
33  #define F77_ldb ldb
34  #define F77_ldc ldc
35 #endif
36 
37  extern int CBLAS_CallFromC;
38  extern int RowMajorStrg;
39  RowMajorStrg = 0;
40  CBLAS_CallFromC = 1;
41 
42  if( Order == CblasColMajor )
43  {
44  if( Side == CblasRight) SD='R';
45  else if ( Side == CblasLeft ) SD='L';
46  else
47  {
48  cblas_xerbla(2, "cblas_chemm", "Illegal Side setting, %d\n", Side);
49  CBLAS_CallFromC = 0;
50  RowMajorStrg = 0;
51  return;
52  }
53 
54  if( Uplo == CblasUpper) UL='U';
55  else if ( Uplo == CblasLower ) UL='L';
56  else
57  {
58  cblas_xerbla(3, "cblas_chemm", "Illegal Uplo setting, %d\n", Uplo);
59  CBLAS_CallFromC = 0;
60  RowMajorStrg = 0;
61  return;
62  }
63 
64  #ifdef F77_CHAR
65  F77_UL = C2F_CHAR(&UL);
66  F77_SD = C2F_CHAR(&SD);
67  #endif
68 
69  F77_chemm(F77_SD, F77_UL, &F77_M, &F77_N, alpha, A, &F77_lda,
70  B, &F77_ldb, beta, C, &F77_ldc);
71  } else if (Order == CblasRowMajor)
72  {
73  RowMajorStrg = 1;
74  if( Side == CblasRight) SD='L';
75  else if ( Side == CblasLeft ) SD='R';
76  else
77  {
78  cblas_xerbla(2, "cblas_chemm", "Illegal Side setting, %d\n", Side);
79  CBLAS_CallFromC = 0;
80  RowMajorStrg = 0;
81  return;
82  }
83 
84  if( Uplo == CblasUpper) UL='L';
85  else if ( Uplo == CblasLower ) UL='U';
86  else
87  {
88  cblas_xerbla(3, "cblas_chemm", "Illegal Uplo setting, %d\n", Uplo);
89  CBLAS_CallFromC = 0;
90  RowMajorStrg = 0;
91  return;
92  }
93 
94  #ifdef F77_CHAR
95  F77_UL = C2F_CHAR(&UL);
96  F77_SD = C2F_CHAR(&SD);
97  #endif
98 
99  F77_chemm(F77_SD, F77_UL, &F77_N, &F77_M, alpha, A,
100  &F77_lda, B, &F77_ldb, beta, C, &F77_ldc);
101  }
102  else cblas_xerbla(1, "cblas_chemm", "Illegal Order setting, %d\n", Order);
103  CBLAS_CallFromC = 0;
104  RowMajorStrg = 0;
105  return;
106 }
#define F77_N
#define F77_ldc
#define F77_UL
void F77_chemm(FCHAR, FCHAR, FINT, FINT, const float *, const float *, FINT, const float *, FINT, const float *, float *, FINT)
int CBLAS_CallFromC
Definition: cblas_globals.c:1
#define F77_lda
#define F77_ldb
#define F77_SD
void cblas_xerbla(int p, const char *rout, const char *form,...)
Definition: cblas_xerbla.c:8
#define F77_M
const int N
Definition: speed_test.cpp:3
int RowMajorStrg
Definition: cblas_globals.c:2

◆ cblas_chemv()

void cblas_chemv ( const enum CBLAS_ORDER  order,
const enum CBLAS_UPLO  Uplo,
const int  N,
const void *  alpha,
const void *  A,
const int  lda,
const void *  X,
const int  incX,
const void *  beta,
void *  Y,
const int  incY 
)

Definition at line 12 of file cblas_chemv.c.

17 {
18  char UL;
19 #ifdef F77_CHAR
20  F77_CHAR F77_UL;
21 #else
22  #define F77_UL &UL
23 #endif
24 #ifdef F77_INT
25  F77_INT F77_N=N, F77_lda=lda, F77_incX=incX, F77_incY=incY;
26 #else
27  #define F77_N N
28  #define F77_lda lda
29  #define F77_incX incx
30  #define F77_incY incY
31 #endif
32  int n=0, i=0, incx=incX;
33  const float *xx= (float *)X, *alp= (float *)alpha, *bet = (float *)beta;
34  float ALPHA[2],BETA[2];
35  int tincY, tincx;
36  float *x=(float *)X, *y=(float *)Y, *st=0, *tx;
37  extern int CBLAS_CallFromC;
38  extern int RowMajorStrg;
39  RowMajorStrg = 0;
40 
41 
42  CBLAS_CallFromC = 1;
43  if (order == CblasColMajor)
44  {
45  if (Uplo == CblasUpper) UL = 'U';
46  else if (Uplo == CblasLower) UL = 'L';
47  else
48  {
49  cblas_xerbla(2, "cblas_chemv","Illegal Uplo setting, %d\n",Uplo );
50  CBLAS_CallFromC = 0;
51  RowMajorStrg = 0;
52  return;
53  }
54  #ifdef F77_CHAR
55  F77_UL = C2F_CHAR(&UL);
56  #endif
57  F77_chemv(F77_UL, &F77_N, alpha, A, &F77_lda, X, &F77_incX,
58  beta, Y, &F77_incY);
59  }
60  else if (order == CblasRowMajor)
61  {
62  RowMajorStrg = 1;
63  ALPHA[0]= *alp;
64  ALPHA[1]= -alp[1];
65  BETA[0]= *bet;
66  BETA[1]= -bet[1];
67 
68  if (N > 0)
69  {
70  n = N << 1;
71  x = malloc(n*sizeof(float));
72 
73  tx = x;
74  if( incX > 0 ) {
75  i = incX << 1 ;
76  tincx = 2;
77  st= x+n;
78  } else {
79  i = incX *(-2);
80  tincx = -2;
81  st = x-2;
82  x +=(n-2);
83  }
84 
85  do
86  {
87  *x = *xx;
88  x[1] = -xx[1];
89  x += tincx ;
90  xx += i;
91  }
92  while (x != st);
93  x=tx;
94 
95 
96  #ifdef F77_INT
97  F77_incX = 1;
98  #else
99  incx = 1;
100  #endif
101 
102  if(incY > 0)
103  tincY = incY;
104  else
105  tincY = -incY;
106  y++;
107 
108  i = tincY << 1;
109  n = i * N ;
110  st = y + n;
111  do {
112  *y = -(*y);
113  y += i;
114  } while(y != st);
115  y -= n;
116  } else
117  x = (float *) X;
118 
119 
120  if (Uplo == CblasUpper) UL = 'L';
121  else if (Uplo == CblasLower) UL = 'U';
122  else
123  {
124  cblas_xerbla(2, "cblas_chemv","Illegal Uplo setting, %d\n", Uplo);
125  CBLAS_CallFromC = 0;
126  RowMajorStrg = 0;
127  return;
128  }
129  #ifdef F77_CHAR
130  F77_UL = C2F_CHAR(&UL);
131  #endif
132  F77_chemv(F77_UL, &F77_N, ALPHA, A, &F77_lda, x, &F77_incX,
133  BETA, Y, &F77_incY);
134  }
135  else
136  {
137  cblas_xerbla(1, "cblas_chemv","Illegal Order setting, %d\n", order);
138  CBLAS_CallFromC = 0;
139  RowMajorStrg = 0;
140  return;
141  }
142  if ( order == CblasRowMajor )
143  {
144  RowMajorStrg = 1;
145  if ( X != x )
146  free(x);
147  if (N > 0)
148  {
149  do
150  {
151  *y = -(*y);
152  y += i;
153  }
154  while (y != st);
155  }
156  }
157  CBLAS_CallFromC = 0;
158  RowMajorStrg = 0;
159  return;
160 }
void F77_chemv(FCHAR, FINT, const void *, const void *, FINT, const void *, FINT, const void *, void *, FINT)
#define F77_lda
#define F77_UL
int CBLAS_CallFromC
Definition: cblas_globals.c:1
#define F77_N
#define F77_incY
void cblas_xerbla(int p, const char *rout, const char *form,...)
Definition: cblas_xerbla.c:8
const int N
Definition: speed_test.cpp:3
#define F77_incX
int RowMajorStrg
Definition: cblas_globals.c:2

◆ cblas_cher()

void cblas_cher ( const enum CBLAS_ORDER  order,
const enum CBLAS_UPLO  Uplo,
const int  N,
const float  alpha,
const void *  X,
const int  incX,
void *  A,
const int  lda 
)

Definition at line 12 of file cblas_cher.c.

15 {
16  char UL;
17 #ifdef F77_CHAR
18  F77_CHAR F77_UL;
19 #else
20  #define F77_UL &UL
21 #endif
22 
23 #ifdef F77_INT
24  F77_INT F77_N=N, F77_lda=lda, F77_incX=incX;
25 #else
26  #define F77_N N
27  #define F77_lda lda
28  #define F77_incX incx
29 #endif
30  int n, i, tincx, incx=incX;
31  float *x=(float *)X, *xx=(float *)X, *tx, *st;
32 
33  extern int CBLAS_CallFromC;
34  extern int RowMajorStrg;
35  RowMajorStrg = 0;
36 
37  CBLAS_CallFromC = 1;
38  if (order == CblasColMajor)
39  {
40  if (Uplo == CblasLower) UL = 'L';
41  else if (Uplo == CblasUpper) UL = 'U';
42  else
43  {
44  cblas_xerbla(2, "cblas_cher","Illegal Uplo setting, %d\n",Uplo );
45  CBLAS_CallFromC = 0;
46  RowMajorStrg = 0;
47  return;
48  }
49  #ifdef F77_CHAR
50  F77_UL = C2F_CHAR(&UL);
51  #endif
52 
53  F77_cher(F77_UL, &F77_N, &alpha, X, &F77_incX, A, &F77_lda);
54 
55  } else if (order == CblasRowMajor)
56  {
57  RowMajorStrg = 1;
58  if (Uplo == CblasUpper) UL = 'L';
59  else if (Uplo == CblasLower) UL = 'U';
60  else
61  {
62  cblas_xerbla(2, "cblas_cher","Illegal Uplo setting, %d\n", Uplo);
63  CBLAS_CallFromC = 0;
64  RowMajorStrg = 0;
65  return;
66  }
67  #ifdef F77_CHAR
68  F77_UL = C2F_CHAR(&UL);
69  #endif
70  if (N > 0)
71  {
72  n = N << 1;
73  x = malloc(n*sizeof(float));
74  tx = x;
75  if( incX > 0 ) {
76  i = incX << 1 ;
77  tincx = 2;
78  st= x+n;
79  } else {
80  i = incX *(-2);
81  tincx = -2;
82  st = x-2;
83  x +=(n-2);
84  }
85  do
86  {
87  *x = *xx;
88  x[1] = -xx[1];
89  x += tincx ;
90  xx += i;
91  }
92  while (x != st);
93  x=tx;
94 
95  #ifdef F77_INT
96  F77_incX = 1;
97  #else
98  incx = 1;
99  #endif
100  }
101  else x = (float *) X;
102  F77_cher(F77_UL, &F77_N, &alpha, x, &F77_incX, A, &F77_lda);
103  } else
104  {
105  cblas_xerbla(1, "cblas_cher","Illegal Order setting, %d\n", order);
106  CBLAS_CallFromC = 0;
107  RowMajorStrg = 0;
108  return;
109  }
110  if(X!=x)
111  free(x);
112 
113  CBLAS_CallFromC = 0;
114  RowMajorStrg = 0;
115  return;
116 }
#define F77_N
void F77_cher(FCHAR, FINT, const float *, const void *, FINT, void *, FINT)
int CBLAS_CallFromC
Definition: cblas_globals.c:1
void cblas_xerbla(int p, const char *rout, const char *form,...)
Definition: cblas_xerbla.c:8
#define F77_incX
#define F77_lda
const int N
Definition: speed_test.cpp:3
int RowMajorStrg
Definition: cblas_globals.c:2
#define F77_UL

◆ cblas_cher2()

void cblas_cher2 ( const enum CBLAS_ORDER  order,
const enum CBLAS_UPLO  Uplo,
const int  N,
const void *  alpha,
const void *  X,
const int  incX,
const void *  Y,
const int  incY,
void *  A,
const int  lda 
)

Definition at line 12 of file cblas_cher2.c.

15 {
16  char UL;
17 #ifdef F77_CHAR
18  F77_CHAR F77_UL;
19 #else
20  #define F77_UL &UL
21 #endif
22 
23 #ifdef F77_INT
24  F77_INT F77_N=N, F77_lda=lda, F77_incX=incX, F77_incY=incY;
25 #else
26  #define F77_N N
27  #define F77_lda lda
28  #define F77_incX incx
29  #define F77_incY incy
30 #endif
31  int n, i, j, tincx, tincy, incx=incX, incy=incY;
32  float *x=(float *)X, *xx=(float *)X, *y=(float *)Y,
33  *yy=(float *)Y, *tx, *ty, *stx, *sty;
34 
35  extern int CBLAS_CallFromC;
36  extern int RowMajorStrg;
37  RowMajorStrg = 0;
38 
39  CBLAS_CallFromC = 1;
40  if (order == CblasColMajor)
41  {
42  if (Uplo == CblasLower) UL = 'L';
43  else if (Uplo == CblasUpper) UL = 'U';
44  else
45  {
46  cblas_xerbla(2, "cblas_cher2","Illegal Uplo setting, %d\n",Uplo );
47  CBLAS_CallFromC = 0;
48  RowMajorStrg = 0;
49  return;
50  }
51  #ifdef F77_CHAR
52  F77_UL = C2F_CHAR(&UL);
53  #endif
54 
55  F77_cher2(F77_UL, &F77_N, alpha, X, &F77_incX,
56  Y, &F77_incY, A, &F77_lda);
57 
58  } else if (order == CblasRowMajor)
59  {
60  RowMajorStrg = 1;
61  if (Uplo == CblasUpper) UL = 'L';
62  else if (Uplo == CblasLower) UL = 'U';
63  else
64  {
65  cblas_xerbla(2, "cblas_cher2","Illegal Uplo setting, %d\n", Uplo);
66  CBLAS_CallFromC = 0;
67  RowMajorStrg = 0;
68  return;
69  }
70  #ifdef F77_CHAR
71  F77_UL = C2F_CHAR(&UL);
72  #endif
73  if (N > 0)
74  {
75  n = N << 1;
76  x = malloc(n*sizeof(float));
77  y = malloc(n*sizeof(float));
78  tx = x;
79  ty = y;
80  if( incX > 0 ) {
81  i = incX << 1 ;
82  tincx = 2;
83  stx= x+n;
84  } else {
85  i = incX *(-2);
86  tincx = -2;
87  stx = x-2;
88  x +=(n-2);
89  }
90 
91  if( incY > 0 ) {
92  j = incY << 1;
93  tincy = 2;
94  sty= y+n;
95  } else {
96  j = incY *(-2);
97  tincy = -2;
98  sty = y-2;
99  y +=(n-2);
100  }
101 
102  do
103  {
104  *x = *xx;
105  x[1] = -xx[1];
106  x += tincx ;
107  xx += i;
108  }
109  while (x != stx);
110 
111  do
112  {
113  *y = *yy;
114  y[1] = -yy[1];
115  y += tincy ;
116  yy += j;
117  }
118  while (y != sty);
119 
120  x=tx;
121  y=ty;
122 
123  #ifdef F77_INT
124  F77_incX = 1;
125  F77_incY = 1;
126  #else
127  incx = 1;
128  incy = 1;
129  #endif
130  } else
131  {
132  x = (float *) X;
133  y = (float *) Y;
134  }
135  F77_cher2(F77_UL, &F77_N, alpha, y, &F77_incY, x,
136  &F77_incX, A, &F77_lda);
137  } else
138  {
139  cblas_xerbla(1, "cblas_cher2","Illegal Order setting, %d\n", order);
140  CBLAS_CallFromC = 0;
141  RowMajorStrg = 0;
142  return;
143  }
144  if(X!=x)
145  free(x);
146  if(Y!=y)
147  free(y);
148 
149  CBLAS_CallFromC = 0;
150  RowMajorStrg = 0;
151  return;
152 }
#define F77_incX
#define F77_N
#define F77_lda
#define F77_UL
int CBLAS_CallFromC
Definition: cblas_globals.c:1
#define F77_incY
void cblas_xerbla(int p, const char *rout, const char *form,...)
Definition: cblas_xerbla.c:8
void F77_cher2(FCHAR, FINT, const void *, const void *, FINT, const void *, FINT, void *, FINT)
const int N
Definition: speed_test.cpp:3
int RowMajorStrg
Definition: cblas_globals.c:2

◆ cblas_cher2k()

void cblas_cher2k ( const enum CBLAS_ORDER  Order,
const enum CBLAS_UPLO  Uplo,
const enum CBLAS_TRANSPOSE  Trans,
const int  N,
const int  K,
const void *  alpha,
const void *  A,
const int  lda,
const void *  B,
const int  ldb,
const float  beta,
void *  C,
const int  ldc 
)

Definition at line 12 of file cblas_cher2k.c.

17 {
18  char UL, TR;
19 #ifdef F77_CHAR
20  F77_CHAR F77_TR, F77_UL;
21 #else
22  #define F77_TR &TR
23  #define F77_UL &UL
24 #endif
25 
26 #ifdef F77_INT
27  F77_INT F77_N=N, F77_K=K, F77_lda=lda, F77_ldb=ldb;
28  F77_INT F77_ldc=ldc;
29 #else
30  #define F77_N N
31  #define F77_K K
32  #define F77_lda lda
33  #define F77_ldb ldb
34  #define F77_ldc ldc
35 #endif
36 
37  extern int CBLAS_CallFromC;
38  extern int RowMajorStrg;
39  float ALPHA[2];
40  const float *alp=(float *)alpha;
41 
42  CBLAS_CallFromC = 1;
43  RowMajorStrg = 0;
44 
45  if( Order == CblasColMajor )
46  {
47 
48  if( Uplo == CblasUpper) UL='U';
49  else if ( Uplo == CblasLower ) UL='L';
50  else
51  {
52  cblas_xerbla(2, "cblas_cher2k", "Illegal Uplo setting, %d\n", Uplo);
53  CBLAS_CallFromC = 0;
54  RowMajorStrg = 0;
55  return;
56  }
57 
58  if( Trans == CblasTrans) TR ='T';
59  else if ( Trans == CblasConjTrans ) TR='C';
60  else if ( Trans == CblasNoTrans ) TR='N';
61  else
62  {
63  cblas_xerbla(3, "cblas_cher2k", "Illegal Trans setting, %d\n", Trans);
64  CBLAS_CallFromC = 0;
65  RowMajorStrg = 0;
66  return;
67  }
68 
69  #ifdef F77_CHAR
70  F77_UL = C2F_CHAR(&UL);
71  F77_TR = C2F_CHAR(&TR);
72  #endif
73 
74  F77_cher2k(F77_UL, F77_TR, &F77_N, &F77_K, alpha, A, &F77_lda, B, &F77_ldb, &beta, C, &F77_ldc);
75  } else if (Order == CblasRowMajor)
76  {
77  RowMajorStrg = 1;
78 
79  if( Uplo == CblasUpper) UL='L';
80  else if ( Uplo == CblasLower ) UL='U';
81  else
82  {
83  cblas_xerbla(2, "cblas_cher2k", "Illegal Uplo setting, %d\n", Uplo);
84  CBLAS_CallFromC = 0;
85  RowMajorStrg = 0;
86  return;
87  }
88  if( Trans == CblasTrans) TR ='N';
89  else if ( Trans == CblasConjTrans ) TR='N';
90  else if ( Trans == CblasNoTrans ) TR='C';
91  else
92  {
93  cblas_xerbla(3, "cblas_cher2k", "Illegal Trans setting, %d\n", Trans);
94  CBLAS_CallFromC = 0;
95  RowMajorStrg = 0;
96  return;
97  }
98  #ifdef F77_CHAR
99  F77_UL = C2F_CHAR(&UL);
100  F77_TR = C2F_CHAR(&TR);
101  #endif
102 
103  ALPHA[0]= *alp;
104  ALPHA[1]= -alp[1];
105  F77_cher2k(F77_UL,F77_TR, &F77_N, &F77_K, ALPHA, A, &F77_lda, B, &F77_ldb, &beta, C, &F77_ldc);
106  }
107  else cblas_xerbla(1, "cblas_cher2k", "Illegal Order setting, %d\n", Order);
108  CBLAS_CallFromC = 0;
109  RowMajorStrg = 0;
110  return;
111 }
#define F77_TR
#define F77_K
#define F77_ldb
#define F77_UL
#define F77_lda
int CBLAS_CallFromC
Definition: cblas_globals.c:1
#define F77_ldc
#define F77_N
void F77_cher2k(FCHAR, FCHAR, FINT, FINT, const float *, const float *, FINT, const float *, FINT, const float *, float *, FINT)
void cblas_xerbla(int p, const char *rout, const char *form,...)
Definition: cblas_xerbla.c:8
const int N
Definition: speed_test.cpp:3
int RowMajorStrg
Definition: cblas_globals.c:2

◆ cblas_cherk()

void cblas_cherk ( const enum CBLAS_ORDER  Order,
const enum CBLAS_UPLO  Uplo,
const enum CBLAS_TRANSPOSE  Trans,
const int  N,
const int  K,
const float  alpha,
const void *  A,
const int  lda,
const float  beta,
void *  C,
const int  ldc 
)

Definition at line 12 of file cblas_cherk.c.

16 {
17  char UL, TR;
18 #ifdef F77_CHAR
19  F77_CHAR F77_TR, F77_UL;
20 #else
21  #define F77_TR &TR
22  #define F77_UL &UL
23 #endif
24 
25 #ifdef F77_INT
26  F77_INT F77_N=N, F77_K=K, F77_lda=lda;
27  F77_INT F77_ldc=ldc;
28 #else
29  #define F77_N N
30  #define F77_K K
31  #define F77_lda lda
32  #define F77_ldc ldc
33 #endif
34 
35  extern int CBLAS_CallFromC;
36  extern int RowMajorStrg;
37  RowMajorStrg = 0;
38  CBLAS_CallFromC = 1;
39 
40  if( Order == CblasColMajor )
41  {
42  if( Uplo == CblasUpper) UL='U';
43  else if ( Uplo == CblasLower ) UL='L';
44  else
45  {
46  cblas_xerbla(2, "cblas_cherk", "Illegal Uplo setting, %d\n", Uplo);
47  CBLAS_CallFromC = 0;
48  RowMajorStrg = 0;
49  return;
50  }
51 
52  if( Trans == CblasTrans) TR ='T';
53  else if ( Trans == CblasConjTrans ) TR='C';
54  else if ( Trans == CblasNoTrans ) TR='N';
55  else
56  {
57  cblas_xerbla(3, "cblas_cherk", "Illegal Trans setting, %d\n", Trans);
58  CBLAS_CallFromC = 0;
59  RowMajorStrg = 0;
60  return;
61  }
62 
63  #ifdef F77_CHAR
64  F77_UL = C2F_CHAR(&UL);
65  F77_TR = C2F_CHAR(&TR);
66  #endif
67 
68  F77_cherk(F77_UL, F77_TR, &F77_N, &F77_K, &alpha, A, &F77_lda,
69  &beta, C, &F77_ldc);
70  } else if (Order == CblasRowMajor)
71  {
72  RowMajorStrg = 1;
73  if( Uplo == CblasUpper) UL='L';
74  else if ( Uplo == CblasLower ) UL='U';
75  else
76  {
77  cblas_xerbla(3, "cblas_cherk", "Illegal Uplo setting, %d\n", Uplo);
78  CBLAS_CallFromC = 0;
79  RowMajorStrg = 0;
80  return;
81  }
82  if( Trans == CblasTrans) TR ='N';
83  else if ( Trans == CblasConjTrans ) TR='N';
84  else if ( Trans == CblasNoTrans ) TR='C';
85  else
86  {
87  cblas_xerbla(3, "cblas_cherk", "Illegal Trans setting, %d\n", Trans);
88  CBLAS_CallFromC = 0;
89  RowMajorStrg = 0;
90  return;
91  }
92 
93  #ifdef F77_CHAR
94  F77_UL = C2F_CHAR(&UL);
95  F77_SD = C2F_CHAR(&SD);
96  #endif
97 
98  F77_cherk(F77_UL, F77_TR, &F77_N, &F77_K, &alpha, A, &F77_lda,
99  &beta, C, &F77_ldc);
100  }
101  else cblas_xerbla(1, "cblas_cherk", "Illegal Order setting, %d\n", Order);
102  CBLAS_CallFromC = 0;
103  RowMajorStrg = 0;
104  return;
105 }
#define F77_N
int CBLAS_CallFromC
Definition: cblas_globals.c:1
#define F77_lda
#define F77_TR
#define F77_ldc
#define F77_SD
void cblas_xerbla(int p, const char *rout, const char *form,...)
Definition: cblas_xerbla.c:8
#define F77_K
const int N
Definition: speed_test.cpp:3
void F77_cherk(FCHAR, FCHAR, FINT, FINT, const float *, const float *, FINT, const float *, float *, FINT)
#define F77_UL
int RowMajorStrg
Definition: cblas_globals.c:2

◆ cblas_chpmv()

void cblas_chpmv ( const enum CBLAS_ORDER  order,
const enum CBLAS_UPLO  Uplo,
const int  N,
const void *  alpha,
const void *  Ap,
const void *  X,
const int  incX,
const void *  beta,
void *  Y,
const int  incY 
)

Definition at line 12 of file cblas_chpmv.c.

17 {
18  char UL;
19 #ifdef F77_CHAR
20  F77_CHAR F77_UL;
21 #else
22  #define F77_UL &UL
23 #endif
24 #ifdef F77_INT
25  F77_INT F77_N=N, F77_K=K, F77_lda=lda, F77_incX=incX, F77_incY=incY;
26 #else
27  #define F77_N N
28  #define F77_incX incx
29  #define F77_incY incY
30 #endif
31  int n, i=0, incx=incX;
32  const float *xx= (float *)X, *alp= (float *)alpha, *bet = (float *)beta;
33  float ALPHA[2],BETA[2];
34  int tincY, tincx;
35  float *x=(float *)X, *y=(float *)Y, *st=0, *tx;
36  extern int CBLAS_CallFromC;
37  extern int RowMajorStrg;
38  RowMajorStrg = 0;
39 
40  CBLAS_CallFromC = 1;
41  if (order == CblasColMajor)
42  {
43  if (Uplo == CblasLower) UL = 'L';
44  else if (Uplo == CblasUpper) UL = 'U';
45  else
46  {
47  cblas_xerbla(2, "cblas_chpmv","Illegal Uplo setting, %d\n",Uplo );
48  CBLAS_CallFromC = 0;
49  RowMajorStrg = 0;
50  return;
51  }
52  #ifdef F77_CHAR
53  F77_UL = C2F_CHAR(&UL);
54  #endif
55  F77_chpmv(F77_UL, &F77_N, alpha, AP, X,
56  &F77_incX, beta, Y, &F77_incY);
57  }
58  else if (order == CblasRowMajor)
59  {
60  RowMajorStrg = 1;
61  ALPHA[0]= *alp;
62  ALPHA[1]= -alp[1];
63  BETA[0]= *bet;
64  BETA[1]= -bet[1];
65 
66  if (N > 0)
67  {
68  n = N << 1;
69  x = malloc(n*sizeof(float));
70 
71  tx = x;
72  if( incX > 0 ) {
73  i = incX << 1;
74  tincx = 2;
75  st= x+n;
76  } else {
77  i = incX *(-2);
78  tincx = -2;
79  st = x-2;
80  x +=(n-2);
81  }
82 
83  do
84  {
85  *x = *xx;
86  x[1] = -xx[1];
87  x += tincx ;
88  xx += i;
89  }
90  while (x != st);
91  x=tx;
92 
93 
94  #ifdef F77_INT
95  F77_incX = 1;
96  #else
97  incx = 1;
98  #endif
99 
100  if(incY > 0)
101  tincY = incY;
102  else
103  tincY = -incY;
104  y++;
105 
106  i = tincY << 1;
107  n = i * N ;
108  st = y + n;
109  do {
110  *y = -(*y);
111  y += i;
112  } while(y != st);
113  y -= n;
114  } else
115  x = (float *) X;
116 
117 
118  if (Uplo == CblasUpper) UL = 'L';
119  else if (Uplo == CblasLower) UL = 'U';
120  else
121  {
122  cblas_xerbla(2, "cblas_chpmv","Illegal Uplo setting, %d\n", Uplo );
123  CBLAS_CallFromC = 0;
124  RowMajorStrg = 0;
125  return;
126  }
127  #ifdef F77_CHAR
128  F77_UL = C2F_CHAR(&UL);
129  #endif
130 
131  F77_chpmv(F77_UL, &F77_N, ALPHA,
132  AP, x, &F77_incX, BETA, Y, &F77_incY);
133  }
134  else
135  {
136  cblas_xerbla(1, "cblas_chpmv","Illegal Order setting, %d\n", order);
137  CBLAS_CallFromC = 0;
138  RowMajorStrg = 0;
139  return;
140  }
141  if ( order == CblasRowMajor )
142  {
143  RowMajorStrg = 1;
144  if(X!=x)
145  free(x);
146  if (N > 0)
147  {
148  do
149  {
150  *y = -(*y);
151  y += i;
152  }
153  while (y != st);
154  }
155  }
156 
157  CBLAS_CallFromC = 0;
158  RowMajorStrg = 0;
159  return;
160 }
#define F77_lda
#define F77_incY
#define F77_N
#define F77_UL
#define F77_incX
int CBLAS_CallFromC
Definition: cblas_globals.c:1
void cblas_xerbla(int p, const char *rout, const char *form,...)
Definition: cblas_xerbla.c:8
#define F77_K
void F77_chpmv(FCHAR, FINT, const void *, const void *, const void *, FINT, const void *, void *, FINT)
const int N
Definition: speed_test.cpp:3
int RowMajorStrg
Definition: cblas_globals.c:2

◆ cblas_chpr()

void cblas_chpr ( const enum CBLAS_ORDER  order,
const enum CBLAS_UPLO  Uplo,
const int  N,
const float  alpha,
const void *  X,
const int  incX,
void *  A 
)

Definition at line 12 of file cblas_chpr.c.

15 {
16  char UL;
17 #ifdef F77_CHAR
18  F77_CHAR F77_UL;
19 #else
20  #define F77_UL &UL
21 #endif
22 
23 #ifdef F77_INT
24  F77_INT F77_N=N, F77_incX=incX;
25 #else
26  #define F77_N N
27  #define F77_incX incx
28 #endif
29  int n, i, tincx, incx=incX;
30  float *x=(float *)X, *xx=(float *)X, *tx, *st;
31 
32  extern int CBLAS_CallFromC;
33  extern int RowMajorStrg;
34  RowMajorStrg = 0;
35 
36  CBLAS_CallFromC = 1;
37  if (order == CblasColMajor)
38  {
39  if (Uplo == CblasLower) UL = 'L';
40  else if (Uplo == CblasUpper) UL = 'U';
41  else
42  {
43  cblas_xerbla(2, "cblas_chpr","Illegal Uplo setting, %d\n",Uplo );
44  CBLAS_CallFromC = 0;
45  RowMajorStrg = 0;
46  return;
47  }
48  #ifdef F77_CHAR
49  F77_UL = C2F_CHAR(&UL);
50  #endif
51 
52  F77_chpr(F77_UL, &F77_N, &alpha, X, &F77_incX, A);
53 
54  } else if (order == CblasRowMajor)
55  {
56  RowMajorStrg = 1;
57  if (Uplo == CblasUpper) UL = 'L';
58  else if (Uplo == CblasLower) UL = 'U';
59  else
60  {
61  cblas_xerbla(2, "cblas_chpr","Illegal Uplo setting, %d\n", Uplo);
62  CBLAS_CallFromC = 0;
63  RowMajorStrg = 0;
64  return;
65  }
66  #ifdef F77_CHAR
67  F77_UL = C2F_CHAR(&UL);
68  #endif
69  if (N > 0)
70  {
71  n = N << 1;
72  x = malloc(n*sizeof(float));
73  tx = x;
74  if( incX > 0 ) {
75  i = incX << 1;
76  tincx = 2;
77  st= x+n;
78  } else {
79  i = incX *(-2);
80  tincx = -2;
81  st = x-2;
82  x +=(n-2);
83  }
84  do
85  {
86  *x = *xx;
87  x[1] = -xx[1];
88  x += tincx ;
89  xx += i;
90  }
91  while (x != st);
92  x=tx;
93  #ifdef F77_INT
94  F77_incX = 1;
95  #else
96  incx = 1;
97  #endif
98  }
99  else x = (float *) X;
100 
101  F77_chpr(F77_UL, &F77_N, &alpha, x, &F77_incX, A);
102 
103  } else
104  {
105  cblas_xerbla(1, "cblas_chpr","Illegal Order setting, %d\n", order);
106  CBLAS_CallFromC = 0;
107  RowMajorStrg = 0;
108  return;
109  }
110  if(X!=x)
111  free(x);
112  CBLAS_CallFromC = 0;
113  RowMajorStrg = 0;
114  return;
115 }
#define F77_UL
#define F77_N
int CBLAS_CallFromC
Definition: cblas_globals.c:1
void F77_chpr(FCHAR, FINT, const float *, const void *, FINT, void *)
#define F77_incX
void cblas_xerbla(int p, const char *rout, const char *form,...)
Definition: cblas_xerbla.c:8
const int N
Definition: speed_test.cpp:3
int RowMajorStrg
Definition: cblas_globals.c:2

◆ cblas_chpr2()

void cblas_chpr2 ( const enum CBLAS_ORDER  order,
const enum CBLAS_UPLO  Uplo,
const int  N,
const void *  alpha,
const void *  X,
const int  incX,
const void *  Y,
const int  incY,
void *  Ap 
)

Definition at line 12 of file cblas_chpr2.c.

16 {
17  char UL;
18 #ifdef F77_CHAR
19  F77_CHAR F77_UL;
20 #else
21  #define F77_UL &UL
22 #endif
23 
24 #ifdef F77_INT
25  F77_INT F77_N=N, F77_incX=incX, F77_incY=incY;
26 #else
27  #define F77_N N
28  #define F77_incX incx
29  #define F77_incY incy
30 #endif
31  int n, i, j, tincx, tincy, incx=incX, incy=incY;
32  float *x=(float *)X, *xx=(float *)X, *y=(float *)Y,
33  *yy=(float *)Y, *tx, *ty, *stx, *sty;
34 
35  extern int CBLAS_CallFromC;
36  extern int RowMajorStrg;
37  RowMajorStrg = 0;
38 
39  CBLAS_CallFromC = 1;
40  if (order == CblasColMajor)
41  {
42  if (Uplo == CblasLower) UL = 'L';
43  else if (Uplo == CblasUpper) UL = 'U';
44  else
45  {
46  cblas_xerbla(2, "cblas_chpr2","Illegal Uplo setting, %d\n",Uplo );
47  CBLAS_CallFromC = 0;
48  RowMajorStrg = 0;
49  return;
50  }
51  #ifdef F77_CHAR
52  F77_UL = C2F_CHAR(&UL);
53  #endif
54 
55  F77_chpr2(F77_UL, &F77_N, alpha, X, &F77_incX, Y, &F77_incY, Ap);
56 
57  } else if (order == CblasRowMajor)
58  {
59  RowMajorStrg = 1;
60  if (Uplo == CblasUpper) UL = 'L';
61  else if (Uplo == CblasLower) UL = 'U';
62  else
63  {
64  cblas_xerbla(2, "cblas_chpr2","Illegal Uplo setting, %d\n", Uplo);
65  CBLAS_CallFromC = 0;
66  RowMajorStrg = 0;
67  return;
68  }
69  #ifdef F77_CHAR
70  F77_UL = C2F_CHAR(&UL);
71  #endif
72  if (N > 0)
73  {
74  n = N << 1;
75  x = malloc(n*sizeof(float));
76  y = malloc(n*sizeof(float));
77  tx = x;
78  ty = y;
79  if( incX > 0 ) {
80  i = incX << 1 ;
81  tincx = 2;
82  stx= x+n;
83  } else {
84  i = incX *(-2);
85  tincx = -2;
86  stx = x-2;
87  x +=(n-2);
88  }
89 
90  if( incY > 0 ) {
91  j = incY << 1;
92  tincy = 2;
93  sty= y+n;
94  } else {
95  j = incY *(-2);
96  tincy = -2;
97  sty = y-2;
98  y +=(n-2);
99  }
100 
101  do
102  {
103  *x = *xx;
104  x[1] = -xx[1];
105  x += tincx ;
106  xx += i;
107  }
108  while (x != stx);
109  do
110  {
111  *y = *yy;
112  y[1] = -yy[1];
113  y += tincy ;
114  yy += j;
115  }
116  while (y != sty);
117 
118  x=tx;
119  y=ty;
120 
121  #ifdef F77_INT
122  F77_incX = 1;
123  F77_incY = 1;
124  #else
125  incx = 1;
126  incy = 1;
127  #endif
128 
129  } else
130  {
131  x = (float *) X;
132  y = (void *) Y;
133  }
134  F77_chpr2(F77_UL, &F77_N, alpha, y, &F77_incY, x, &F77_incX, Ap);
135  } else
136  {
137  cblas_xerbla(1, "cblas_chpr2","Illegal Order setting, %d\n", order);
138  CBLAS_CallFromC = 0;
139  RowMajorStrg = 0;
140  return;
141  }
142  if(X!=x)
143  free(x);
144  if(Y!=y)
145  free(y);
146  CBLAS_CallFromC = 0;
147  RowMajorStrg = 0;
148  return;
149 }
void F77_chpr2(FCHAR, FINT, const float *, const void *, FINT, const void *, FINT, void *)
#define F77_incY
int CBLAS_CallFromC
Definition: cblas_globals.c:1
#define F77_UL
#define F77_incX
void cblas_xerbla(int p, const char *rout, const char *form,...)
Definition: cblas_xerbla.c:8
const int N
Definition: speed_test.cpp:3
#define F77_N
int RowMajorStrg
Definition: cblas_globals.c:2

◆ cblas_cscal()

void cblas_cscal ( const int  N,
const void *  alpha,
void *  X,
const int  incX 
)

Definition at line 11 of file cblas_cscal.c.

13 {
14 #ifdef F77_INT
15  F77_INT F77_N=N, F77_incX=incX;
16 #else
17  #define F77_N N
18  #define F77_incX incX
19 #endif
20  F77_cscal( &F77_N, alpha, X, &F77_incX);
21 }
void F77_cscal(FINT, const void *, void *, FINT)
#define F77_N
#define F77_incX
const int N
Definition: speed_test.cpp:3

◆ cblas_csscal()

void cblas_csscal ( const int  N,
const float  alpha,
void *  X,
const int  incX 
)

Definition at line 11 of file cblas_csscal.c.

13 {
14 #ifdef F77_INT
15  F77_INT F77_N=N, F77_incX=incX;
16 #else
17  #define F77_N N
18  #define F77_incX incX
19 #endif
20  F77_csscal( &F77_N, &alpha, X, &F77_incX);
21 }
#define F77_N
#define F77_incX
void F77_csscal(FINT, const float *, void *, FINT)
const int N
Definition: speed_test.cpp:3

◆ cblas_cswap()

void cblas_cswap ( const int  N,
void *  X,
const int  incX,
void *  Y,
const int  incY 
)

Definition at line 11 of file cblas_cswap.c.

13 {
14 #ifdef F77_INT
15  F77_INT F77_N=N, F77_incX=incX, F77_incY=incY;
16 #else
17  #define F77_N N
18  #define F77_incX incX
19  #define F77_incY incY
20 #endif
21  F77_cswap( &F77_N, X, &F77_incX, Y, &F77_incY);
22 }
#define F77_incY
void F77_cswap(FINT, void *, FINT, void *, FINT)
#define F77_incX
#define F77_N
const int N
Definition: speed_test.cpp:3

◆ cblas_csymm()

void cblas_csymm ( const enum CBLAS_ORDER  Order,
const enum CBLAS_SIDE  Side,
const enum CBLAS_UPLO  Uplo,
const int  M,
const int  N,
const void *  alpha,
const void *  A,
const int  lda,
const void *  B,
const int  ldb,
const void *  beta,
void *  C,
const int  ldc 
)

Definition at line 12 of file cblas_csymm.c.

17 {
18  char SD, UL;
19 #ifdef F77_CHAR
20  F77_CHAR F77_SD, F77_UL;
21 #else
22  #define F77_SD &SD
23  #define F77_UL &UL
24 #endif
25 
26 #ifdef F77_INT
27  F77_INT F77_M=M, F77_N=N, F77_lda=lda, F77_ldb=ldb;
28  F77_INT F77_ldc=ldc;
29 #else
30  #define F77_M M
31  #define F77_N N
32  #define F77_lda lda
33  #define F77_ldb ldb
34  #define F77_ldc ldc
35 #endif
36 
37  extern int CBLAS_CallFromC;
38  extern int RowMajorStrg;
39  RowMajorStrg = 0;
40  CBLAS_CallFromC = 1;
41 
42  if( Order == CblasColMajor )
43  {
44  if( Side == CblasRight) SD='R';
45  else if ( Side == CblasLeft ) SD='L';
46  else
47  {
48  cblas_xerbla(2, "cblas_csymm", "Illegal Side setting, %d\n", Side);
49  CBLAS_CallFromC = 0;
50  RowMajorStrg = 0;
51  return;
52  }
53 
54  if( Uplo == CblasUpper) UL='U';
55  else if ( Uplo == CblasLower ) UL='L';
56  else
57  {
58  cblas_xerbla(3, "cblas_csymm", "Illegal Uplo setting, %d\n", Uplo);
59  CBLAS_CallFromC = 0;
60  RowMajorStrg = 0;
61  return;
62  }
63 
64  #ifdef F77_CHAR
65  F77_UL = C2F_CHAR(&UL);
66  F77_SD = C2F_CHAR(&SD);
67  #endif
68 
69  F77_csymm(F77_SD, F77_UL, &F77_M, &F77_N, alpha, A, &F77_lda,
70  B, &F77_ldb, beta, C, &F77_ldc);
71  } else if (Order == CblasRowMajor)
72  {
73  RowMajorStrg = 1;
74  if( Side == CblasRight) SD='L';
75  else if ( Side == CblasLeft ) SD='R';
76  else
77  {
78  cblas_xerbla(2, "cblas_csymm", "Illegal Side setting, %d\n", Side);
79  CBLAS_CallFromC = 0;
80  RowMajorStrg = 0;
81  return;
82  }
83 
84  if( Uplo == CblasUpper) UL='L';
85  else if ( Uplo == CblasLower ) UL='U';
86  else
87  {
88  cblas_xerbla(3, "cblas_csymm", "Illegal Uplo setting, %d\n", Uplo);
89  CBLAS_CallFromC = 0;
90  RowMajorStrg = 0;
91  return;
92  }
93 
94  #ifdef F77_CHAR
95  F77_UL = C2F_CHAR(&UL);
96  F77_SD = C2F_CHAR(&SD);
97  #endif
98 
99  F77_csymm(F77_SD, F77_UL, &F77_N, &F77_M, alpha, A, &F77_lda,
100  B, &F77_ldb, beta, C, &F77_ldc);
101  }
102  else cblas_xerbla(1, "cblas_csymm", "Illegal Order setting, %d\n", Order);
103  CBLAS_CallFromC = 0;
104  RowMajorStrg = 0;
105  return;
106 }
#define F77_SD
#define F77_UL
#define F77_N
#define F77_M
int CBLAS_CallFromC
Definition: cblas_globals.c:1
#define F77_ldb
void cblas_xerbla(int p, const char *rout, const char *form,...)
Definition: cblas_xerbla.c:8
void F77_csymm(FCHAR, FCHAR, FINT, FINT, const float *, const float *, FINT, const float *, FINT, const float *, float *, FINT)
#define F77_lda
#define F77_ldc
const int N
Definition: speed_test.cpp:3
int RowMajorStrg
Definition: cblas_globals.c:2

◆ cblas_csyr2k()

void cblas_csyr2k ( const enum CBLAS_ORDER  Order,
const enum CBLAS_UPLO  Uplo,
const enum CBLAS_TRANSPOSE  Trans,
const int  N,
const int  K,
const void *  alpha,
const void *  A,
const int  lda,
const void *  B,
const int  ldb,
const void *  beta,
void *  C,
const int  ldc 
)

Definition at line 12 of file cblas_csyr2k.c.

17 {
18  char UL, TR;
19 #ifdef F77_CHAR
20  F77_CHAR F77_TR, F77_UL;
21 #else
22  #define F77_TR &TR
23  #define F77_UL &UL
24 #endif
25 
26 #ifdef F77_INT
27  F77_INT F77_N=N, F77_K=K, F77_lda=lda, F77_ldb=ldb;
28  F77_INT F77_ldc=ldc;
29 #else
30  #define F77_N N
31  #define F77_K K
32  #define F77_lda lda
33  #define F77_ldb ldb
34  #define F77_ldc ldc
35 #endif
36 
37  extern int CBLAS_CallFromC;
38  extern int RowMajorStrg;
39  RowMajorStrg = 0;
40  CBLAS_CallFromC = 1;
41 
42  if( Order == CblasColMajor )
43  {
44 
45  if( Uplo == CblasUpper) UL='U';
46  else if ( Uplo == CblasLower ) UL='L';
47  else
48  {
49  cblas_xerbla(2, "cblas_csyr2k", "Illegal Uplo setting, %d\n", Uplo);
50  CBLAS_CallFromC = 0;
51  RowMajorStrg = 0;
52  return;
53  }
54 
55  if( Trans == CblasTrans) TR ='T';
56  else if ( Trans == CblasConjTrans ) TR='C';
57  else if ( Trans == CblasNoTrans ) TR='N';
58  else
59  {
60  cblas_xerbla(3, "cblas_csyr2k", "Illegal Trans setting, %d\n", Trans);
61  CBLAS_CallFromC = 0;
62  RowMajorStrg = 0;
63  return;
64  }
65 
66 
67  #ifdef F77_CHAR
68  F77_UL = C2F_CHAR(&UL);
69  F77_TR = C2F_CHAR(&TR);
70  #endif
71 
72  F77_csyr2k(F77_UL, F77_TR, &F77_N, &F77_K, alpha, A, &F77_lda,
73  B, &F77_ldb, beta, C, &F77_ldc);
74  } else if (Order == CblasRowMajor)
75  {
76  RowMajorStrg = 1;
77  if( Uplo == CblasUpper) UL='L';
78  else if ( Uplo == CblasLower ) UL='U';
79  else
80  {
81  cblas_xerbla(3, "cblas_csyr2k", "Illegal Uplo setting, %d\n", Uplo);
82  CBLAS_CallFromC = 0;
83  RowMajorStrg = 0;
84  return;
85  }
86  if( Trans == CblasTrans) TR ='N';
87  else if ( Trans == CblasConjTrans ) TR='N';
88  else if ( Trans == CblasNoTrans ) TR='T';
89  else
90  {
91  cblas_xerbla(3, "cblas_csyr2k", "Illegal Trans setting, %d\n", Trans);
92  CBLAS_CallFromC = 0;
93  RowMajorStrg = 0;
94  return;
95  }
96 
97  #ifdef F77_CHAR
98  F77_UL = C2F_CHAR(&UL);
99  F77_TR = C2F_CHAR(&TR);
100  #endif
101 
102  F77_csyr2k(F77_UL, F77_TR, &F77_N, &F77_K, alpha, A, &F77_lda, B, &F77_ldb, beta, C, &F77_ldc);
103  }
104  else cblas_xerbla(1, "cblas_csyr2k", "Illegal Order setting, %d\n", Order);
105  CBLAS_CallFromC = 0;
106  RowMajorStrg = 0;
107  return;
108 }
#define F77_TR
#define F77_UL
int CBLAS_CallFromC
Definition: cblas_globals.c:1
#define F77_N
#define F77_ldc
#define F77_lda
#define F77_K
void cblas_xerbla(int p, const char *rout, const char *form,...)
Definition: cblas_xerbla.c:8
const int N
Definition: speed_test.cpp:3
void F77_csyr2k(FCHAR, FCHAR, FINT, FINT, const float *, const float *, FINT, const float *, FINT, const float *, float *, FINT)
#define F77_ldb
int RowMajorStrg
Definition: cblas_globals.c:2

◆ cblas_csyrk()

void cblas_csyrk ( const enum CBLAS_ORDER  Order,
const enum CBLAS_UPLO  Uplo,
const enum CBLAS_TRANSPOSE  Trans,
const int  N,
const int  K,
const void *  alpha,
const void *  A,
const int  lda,
const void *  beta,
void *  C,
const int  ldc 
)

Definition at line 12 of file cblas_csyrk.c.

16 {
17  char UL, TR;
18 #ifdef F77_CHAR
19  F77_CHAR F77_TR, F77_UL;
20 #else
21  #define F77_TR &TR
22  #define F77_UL &UL
23 #endif
24 
25 #ifdef F77_INT
26  F77_INT F77_N=N, F77_K=K, F77_lda=lda;
27  F77_INT F77_ldc=ldc;
28 #else
29  #define F77_N N
30  #define F77_K K
31  #define F77_lda lda
32  #define F77_ldc ldc
33 #endif
34 
35  extern int CBLAS_CallFromC;
36  extern int RowMajorStrg;
37  RowMajorStrg = 0;
38  CBLAS_CallFromC = 1;
39 
40  if( Order == CblasColMajor )
41  {
42 
43  if( Uplo == CblasUpper) UL='U';
44  else if ( Uplo == CblasLower ) UL='L';
45  else
46  {
47  cblas_xerbla(2, "cblas_csyrk", "Illegal Uplo setting, %d\n", Uplo);
48  CBLAS_CallFromC = 0;
49  RowMajorStrg = 0;
50  return;
51  }
52 
53  if( Trans == CblasTrans) TR ='T';
54  else if ( Trans == CblasConjTrans ) TR='C';
55  else if ( Trans == CblasNoTrans ) TR='N';
56  else
57  {
58  cblas_xerbla(3, "cblas_csyrk", "Illegal Trans setting, %d\n", Trans);
59  CBLAS_CallFromC = 0;
60  RowMajorStrg = 0;
61  return;
62  }
63 
64 
65  #ifdef F77_CHAR
66  F77_UL = C2F_CHAR(&UL);
67  F77_TR = C2F_CHAR(&TR);
68  #endif
69 
70  F77_csyrk(F77_UL, F77_TR, &F77_N, &F77_K, alpha, A, &F77_lda,
71  beta, C, &F77_ldc);
72  } else if (Order == CblasRowMajor)
73  {
74  RowMajorStrg = 1;
75  if( Uplo == CblasUpper) UL='L';
76  else if ( Uplo == CblasLower ) UL='U';
77  else
78  {
79  cblas_xerbla(3, "cblas_csyrk", "Illegal Uplo setting, %d\n", Uplo);
80  CBLAS_CallFromC = 0;
81  RowMajorStrg = 0;
82  return;
83  }
84  if( Trans == CblasTrans) TR ='N';
85  else if ( Trans == CblasConjTrans ) TR='N';
86  else if ( Trans == CblasNoTrans ) TR='T';
87  else
88  {
89  cblas_xerbla(3, "cblas_csyrk", "Illegal Trans setting, %d\n", Trans);
90  CBLAS_CallFromC = 0;
91  RowMajorStrg = 0;
92  return;
93  }
94 
95  #ifdef F77_CHAR
96  F77_UL = C2F_CHAR(&UL);
97  F77_TR = C2F_CHAR(&TR);
98  #endif
99 
100  F77_csyrk(F77_UL, F77_TR, &F77_N, &F77_K, alpha, A, &F77_lda,
101  beta, C, &F77_ldc);
102  }
103  else cblas_xerbla(1, "cblas_csyrk", "Illegal Order setting, %d\n", Order);
104  CBLAS_CallFromC = 0;
105  RowMajorStrg = 0;
106  return;
107 }
void F77_csyrk(FCHAR, FCHAR, FINT, FINT, const float *, const float *, FINT, const float *, float *, FINT)
#define F77_ldc
int CBLAS_CallFromC
Definition: cblas_globals.c:1
#define F77_UL
#define F77_K
void cblas_xerbla(int p, const char *rout, const char *form,...)
Definition: cblas_xerbla.c:8
#define F77_TR
const int N
Definition: speed_test.cpp:3
#define F77_lda
#define F77_N
int RowMajorStrg
Definition: cblas_globals.c:2

◆ cblas_ctbmv()

void cblas_ctbmv ( const enum CBLAS_ORDER  order,
const enum CBLAS_UPLO  Uplo,
const enum CBLAS_TRANSPOSE  TransA,
const enum CBLAS_DIAG  Diag,
const int  N,
const int  K,
const void *  A,
const int  lda,
void *  X,
const int  incX 
)

Definition at line 10 of file cblas_ctbmv.c.

14 {
15  char TA;
16  char UL;
17  char DI;
18 #ifdef F77_CHAR
19  F77_CHAR F77_TA, F77_UL, F77_DI;
20 #else
21  #define F77_TA &TA
22  #define F77_UL &UL
23  #define F77_DI &DI
24 #endif
25 #ifdef F77_INT
26  F77_INT F77_N=N, F77_lda=lda, F77_K=K, F77_incX=incX;
27 #else
28  #define F77_N N
29  #define F77_K K
30  #define F77_lda lda
31  #define F77_incX incX
32 #endif
33  int n, i=0, tincX;
34  float *st=0, *x=(float *)X;
35  extern int CBLAS_CallFromC;
36  extern int RowMajorStrg;
37  RowMajorStrg = 0;
38 
39  CBLAS_CallFromC = 1;
40  if (order == CblasColMajor)
41  {
42  if (Uplo == CblasUpper) UL = 'U';
43  else if (Uplo == CblasLower) UL = 'L';
44  else
45  {
46  cblas_xerbla(2, "cblas_ctbmv","Illegal Uplo setting, %d\n", Uplo);
47  CBLAS_CallFromC = 0;
48  RowMajorStrg = 0;
49  return;
50  }
51  if (TransA == CblasNoTrans) TA = 'N';
52  else if (TransA == CblasTrans) TA = 'T';
53  else if (TransA == CblasConjTrans) TA = 'C';
54  else
55  {
56  cblas_xerbla(3, "cblas_ctbmv","Illegal TransA setting, %d\n", TransA);
57  CBLAS_CallFromC = 0;
58  RowMajorStrg = 0;
59  return;
60  }
61  if (Diag == CblasUnit) DI = 'U';
62  else if (Diag == CblasNonUnit) DI = 'N';
63  else
64  {
65  cblas_xerbla(4, "cblas_ctbmv","Illegal Diag setting, %d\n", Diag);
66  CBLAS_CallFromC = 0;
67  RowMajorStrg = 0;
68  return;
69  }
70  #ifdef F77_CHAR
71  F77_UL = C2F_CHAR(&UL);
72  F77_TA = C2F_CHAR(&TA);
73  F77_DI = C2F_CHAR(&DI);
74  #endif
76  &F77_incX);
77  }
78  else if (order == CblasRowMajor)
79  {
80  RowMajorStrg = 1;
81  if (Uplo == CblasUpper) UL = 'L';
82  else if (Uplo == CblasLower) UL = 'U';
83  else
84  {
85  cblas_xerbla(2, "cblas_ctbmv","Illegal Uplo setting, %d\n", Uplo);
86  CBLAS_CallFromC = 0;
87  RowMajorStrg = 0;
88  return;
89  }
90 
91  if (TransA == CblasNoTrans) TA = 'T';
92  else if (TransA == CblasTrans) TA = 'N';
93  else if (TransA == CblasConjTrans)
94  {
95  TA = 'N';
96  if ( N > 0)
97  {
98  if(incX > 0)
99  tincX = incX;
100  else
101  tincX = -incX;
102  i = tincX << 1;
103  n = i * N;
104  x++;
105  st = x + n;
106  do
107  {
108  *x = -(*x);
109  x+= i;
110  }
111  while (x != st);
112  x -= n;
113  }
114  }
115  else
116  {
117  cblas_xerbla(3, "cblas_ctbmv","Illegal TransA setting, %d\n", TransA);
118  CBLAS_CallFromC = 0;
119  RowMajorStrg = 0;
120  return;
121  }
122 
123  if (Diag == CblasUnit) DI = 'U';
124  else if (Diag == CblasNonUnit) DI = 'N';
125  else
126  {
127  cblas_xerbla(4, "cblas_ctbmv","Illegal Uplo setting, %d\n", Uplo);
128  CBLAS_CallFromC = 0;
129  RowMajorStrg = 0;
130  return;
131  }
132  #ifdef F77_CHAR
133  F77_UL = C2F_CHAR(&UL);
134  F77_TA = C2F_CHAR(&TA);
135  F77_DI = C2F_CHAR(&DI);
136  #endif
137 
139  &F77_incX);
140 
141  if (TransA == CblasConjTrans)
142  {
143  if (N > 0)
144  {
145  do
146  {
147  *x = -(*x);
148  x += i;
149  }
150  while (x != st);
151  }
152  }
153  }
154  else cblas_xerbla(1, "cblas_ctbmv", "Illegal Order setting, %d\n", order);
155  CBLAS_CallFromC = 0;
156  RowMajorStrg = 0;
157  return;
158 }
#define F77_TA
#define F77_lda
int CBLAS_CallFromC
Definition: cblas_globals.c:1
#define F77_N
#define F77_K
void cblas_xerbla(int p, const char *rout, const char *form,...)
Definition: cblas_xerbla.c:8
#define F77_UL
void F77_ctbmv(FCHAR, FCHAR, FCHAR, FINT, FINT, const void *, FINT, void *, FINT)
#define F77_DI
const int N
Definition: speed_test.cpp:3
#define F77_incX
int RowMajorStrg
Definition: cblas_globals.c:2

◆ cblas_ctbsv()

void cblas_ctbsv ( const enum CBLAS_ORDER  order,
const enum CBLAS_UPLO  Uplo,
const enum CBLAS_TRANSPOSE  TransA,
const enum CBLAS_DIAG  Diag,
const int  N,
const int  K,
const void *  A,
const int  lda,
void *  X,
const int  incX 
)

Definition at line 10 of file cblas_ctbsv.c.

14 {
15  char TA;
16  char UL;
17  char DI;
18 #ifdef F77_CHAR
19  F77_CHAR F77_TA, F77_UL, F77_DI;
20 #else
21  #define F77_TA &TA
22  #define F77_UL &UL
23  #define F77_DI &DI
24 #endif
25 #ifdef F77_INT
26  F77_INT F77_N=N, F77_lda=lda, F77_K=K, F77_incX=incX;
27 #else
28  #define F77_N N
29  #define F77_K K
30  #define F77_lda lda
31  #define F77_incX incX
32 #endif
33  int n, i=0, tincX;
34  float *st=0,*x=(float *)X;
35  extern int CBLAS_CallFromC;
36  extern int RowMajorStrg;
37  RowMajorStrg = 0;
38 
39  CBLAS_CallFromC = 1;
40  if (order == CblasColMajor)
41  {
42  if (Uplo == CblasUpper) UL = 'U';
43  else if (Uplo == CblasLower) UL = 'L';
44  else
45  {
46  cblas_xerbla(2, "cblas_ctbsv","Illegal Uplo setting, %d\n", Uplo);
47  CBLAS_CallFromC = 0;
48  RowMajorStrg = 0;
49  return;
50  }
51  if (TransA == CblasNoTrans) TA = 'N';
52  else if (TransA == CblasTrans) TA = 'T';
53  else if (TransA == CblasConjTrans) TA = 'C';
54  else
55  {
56  cblas_xerbla(3, "cblas_ctbsv","Illegal TransA setting, %d\n", TransA);
57  CBLAS_CallFromC = 0;
58  RowMajorStrg = 0;
59  return;
60  }
61  if (Diag == CblasUnit) DI = 'U';
62  else if (Diag == CblasNonUnit) DI = 'N';
63  else
64  {
65  cblas_xerbla(4, "cblas_ctbsv","Illegal Diag setting, %d\n", Diag);
66  CBLAS_CallFromC = 0;
67  RowMajorStrg = 0;
68  return;
69  }
70  #ifdef F77_CHAR
71  F77_UL = C2F_CHAR(&UL);
72  F77_TA = C2F_CHAR(&TA);
73  F77_DI = C2F_CHAR(&DI);
74  #endif
76  &F77_incX);
77  }
78  else if (order == CblasRowMajor)
79  {
80  RowMajorStrg = 1;
81  if (Uplo == CblasUpper) UL = 'L';
82  else if (Uplo == CblasLower) UL = 'U';
83  else
84  {
85  cblas_xerbla(2, "cblas_ctbsv","Illegal Uplo setting, %d\n", Uplo);
86  CBLAS_CallFromC = 0;
87  RowMajorStrg = 0;
88  return;
89  }
90 
91  if (TransA == CblasNoTrans) TA = 'T';
92  else if (TransA == CblasTrans) TA = 'N';
93  else if (TransA == CblasConjTrans)
94  {
95  TA = 'N';
96  if ( N > 0)
97  {
98  if ( incX > 0 )
99  tincX = incX;
100  else
101  tincX = -incX;
102 
103  n = N*2*(tincX);
104 
105  x++;
106 
107  st=x+n;
108 
109  i = tincX << 1;
110  do
111  {
112  *x = -(*x);
113  x+=i;
114  }
115  while (x != st);
116  x -= n;
117  }
118  }
119  else
120  {
121  cblas_xerbla(3, "cblas_ctbsv","Illegal TransA setting, %d\n", TransA);
122  CBLAS_CallFromC = 0;
123  RowMajorStrg = 0;
124  return;
125  }
126 
127  if (Diag == CblasUnit) DI = 'U';
128  else if (Diag == CblasNonUnit) DI = 'N';
129  else
130  {
131  cblas_xerbla(4, "cblas_ctbsv","Illegal Diag setting, %d\n", Diag);
132  CBLAS_CallFromC = 0;
133  RowMajorStrg = 0;
134  return;
135  }
136  #ifdef F77_CHAR
137  F77_UL = C2F_CHAR(&UL);
138  F77_TA = C2F_CHAR(&TA);
139  F77_DI = C2F_CHAR(&DI);
140  #endif
141 
143  &F77_incX);
144 
145  if (TransA == CblasConjTrans)
146  {
147  if (N > 0)
148  {
149  do
150  {
151  *x = -(*x);
152  x+= i;
153  }
154  while (x != st);
155  }
156  }
157  }
158  else cblas_xerbla(1, "cblas_ctbsv", "Illegal Order setting, %d\n", order);
159  CBLAS_CallFromC = 0;
160  RowMajorStrg = 0;
161  return;
162 }
#define F77_TA
#define F77_lda
#define F77_N
int CBLAS_CallFromC
Definition: cblas_globals.c:1
void F77_ctbsv(FCHAR, FCHAR, FCHAR, FINT, FINT, const void *, FINT, void *, FINT)
#define F77_K
void cblas_xerbla(int p, const char *rout, const char *form,...)
Definition: cblas_xerbla.c:8
#define F77_UL
#define F77_DI
const int N
Definition: speed_test.cpp:3
#define F77_incX
int RowMajorStrg
Definition: cblas_globals.c:2

◆ cblas_ctpmv()

void cblas_ctpmv ( const enum CBLAS_ORDER  order,
const enum CBLAS_UPLO  Uplo,
const enum CBLAS_TRANSPOSE  TransA,
const enum CBLAS_DIAG  Diag,
const int  N,
const void *  Ap,
void *  X,
const int  incX 
)

Definition at line 10 of file cblas_ctpmv.c.

13 {
14  char TA;
15  char UL;
16  char DI;
17 #ifdef F77_CHAR
18  F77_CHAR F77_TA, F77_UL, F77_DI;
19 #else
20  #define F77_TA &TA
21  #define F77_UL &UL
22  #define F77_DI &DI
23 #endif
24 #ifdef F77_INT
25  F77_INT F77_N=N, F77_incX=incX;
26 #else
27  #define F77_N N
28  #define F77_incX incX
29 #endif
30  int n, i=0, tincX;
31  float *st=0,*x=(float *)X;
32  extern int CBLAS_CallFromC;
33  extern int RowMajorStrg;
34  RowMajorStrg = 0;
35 
36  CBLAS_CallFromC = 1;
37  if (order == CblasColMajor)
38  {
39  if (Uplo == CblasUpper) UL = 'U';
40  else if (Uplo == CblasLower) UL = 'L';
41  else
42  {
43  cblas_xerbla(2, "cblas_ctpmv","Illegal Uplo setting, %d\n", Uplo);
44  CBLAS_CallFromC = 0;
45  RowMajorStrg = 0;
46  return;
47  }
48  if (TransA == CblasNoTrans) TA = 'N';
49  else if (TransA == CblasTrans) TA = 'T';
50  else if (TransA == CblasConjTrans) TA = 'C';
51  else
52  {
53  cblas_xerbla(3, "cblas_ctpmv","Illegal TransA setting, %d\n", TransA);
54  CBLAS_CallFromC = 0;
55  RowMajorStrg = 0;
56  return;
57  }
58  if (Diag == CblasUnit) DI = 'U';
59  else if (Diag == CblasNonUnit) DI = 'N';
60  else
61  {
62  cblas_xerbla(4, "cblas_ctpmv","Illegal Diag setting, %d\n", Diag);
63  CBLAS_CallFromC = 0;
64  RowMajorStrg = 0;
65  return;
66  }
67  #ifdef F77_CHAR
68  F77_UL = C2F_CHAR(&UL);
69  F77_TA = C2F_CHAR(&TA);
70  F77_DI = C2F_CHAR(&DI);
71  #endif
72  F77_ctpmv( F77_UL, F77_TA, F77_DI, &F77_N, Ap, X, &F77_incX);
73  }
74  else if (order == CblasRowMajor)
75  {
76  RowMajorStrg = 1;
77  if (Uplo == CblasUpper) UL = 'L';
78  else if (Uplo == CblasLower) UL = 'U';
79  else
80  {
81  cblas_xerbla(2, "cblas_ctpmv","Illegal Uplo setting, %d\n", Uplo);
82  CBLAS_CallFromC = 0;
83  RowMajorStrg = 0;
84  return;
85  }
86 
87  if (TransA == CblasNoTrans) TA = 'T';
88  else if (TransA == CblasTrans) TA = 'N';
89  else if (TransA == CblasConjTrans)
90  {
91  TA = 'N';
92  if ( N > 0)
93  {
94  if(incX > 0)
95  tincX = incX;
96  else
97  tincX = -incX;
98  i = tincX << 1;
99  n = i * N;
100  x++;
101  st = x + n;
102  do
103  {
104  *x = -(*x);
105  x += i;
106  }
107  while (x != st);
108  x -= n;
109  }
110  }
111  else
112  {
113  cblas_xerbla(3, "cblas_ctpmv","Illegal TransA setting, %d\n", TransA);
114  CBLAS_CallFromC = 0;
115  RowMajorStrg = 0;
116  return;
117  }
118 
119  if (Diag == CblasUnit) DI = 'U';
120  else if (Diag == CblasNonUnit) DI = 'N';
121  else
122  {
123  cblas_xerbla(4, "cblas_ctpmv","Illegal Diag setting, %d\n", Diag);
124  CBLAS_CallFromC = 0;
125  RowMajorStrg = 0;
126  return;
127  }
128  #ifdef F77_CHAR
129  F77_UL = C2F_CHAR(&UL);
130  F77_TA = C2F_CHAR(&TA);
131  F77_DI = C2F_CHAR(&DI);
132  #endif
133 
134  F77_ctpmv( F77_UL, F77_TA, F77_DI, &F77_N, Ap, X,&F77_incX);
135  if (TransA == CblasConjTrans)
136  {
137  if (N > 0)
138  {
139  do
140  {
141  *x = -(*x);
142  x += i;
143  }
144  while (x != st);
145  }
146  }
147  }
148  else cblas_xerbla(1, "cblas_ctpmv", "Illegal Order setting, %d\n", order);
149  CBLAS_CallFromC = 0;
150  RowMajorStrg = 0;
151  return;
152 }
#define F77_N
#define F77_DI
int CBLAS_CallFromC
Definition: cblas_globals.c:1
#define F77_TA
#define F77_incX
void cblas_xerbla(int p, const char *rout, const char *form,...)
Definition: cblas_xerbla.c:8
const int N
Definition: speed_test.cpp:3
void F77_ctpmv(FCHAR, FCHAR, FCHAR, FINT, const void *, void *, FINT)
#define F77_UL
int RowMajorStrg
Definition: cblas_globals.c:2

◆ cblas_ctpsv()

void cblas_ctpsv ( const enum CBLAS_ORDER  order,
const enum CBLAS_UPLO  Uplo,
const enum CBLAS_TRANSPOSE  TransA,
const enum CBLAS_DIAG  Diag,
const int  N,
const void *  Ap,
void *  X,
const int  incX 
)

Definition at line 10 of file cblas_ctpsv.c.

13 {
14  char TA;
15  char UL;
16  char DI;
17 #ifdef F77_CHAR
18  F77_CHAR F77_TA, F77_UL, F77_DI;
19 #else
20  #define F77_TA &TA
21  #define F77_UL &UL
22  #define F77_DI &DI
23 #endif
24 #ifdef F77_INT
25  F77_INT F77_N=N, F77_incX=incX;
26 #else
27  #define F77_N N
28  #define F77_incX incX
29 #endif
30  int n, i=0, tincX;
31  float *st=0, *x=(float*)X;
32  extern int CBLAS_CallFromC;
33  extern int RowMajorStrg;
34  RowMajorStrg = 0;
35 
36  CBLAS_CallFromC = 1;
37  if (order == CblasColMajor)
38  {
39  if (Uplo == CblasUpper) UL = 'U';
40  else if (Uplo == CblasLower) UL = 'L';
41  else
42  {
43  cblas_xerbla(2, "cblas_ctpsv","Illegal Uplo setting, %d\n", Uplo);
44  CBLAS_CallFromC = 0;
45  RowMajorStrg = 0;
46  return;
47  }
48  if (TransA == CblasNoTrans) TA = 'N';
49  else if (TransA == CblasTrans) TA = 'T';
50  else if (TransA == CblasConjTrans) TA = 'C';
51  else
52  {
53  cblas_xerbla(3, "cblas_ctpsv","Illegal TransA setting, %d\n", TransA);
54  CBLAS_CallFromC = 0;
55  RowMajorStrg = 0;
56  return;
57  }
58  if (Diag == CblasUnit) DI = 'U';
59  else if (Diag == CblasNonUnit) DI = 'N';
60  else
61  {
62  cblas_xerbla(4, "cblas_ctpsv","Illegal Diag setting, %d\n", Diag);
63  CBLAS_CallFromC = 0;
64  RowMajorStrg = 0;
65  return;
66  }
67  #ifdef F77_CHAR
68  F77_UL = C2F_CHAR(&UL);
69  F77_TA = C2F_CHAR(&TA);
70  F77_DI = C2F_CHAR(&DI);
71  #endif
72  F77_ctpsv( F77_UL, F77_TA, F77_DI, &F77_N, Ap, X, &F77_incX);
73  }
74  else if (order == CblasRowMajor)
75  {
76  RowMajorStrg = 1;
77  if (Uplo == CblasUpper) UL = 'L';
78  else if (Uplo == CblasLower) UL = 'U';
79  else
80  {
81  cblas_xerbla(2, "cblas_ctpsv","Illegal Uplo setting, %d\n", Uplo);
82  CBLAS_CallFromC = 0;
83  RowMajorStrg = 0;
84  return;
85  }
86 
87  if (TransA == CblasNoTrans) TA = 'T';
88  else if (TransA == CblasTrans) TA = 'N';
89  else if (TransA == CblasConjTrans)
90  {
91  TA = 'N';
92  if ( N > 0)
93  {
94  if ( incX > 0 )
95  tincX = incX;
96  else
97  tincX = -incX;
98 
99  n = N*2*(tincX);
100 
101  x++;
102 
103  st=x+n;
104 
105  i = tincX << 1;
106  do
107  {
108  *x = -(*x);
109  x+=i;
110  }
111  while (x != st);
112  x -= n;
113  }
114  }
115  else
116  {
117  cblas_xerbla(3, "cblas_ctpsv","Illegal TransA setting, %d\n", TransA);
118  CBLAS_CallFromC = 0;
119  RowMajorStrg = 0;
120  return;
121  }
122 
123  if (Diag == CblasUnit) DI = 'U';
124  else if (Diag == CblasNonUnit) DI = 'N';
125  else
126  {
127  cblas_xerbla(4, "cblas_ctpsv","Illegal Diag setting, %d\n", Diag);
128  CBLAS_CallFromC = 0;
129  RowMajorStrg = 0;
130  return;
131  }
132  #ifdef F77_CHAR
133  F77_UL = C2F_CHAR(&UL);
134  F77_TA = C2F_CHAR(&TA);
135  F77_DI = C2F_CHAR(&DI);
136  #endif
137 
138  F77_ctpsv( F77_UL, F77_TA, F77_DI, &F77_N, Ap, X,&F77_incX);
139 
140  if (TransA == CblasConjTrans)
141  {
142  if (N > 0)
143  {
144  do
145  {
146  *x = -(*x);
147  x += i;
148  }
149  while (x != st);
150  }
151  }
152  }
153  else cblas_xerbla(1, "cblas_ctpsv", "Illegal Order setting, %d\n", order);
154  CBLAS_CallFromC = 0;
155  RowMajorStrg = 0;
156  return;
157 }
void F77_ctpsv(FCHAR, FCHAR, FCHAR, FINT, const void *, void *, FINT)
#define F77_N
#define F77_DI
int CBLAS_CallFromC
Definition: cblas_globals.c:1
#define F77_TA
#define F77_incX
void cblas_xerbla(int p, const char *rout, const char *form,...)
Definition: cblas_xerbla.c:8
const int N
Definition: speed_test.cpp:3
#define F77_UL
int RowMajorStrg
Definition: cblas_globals.c:2

◆ cblas_ctrmm()

void cblas_ctrmm ( const enum CBLAS_ORDER  Order,
const enum CBLAS_SIDE  Side,
const enum CBLAS_UPLO  Uplo,
const enum CBLAS_TRANSPOSE  TransA,
const enum CBLAS_DIAG  Diag,
const int  M,
const int  N,
const void *  alpha,
const void *  A,
const int  lda,
void *  B,
const int  ldb 
)

Definition at line 12 of file cblas_ctrmm.c.

17 {
18  char UL, TA, SD, DI;
19 #ifdef F77_CHAR
20  F77_CHAR F77_TA, F77_UL, F77_SD, F77_DI;
21 #else
22  #define F77_TA &TA
23  #define F77_UL &UL
24  #define F77_SD &SD
25  #define F77_DI &DI
26 #endif
27 
28 #ifdef F77_INT
29  F77_INT F77_M=M, F77_N=N, F77_lda=lda, F77_ldb=ldb;
30 #else
31  #define F77_M M
32  #define F77_N N
33  #define F77_lda lda
34  #define F77_ldb ldb
35 #endif
36 
37  extern int CBLAS_CallFromC;
38  extern int RowMajorStrg;
39  RowMajorStrg = 0;
40  CBLAS_CallFromC = 1;
41 
42  if( Order == CblasColMajor )
43  {
44  if( Side == CblasRight ) SD='R';
45  else if ( Side == CblasLeft ) SD='L';
46  else
47  {
48  cblas_xerbla(2, "cblas_ctrmm", "Illegal Side setting, %d\n", Side);
49  CBLAS_CallFromC = 0;
50  RowMajorStrg = 0;
51  return;
52  }
53  if( Uplo == CblasUpper ) UL='U';
54  else if ( Uplo == CblasLower ) UL='L';
55  else
56  {
57  cblas_xerbla(3, "cblas_ctrmm", "Illegal Uplo setting, %d\n", Uplo);
58  CBLAS_CallFromC = 0;
59  RowMajorStrg = 0;
60  return;
61  }
62 
63  if( TransA == CblasTrans ) TA ='T';
64  else if ( TransA == CblasConjTrans ) TA='C';
65  else if ( TransA == CblasNoTrans ) TA='N';
66  else
67  {
68  cblas_xerbla(4, "cblas_ctrmm", "Illegal Trans setting, %d\n", TransA);
69  CBLAS_CallFromC = 0;
70  RowMajorStrg = 0;
71  return;
72  }
73 
74  if( Diag == CblasUnit ) DI='U';
75  else if ( Diag == CblasNonUnit ) DI='N';
76  else cblas_xerbla(5, "cblas_ctrmm",
77  "Illegal Diag setting, %d\n", Diag);
78 
79  #ifdef F77_CHAR
80  F77_UL = C2F_CHAR(&UL);
81  F77_TA = C2F_CHAR(&TA);
82  F77_SD = C2F_CHAR(&SD);
83  F77_DI = C2F_CHAR(&DI);
84  #endif
85 
86  F77_ctrmm(F77_SD, F77_UL, F77_TA, F77_DI, &F77_M, &F77_N, alpha, A, &F77_lda, B, &F77_ldb);
87  } else if (Order == CblasRowMajor)
88  {
89  RowMajorStrg = 1;
90  if( Side == CblasRight ) SD='L';
91  else if ( Side == CblasLeft ) SD='R';
92  else
93  {
94  cblas_xerbla(2, "cblas_ctrmm", "Illegal Side setting, %d\n", Side);
95  CBLAS_CallFromC = 0;
96  RowMajorStrg = 0;
97  return;
98  }
99 
100  if( Uplo == CblasUpper ) UL='L';
101  else if ( Uplo == CblasLower ) UL='U';
102  else
103  {
104  cblas_xerbla(3, "cblas_ctrmm", "Illegal Uplo setting, %d\n", Uplo);
105  CBLAS_CallFromC = 0;
106  RowMajorStrg = 0;
107  return;
108  }
109 
110  if( TransA == CblasTrans ) TA ='T';
111  else if ( TransA == CblasConjTrans ) TA='C';
112  else if ( TransA == CblasNoTrans ) TA='N';
113  else
114  {
115  cblas_xerbla(4, "cblas_ctrmm", "Illegal Trans setting, %d\n", TransA);
116  CBLAS_CallFromC = 0;
117  RowMajorStrg = 0;
118  return;
119  }
120 
121  if( Diag == CblasUnit ) DI='U';
122  else if ( Diag == CblasNonUnit ) DI='N';
123  else
124  {
125  cblas_xerbla(5, "cblas_ctrmm", "Illegal Diag setting, %d\n", Diag);
126  CBLAS_CallFromC = 0;
127  RowMajorStrg = 0;
128  return;
129  }
130 
131  #ifdef F77_CHAR
132  F77_UL = C2F_CHAR(&UL);
133  F77_TA = C2F_CHAR(&TA);
134  F77_SD = C2F_CHAR(&SD);
135  F77_DI = C2F_CHAR(&DI);
136  #endif
137 
138  F77_ctrmm(F77_SD, F77_UL, F77_TA, F77_DI, &F77_N, &F77_M, alpha, A, &F77_lda, B, &F77_ldb);
139  }
140  else cblas_xerbla(1, "cblas_ctrmm", "Illegal Order setting, %d\n", Order);
141  CBLAS_CallFromC = 0;
142  RowMajorStrg = 0;
143  return;
144 }
void F77_ctrmm(FCHAR, FCHAR, FCHAR, FCHAR, FINT, FINT, const float *, const float *, FINT, float *, FINT)
#define F77_TA
#define F77_DI
#define F77_M
int CBLAS_CallFromC
Definition: cblas_globals.c:1
#define F77_UL
#define F77_SD
#define F77_N
void cblas_xerbla(int p, const char *rout, const char *form,...)
Definition: cblas_xerbla.c:8
#define F77_lda
#define F77_ldb
const int N
Definition: speed_test.cpp:3
int RowMajorStrg
Definition: cblas_globals.c:2

◆ cblas_ctrmv()

void cblas_ctrmv ( const enum CBLAS_ORDER  order,
const enum CBLAS_UPLO  Uplo,
const enum CBLAS_TRANSPOSE  TransA,
const enum CBLAS_DIAG  Diag,
const int  N,
const void *  A,
const int  lda,
void *  X,
const int  incX 
)

Definition at line 10 of file cblas_ctrmv.c.

15 {
16  char TA;
17  char UL;
18  char DI;
19 #ifdef F77_CHAR
20  F77_CHAR F77_TA, F77_UL, F77_DI;
21 #else
22  #define F77_TA &TA
23  #define F77_UL &UL
24  #define F77_DI &DI
25 #endif
26 #ifdef F77_INT
27  F77_INT F77_N=N, F77_lda=lda, F77_incX=incX;
28 #else
29  #define F77_N N
30  #define F77_lda lda
31  #define F77_incX incX
32 #endif
33  int n, i=0, tincX;
34  float *st=0,*x=(float *)X;
35  extern int CBLAS_CallFromC;
36  extern int RowMajorStrg;
37  RowMajorStrg = 0;
38 
39  CBLAS_CallFromC = 1;
40  if (order == CblasColMajor)
41  {
42  if (Uplo == CblasUpper) UL = 'U';
43  else if (Uplo == CblasLower) UL = 'L';
44  else
45  {
46  cblas_xerbla(2, "cblas_ctrmv","Illegal Uplo setting, %d\n", Uplo);
47  CBLAS_CallFromC = 0;
48  RowMajorStrg = 0;
49  return;
50  }
51  if (TransA == CblasNoTrans) TA = 'N';
52  else if (TransA == CblasTrans) TA = 'T';
53  else if (TransA == CblasConjTrans) TA = 'C';
54  else
55  {
56  cblas_xerbla(3, "cblas_ctrmv","Illegal TransA setting, %d\n", TransA);
57  CBLAS_CallFromC = 0;
58  RowMajorStrg = 0;
59  return;
60  }
61  if (Diag == CblasUnit) DI = 'U';
62  else if (Diag == CblasNonUnit) DI = 'N';
63  else
64  {
65  cblas_xerbla(4, "cblas_ctrmv","Illegal Diag setting, %d\n", Diag);
66  CBLAS_CallFromC = 0;
67  RowMajorStrg = 0;
68  return;
69  }
70  #ifdef F77_CHAR
71  F77_UL = C2F_CHAR(&UL);
72  F77_TA = C2F_CHAR(&TA);
73  F77_DI = C2F_CHAR(&DI);
74  #endif
76  &F77_incX);
77  }
78  else if (order == CblasRowMajor)
79  {
80  RowMajorStrg = 1;
81  if (Uplo == CblasUpper) UL = 'L';
82  else if (Uplo == CblasLower) UL = 'U';
83  else
84  {
85  cblas_xerbla(2, "cblas_ctrmv","Illegal Uplo setting, %d\n", Uplo);
86  CBLAS_CallFromC = 0;
87  RowMajorStrg = 0;
88  return;
89  }
90 
91  if (TransA == CblasNoTrans) TA = 'T';
92  else if (TransA == CblasTrans) TA = 'N';
93  else if (TransA == CblasConjTrans)
94  {
95  TA = 'N';
96  if ( N > 0)
97  {
98  if(incX > 0)
99  tincX = incX;
100  else
101  tincX = -incX;
102  i = tincX << 1;
103  n = i * N;
104  st = x + n;
105  do
106  {
107  x[1] = -x[1];
108  x+= i;
109  }
110  while (x != st);
111  x -= n;
112  }
113  }
114  else
115  {
116  cblas_xerbla(3, "cblas_ctrmv","Illegal TransA setting, %d\n", TransA);
117  CBLAS_CallFromC = 0;
118  RowMajorStrg = 0;
119  return;
120  }
121 
122  if (Diag == CblasUnit) DI = 'U';
123  else if (Diag == CblasNonUnit) DI = 'N';
124  else
125  {
126  cblas_xerbla(4, "cblas_ctrmv","Illegal Diag setting, %d\n", Diag);
127  CBLAS_CallFromC = 0;
128  RowMajorStrg = 0;
129  return;
130  }
131  #ifdef F77_CHAR
132  F77_UL = C2F_CHAR(&UL);
133  F77_TA = C2F_CHAR(&TA);
134  F77_DI = C2F_CHAR(&DI);
135  #endif
136  F77_ctrmv( F77_UL, F77_TA, F77_DI, &F77_N, A, &F77_lda, X,
137  &F77_incX);
138  if (TransA == CblasConjTrans)
139  {
140  if (N > 0)
141  {
142  do
143  {
144  x[1] = -x[1];
145  x += i;
146  }
147  while (x != st);
148  }
149  }
150  }
151  else cblas_xerbla(1, "cblas_ctrmv", "Illegal Order setting, %d\n", order);
152  CBLAS_CallFromC = 0;
153  RowMajorStrg = 0;
154  return;
155 }
#define F77_DI
#define F77_incX
int CBLAS_CallFromC
Definition: cblas_globals.c:1
#define F77_lda
#define F77_TA
#define F77_UL
void F77_ctrmv(FCHAR, FCHAR, FCHAR, FINT, const void *, FINT, void *, FINT)
void cblas_xerbla(int p, const char *rout, const char *form,...)
Definition: cblas_xerbla.c:8
const int N
Definition: speed_test.cpp:3
#define F77_N
int RowMajorStrg
Definition: cblas_globals.c:2

◆ cblas_ctrsm()

void cblas_ctrsm ( const enum CBLAS_ORDER  Order,
const enum CBLAS_SIDE  Side,
const enum CBLAS_UPLO  Uplo,
const enum CBLAS_TRANSPOSE  TransA,
const enum CBLAS_DIAG  Diag,
const int  M,
const int  N,
const void *  alpha,
const void *  A,
const int  lda,
void *  B,
const int  ldb 
)

Definition at line 12 of file cblas_ctrsm.c.

17 {
18  char UL, TA, SD, DI;
19 #ifdef F77_CHAR
20  F77_CHAR F77_TA, F77_UL, F77_SD, F77_DI;
21 #else
22  #define F77_TA &TA
23  #define F77_UL &UL
24  #define F77_SD &SD
25  #define F77_DI &DI
26 #endif
27 
28 #ifdef F77_INT
29  F77_INT F77_M=M, F77_N=N, F77_lda=lda, F77_ldb=ldb;
30 #else
31  #define F77_M M
32  #define F77_N N
33  #define F77_lda lda
34  #define F77_ldb ldb
35 #endif
36 
37  extern int CBLAS_CallFromC;
38  extern int RowMajorStrg;
39  RowMajorStrg = 0;
40  CBLAS_CallFromC = 1;
41 
42  if( Order == CblasColMajor )
43  {
44 
45  if( Side == CblasRight) SD='R';
46  else if ( Side == CblasLeft ) SD='L';
47  else
48  {
49  cblas_xerbla(2, "cblas_ctrsm", "Illegal Side setting, %d\n", Side);
50  CBLAS_CallFromC = 0;
51  RowMajorStrg = 0;
52  return;
53  }
54 
55  if( Uplo == CblasUpper) UL='U';
56  else if ( Uplo == CblasLower ) UL='L';
57  else
58  {
59  cblas_xerbla(3, "cblas_ctrsm", "Illegal Uplo setting, %d\n", Uplo);
60  CBLAS_CallFromC = 0;
61  RowMajorStrg = 0;
62  return;
63  }
64 
65  if( TransA == CblasTrans) TA ='T';
66  else if ( TransA == CblasConjTrans ) TA='C';
67  else if ( TransA == CblasNoTrans ) TA='N';
68  else
69  {
70  cblas_xerbla(4, "cblas_ctrsm", "Illegal Trans setting, %d\n", TransA);
71  CBLAS_CallFromC = 0;
72  RowMajorStrg = 0;
73  return;
74  }
75 
76  if( Diag == CblasUnit ) DI='U';
77  else if ( Diag == CblasNonUnit ) DI='N';
78  else
79  {
80  cblas_xerbla(5, "cblas_ctrsm", "Illegal Diag setting, %d\n", Diag);
81  CBLAS_CallFromC = 0;
82  RowMajorStrg = 0;
83  return;
84  }
85 
86  #ifdef F77_CHAR
87  F77_UL = C2F_CHAR(&UL);
88  F77_TA = C2F_CHAR(&TA);
89  F77_SD = C2F_CHAR(&SD);
90  F77_DI = C2F_CHAR(&DI);
91  #endif
92 
93  F77_ctrsm(F77_SD, F77_UL, F77_TA, F77_DI, &F77_M, &F77_N, alpha, A,
94  &F77_lda, B, &F77_ldb);
95  } else if (Order == CblasRowMajor)
96  {
97  RowMajorStrg = 1;
98 
99  if( Side == CblasRight) SD='L';
100  else if ( Side == CblasLeft ) SD='R';
101  else
102  {
103  cblas_xerbla(2, "cblas_ctrsm", "Illegal Side setting, %d\n", Side);
104  CBLAS_CallFromC = 0;
105  RowMajorStrg = 0;
106  return;
107  }
108 
109  if( Uplo == CblasUpper) UL='L';
110  else if ( Uplo == CblasLower ) UL='U';
111  else
112  {
113  cblas_xerbla(3, "cblas_ctrsm", "Illegal Uplo setting, %d\n", Uplo);
114  CBLAS_CallFromC = 0;
115  RowMajorStrg = 0;
116  return;
117  }
118 
119  if( TransA == CblasTrans) TA ='T';
120  else if ( TransA == CblasConjTrans ) TA='C';
121  else if ( TransA == CblasNoTrans ) TA='N';
122  else
123  {
124  cblas_xerbla(4, "cblas_ctrsm", "Illegal Trans setting, %d\n", TransA);
125  CBLAS_CallFromC = 0;
126  RowMajorStrg = 0;
127  return;
128  }
129 
130  if( Diag == CblasUnit ) DI='U';
131  else if ( Diag == CblasNonUnit ) DI='N';
132  else
133  {
134  cblas_xerbla(5, "cblas_ctrsm", "Illegal Diag setting, %d\n", Diag);
135  CBLAS_CallFromC = 0;
136  RowMajorStrg = 0;
137  return;
138  }
139 
140  #ifdef F77_CHAR
141  F77_UL = C2F_CHAR(&UL);
142  F77_TA = C2F_CHAR(&TA);
143  F77_SD = C2F_CHAR(&SD);
144  F77_DI = C2F_CHAR(&DI);
145  #endif
146 
147 
148  F77_ctrsm(F77_SD, F77_UL, F77_TA, F77_DI, &F77_N, &F77_M, alpha, A,
149  &F77_lda, B, &F77_ldb);
150  }
151  else cblas_xerbla(1, "cblas_ctrsm", "Illegal Order setting, %d\n", Order);
152  CBLAS_CallFromC = 0;
153  RowMajorStrg = 0;
154  return;
155 }
void F77_ctrsm(FCHAR, FCHAR, FCHAR, FCHAR, FINT, FINT, const float *, const float *, FINT, float *, FINT)
#define F77_TA
#define F77_DI
#define F77_M
int CBLAS_CallFromC
Definition: cblas_globals.c:1
#define F77_SD
#define F77_UL
#define F77_N
void cblas_xerbla(int p, const char *rout, const char *form,...)
Definition: cblas_xerbla.c:8
#define F77_ldb
#define F77_lda
const int N
Definition: speed_test.cpp:3
int RowMajorStrg
Definition: cblas_globals.c:2

◆ cblas_ctrsv()

void cblas_ctrsv ( const enum CBLAS_ORDER  order,
const enum CBLAS_UPLO  Uplo,
const enum CBLAS_TRANSPOSE  TransA,
const enum CBLAS_DIAG  Diag,
const int  N,
const void *  A,
const int  lda,
void *  X,
const int  incX 
)

Definition at line 10 of file cblas_ctrsv.c.

14 {
15  char TA;
16  char UL;
17  char DI;
18 #ifdef F77_CHAR
19  F77_CHAR F77_TA, F77_UL, F77_DI;
20 #else
21  #define F77_TA &TA
22  #define F77_UL &UL
23  #define F77_DI &DI
24 #endif
25 #ifdef F77_INT
26  F77_INT F77_N=N, F77_lda=lda, F77_incX=incX;
27 #else
28  #define F77_N N
29  #define F77_lda lda
30  #define F77_incX incX
31 #endif
32  int n, i=0, tincX;
33  float *st=0,*x=(float *)X;
34  extern int CBLAS_CallFromC;
35  extern int RowMajorStrg;
36  RowMajorStrg = 0;
37 
38  CBLAS_CallFromC = 1;
39  if (order == CblasColMajor)
40  {
41  if (Uplo == CblasUpper) UL = 'U';
42  else if (Uplo == CblasLower) UL = 'L';
43  else
44  {
45  cblas_xerbla(2, "cblas_ctrsv","Illegal Uplo setting, %d\n", Uplo);
46  CBLAS_CallFromC = 0;
47  RowMajorStrg = 0;
48  return;
49  }
50  if (TransA == CblasNoTrans) TA = 'N';
51  else if (TransA == CblasTrans) TA = 'T';
52  else if (TransA == CblasConjTrans) TA = 'C';
53  else
54  {
55  cblas_xerbla(3, "cblas_ctrsv","Illegal TransA setting, %d\n", TransA);
56  CBLAS_CallFromC = 0;
57  RowMajorStrg = 0;
58  return;
59  }
60  if (Diag == CblasUnit) DI = 'U';
61  else if (Diag == CblasNonUnit) DI = 'N';
62  else
63  {
64  cblas_xerbla(4, "cblas_ctrsv","Illegal Diag setting, %d\n", Diag);
65  CBLAS_CallFromC = 0;
66  RowMajorStrg = 0;
67  return;
68  }
69  #ifdef F77_CHAR
70  F77_UL = C2F_CHAR(&UL);
71  F77_TA = C2F_CHAR(&TA);
72  F77_DI = C2F_CHAR(&DI);
73  #endif
75  &F77_incX);
76  }
77  else if (order == CblasRowMajor)
78  {
79  RowMajorStrg = 1;
80  if (Uplo == CblasUpper) UL = 'L';
81  else if (Uplo == CblasLower) UL = 'U';
82  else
83  {
84  cblas_xerbla(2, "cblas_ctrsv","Illegal Uplo setting, %d\n", Uplo);
85  CBLAS_CallFromC = 0;
86  RowMajorStrg = 0;
87  return;
88  }
89 
90  if (TransA == CblasNoTrans) TA = 'T';
91  else if (TransA == CblasTrans) TA = 'N';
92  else if (TransA == CblasConjTrans)
93  {
94  TA = 'N';
95  if ( N > 0)
96  {
97  if ( incX > 0 )
98  tincX = incX;
99  else
100  tincX = -incX;
101 
102  n = N*2*(tincX);
103  x++;
104  st=x+n;
105  i = tincX << 1;
106  do
107  {
108  *x = -(*x);
109  x+=i;
110  }
111  while (x != st);
112  x -= n;
113  }
114  }
115  else
116  {
117  cblas_xerbla(3, "cblas_ctrsv","Illegal TransA setting, %d\n", TransA);
118  CBLAS_CallFromC = 0;
119  RowMajorStrg = 0;
120  return;
121  }
122 
123  if (Diag == CblasUnit) DI = 'U';
124  else if (Diag == CblasNonUnit) DI = 'N';
125  else
126  {
127  cblas_xerbla(4, "cblas_ctrsv","Illegal Diag setting, %d\n", Diag);
128  CBLAS_CallFromC = 0;
129  RowMajorStrg = 0;
130  return;
131  }
132  #ifdef F77_CHAR
133  F77_UL = C2F_CHAR(&UL);
134  F77_TA = C2F_CHAR(&TA);
135  F77_DI = C2F_CHAR(&DI);
136  #endif
137  F77_ctrsv( F77_UL, F77_TA, F77_DI, &F77_N, A, &F77_lda, X,
138  &F77_incX);
139  if (TransA == CblasConjTrans)
140  {
141  if (N > 0)
142  {
143  do
144  {
145  *x = -(*x);
146  x += i;
147  }
148  while (x != st);
149  }
150  }
151  }
152  else cblas_xerbla(1, "cblas_ctrsv", "Illegal Order setting, %d\n", order);
153  CBLAS_CallFromC = 0;
154  RowMajorStrg = 0;
155  return;
156 }
#define F77_DI
void F77_ctrsv(FCHAR, FCHAR, FCHAR, FINT, const void *, FINT, void *, FINT)
#define F77_incX
int CBLAS_CallFromC
Definition: cblas_globals.c:1
#define F77_lda
#define F77_TA
#define F77_UL
void cblas_xerbla(int p, const char *rout, const char *form,...)
Definition: cblas_xerbla.c:8
const int N
Definition: speed_test.cpp:3
#define F77_N
int RowMajorStrg
Definition: cblas_globals.c:2

◆ cblas_dasum()

double cblas_dasum ( const int  N,
const double X,
const int  incX 
)

Definition at line 12 of file cblas_dasum.c.

13 {
14  double asum;
15 #ifdef F77_INT
16  F77_INT F77_N=N, F77_incX=incX;
17 #else
18  #define F77_N N
19  #define F77_incX incX
20 #endif
21  F77_dasum_sub( &F77_N, X, &F77_incX, &asum);
22  return asum;
23 }
#define F77_incX
#define F77_N
const int N
Definition: speed_test.cpp:3
void F77_dasum_sub(FINT, const double *, FINT, double *)

◆ cblas_daxpy()

void cblas_daxpy ( const int  N,
const double  alpha,
const double X,
const int  incX,
double Y,
const int  incY 
)

Definition at line 11 of file cblas_daxpy.c.

13 {
14 #ifdef F77_INT
15  F77_INT F77_N=N, F77_incX=incX, F77_incY=incY;
16 #else
17  #define F77_N N
18  #define F77_incX incX
19  #define F77_incY incY
20 #endif
21  F77_daxpy( &F77_N, &alpha, X, &F77_incX, Y, &F77_incY);
22 }
#define F77_N
#define F77_incX
void F77_daxpy(FINT, const double *, const double *, FINT, double *, FINT)
#define F77_incY
const int N
Definition: speed_test.cpp:3

◆ cblas_dcopy()

void cblas_dcopy ( const int  N,
const double X,
const int  incX,
double Y,
const int  incY 
)

Definition at line 11 of file cblas_dcopy.c.

13 {
14 #ifdef F77_INT
15  F77_INT F77_N=N, F77_incX=incX, F77_incY=incY;
16 #else
17  #define F77_N N
18  #define F77_incX incX
19  #define F77_incY incY
20 #endif
21  F77_dcopy( &F77_N, X, &F77_incX, Y, &F77_incY);
22 }
#define F77_incX
#define F77_N
#define F77_incY
const int N
Definition: speed_test.cpp:3
void F77_dcopy(FINT, const double *, FINT, double *, FINT)

◆ cblas_ddot()

double cblas_ddot ( const int  N,
const double X,
const int  incX,
const double Y,
const int  incY 
)

Definition at line 12 of file cblas_ddot.c.

14 {
15  double dot;
16 #ifdef F77_INT
17  F77_INT F77_N=N, F77_incX=incX, F77_incY=incY;
18 #else
19  #define F77_N N
20  #define F77_incX incX
21  #define F77_incY incY
22 #endif
23  F77_ddot_sub( &F77_N, X, &F77_incX, Y, &F77_incY, &dot);
24  return dot;
25 }
#define F77_incX
#define F77_N
void F77_ddot_sub(FINT, const double *, FINT, const double *, FINT, double *)
const int N
Definition: speed_test.cpp:3
#define F77_incY

◆ cblas_dgbmv()

void cblas_dgbmv ( const enum CBLAS_ORDER  order,
const enum CBLAS_TRANSPOSE  TransA,
const int  M,
const int  N,
const int  KL,
const int  KU,
const double  alpha,
const double A,
const int  lda,
const double X,
const int  incX,
const double  beta,
double Y,
const int  incY 
)

Definition at line 11 of file cblas_dgbmv.c.

17 {
18  char TA;
19 #ifdef F77_CHAR
20  F77_CHAR F77_TA;
21 #else
22  #define F77_TA &TA
23 #endif
24 #ifdef F77_INT
25  F77_INT F77_M=M, F77_N=N, F77_lda=lda, F77_incX=incX, F77_incY=incY;
26  F77_INT F77_KL=KL,F77_KU=KU;
27 #else
28  #define F77_M M
29  #define F77_N N
30  #define F77_lda lda
31  #define F77_KL KL
32  #define F77_KU KU
33  #define F77_incX incX
34  #define F77_incY incY
35 #endif
36  extern int CBLAS_CallFromC;
37  extern int RowMajorStrg;
38  RowMajorStrg = 0;
39 
40  CBLAS_CallFromC = 1;
41  if (order == CblasColMajor)
42  {
43  if (TransA == CblasNoTrans) TA = 'N';
44  else if (TransA == CblasTrans) TA = 'T';
45  else if (TransA == CblasConjTrans) TA = 'C';
46  else
47  {
48  cblas_xerbla(2, "cblas_dgbmv","Illegal TransA setting, %d\n", TransA);
49  CBLAS_CallFromC = 0;
50  RowMajorStrg = 0;
51  return;
52  }
53  #ifdef F77_CHAR
54  F77_TA = C2F_CHAR(&TA);
55  #endif
56  F77_dgbmv(F77_TA, &F77_M, &F77_N, &F77_KL, &F77_KU, &alpha,
57  A, &F77_lda, X, &F77_incX, &beta, Y, &F77_incY);
58  }
59  else if (order == CblasRowMajor)
60  {
61  RowMajorStrg = 1;
62  if (TransA == CblasNoTrans) TA = 'T';
63  else if (TransA == CblasTrans) TA = 'N';
64  else if (TransA == CblasConjTrans) TA = 'N';
65  else
66  {
67  cblas_xerbla(2, "cblas_dgbmv","Illegal TransA setting, %d\n", TransA);
68  CBLAS_CallFromC = 0;
69  RowMajorStrg = 0;
70  return;
71  }
72  #ifdef F77_CHAR
73  F77_TA = C2F_CHAR(&TA);
74  #endif
75  F77_dgbmv(F77_TA, &F77_N, &F77_M, &F77_KU, &F77_KL, &alpha,
76  A ,&F77_lda, X,&F77_incX, &beta, Y, &F77_incY);
77  }
78  else cblas_xerbla(1, "cblas_dgbmv", "Illegal Order setting, %d\n", order);
79  CBLAS_CallFromC = 0;
80  RowMajorStrg = 0;
81 }
#define F77_N
#define F77_incX
#define F77_KL
#define F77_incY
int CBLAS_CallFromC
Definition: cblas_globals.c:1
void cblas_xerbla(int p, const char *rout, const char *form,...)
Definition: cblas_xerbla.c:8
#define F77_M
#define F77_KU
#define F77_lda
const int N
Definition: speed_test.cpp:3
#define F77_TA
void F77_dgbmv(FCHAR, FINT, FINT, FINT, FINT, const double *, const double *, FINT, const double *, FINT, const double *, double *, FINT)
int RowMajorStrg
Definition: cblas_globals.c:2

◆ cblas_dgemm()

void cblas_dgemm ( const enum CBLAS_ORDER  Order,
const enum CBLAS_TRANSPOSE  TransA,
const enum CBLAS_TRANSPOSE  TransB,
const int  M,
const int  N,
const int  K,
const double  alpha,
const double A,
const int  lda,
const double B,
const int  ldb,
const double  beta,
double C,
const int  ldc 
)

Definition at line 12 of file cblas_dgemm.c.

17 {
18  char TA, TB;
19 #ifdef F77_CHAR
20  F77_CHAR F77_TA, F77_TB;
21 #else
22  #define F77_TA &TA
23  #define F77_TB &TB
24 #endif
25 
26 #ifdef F77_INT
27  F77_INT F77_M=M, F77_N=N, F77_K=K, F77_lda=lda, F77_ldb=ldb;
28  F77_INT F77_ldc=ldc;
29 #else
30  #define F77_M M
31  #define F77_N N
32  #define F77_K K
33  #define F77_lda lda
34  #define F77_ldb ldb
35  #define F77_ldc ldc
36 #endif
37 
38  extern int CBLAS_CallFromC;
39  extern int RowMajorStrg;
40  RowMajorStrg = 0;
41  CBLAS_CallFromC = 1;
42 
43  if( Order == CblasColMajor )
44  {
45  if(TransA == CblasTrans) TA='T';
46  else if ( TransA == CblasConjTrans ) TA='C';
47  else if ( TransA == CblasNoTrans ) TA='N';
48  else
49  {
50  cblas_xerbla(2, "cblas_dgemm","Illegal TransA setting, %d\n", TransA);
51  CBLAS_CallFromC = 0;
52  RowMajorStrg = 0;
53  return;
54  }
55 
56  if(TransB == CblasTrans) TB='T';
57  else if ( TransB == CblasConjTrans ) TB='C';
58  else if ( TransB == CblasNoTrans ) TB='N';
59  else
60  {
61  cblas_xerbla(3, "cblas_dgemm","Illegal TransB setting, %d\n", TransB);
62  CBLAS_CallFromC = 0;
63  RowMajorStrg = 0;
64  return;
65  }
66 
67  #ifdef F77_CHAR
68  F77_TA = C2F_CHAR(&TA);
69  F77_TB = C2F_CHAR(&TB);
70  #endif
71 
72  F77_dgemm(F77_TA, F77_TB, &F77_M, &F77_N, &F77_K, &alpha, A,
73  &F77_lda, B, &F77_ldb, &beta, C, &F77_ldc);
74  } else if (Order == CblasRowMajor)
75  {
76  RowMajorStrg = 1;
77  if(TransA == CblasTrans) TB='T';
78  else if ( TransA == CblasConjTrans ) TB='C';
79  else if ( TransA == CblasNoTrans ) TB='N';
80  else
81  {
82  cblas_xerbla(2, "cblas_dgemm","Illegal TransA setting, %d\n", TransA);
83  CBLAS_CallFromC = 0;
84  RowMajorStrg = 0;
85  return;
86  }
87  if(TransB == CblasTrans) TA='T';
88  else if ( TransB == CblasConjTrans ) TA='C';
89  else if ( TransB == CblasNoTrans ) TA='N';
90  else
91  {
92  cblas_xerbla(2, "cblas_dgemm","Illegal TransB setting, %d\n", TransB);
93  CBLAS_CallFromC = 0;
94  RowMajorStrg = 0;
95  return;
96  }
97  #ifdef F77_CHAR
98  F77_TA = C2F_CHAR(&TA);
99  F77_TB = C2F_CHAR(&TB);
100  #endif
101 
102  F77_dgemm(F77_TA, F77_TB, &F77_N, &F77_M, &F77_K, &alpha, B,
103  &F77_ldb, A, &F77_lda, &beta, C, &F77_ldc);
104  }
105  else cblas_xerbla(1, "cblas_dgemm", "Illegal Order setting, %d\n", Order);
106  CBLAS_CallFromC = 0;
107  RowMajorStrg = 0;
108  return;
109 }
#define F77_ldc
#define F77_K
#define F77_lda
int CBLAS_CallFromC
Definition: cblas_globals.c:1
#define F77_ldb
#define F77_TA
#define F77_M
void cblas_xerbla(int p, const char *rout, const char *form,...)
Definition: cblas_xerbla.c:8
void F77_dgemm(FCHAR, FCHAR, FINT, FINT, FINT, const double *, const double *, FINT, const double *, FINT, const double *, double *, FINT)
#define F77_N
const int N
Definition: speed_test.cpp:3
#define F77_TB
int RowMajorStrg
Definition: cblas_globals.c:2

◆ cblas_dgemv()

void cblas_dgemv ( const enum CBLAS_ORDER  order,
const enum CBLAS_TRANSPOSE  TransA,
const int  M,
const int  N,
const double  alpha,
const double A,
const int  lda,
const double X,
const int  incX,
const double  beta,
double Y,
const int  incY 
)

Definition at line 11 of file cblas_dgemv.c.

16 {
17  char TA;
18 #ifdef F77_CHAR
19  F77_CHAR F77_TA;
20 #else
21  #define F77_TA &TA
22 #endif
23 #ifdef F77_INT
24  F77_INT F77_M=M, F77_N=N, F77_lda=lda, F77_incX=incX, F77_incY=incY;
25 #else
26  #define F77_M M
27  #define F77_N N
28  #define F77_lda lda
29  #define F77_incX incX
30  #define F77_incY incY
31 #endif
32  extern int CBLAS_CallFromC;
33  extern int RowMajorStrg;
34  RowMajorStrg = 0;
35 
36  CBLAS_CallFromC = 1;
37  if (order == CblasColMajor)
38  {
39  if (TransA == CblasNoTrans) TA = 'N';
40  else if (TransA == CblasTrans) TA = 'T';
41  else if (TransA == CblasConjTrans) TA = 'C';
42  else
43  {
44  cblas_xerbla(2, "cblas_dgemv","Illegal TransA setting, %d\n", TransA);
45  CBLAS_CallFromC = 0;
46  RowMajorStrg = 0;
47  return;
48  }
49  #ifdef F77_CHAR
50  F77_TA = C2F_CHAR(&TA);
51  #endif
52  F77_dgemv(F77_TA, &F77_M, &F77_N, &alpha, A, &F77_lda, X, &F77_incX,
53  &beta, Y, &F77_incY);
54  }
55  else if (order == CblasRowMajor)
56  {
57  RowMajorStrg = 1;
58  if (TransA == CblasNoTrans) TA = 'T';
59  else if (TransA == CblasTrans) TA = 'N';
60  else if (TransA == CblasConjTrans) TA = 'N';
61  else
62  {
63  cblas_xerbla(2, "cblas_dgemv","Illegal TransA setting, %d\n", TransA);
64  CBLAS_CallFromC = 0;
65  RowMajorStrg = 0;
66  return;
67  }
68  #ifdef F77_CHAR
69  F77_TA = C2F_CHAR(&TA);
70  #endif
71  F77_dgemv(F77_TA, &F77_N, &F77_M, &alpha, A, &F77_lda, X,
72  &F77_incX, &beta, Y, &F77_incY);
73  }
74  else cblas_xerbla(1, "cblas_dgemv", "Illegal Order setting, %d\n", order);
75  CBLAS_CallFromC = 0;
76  RowMajorStrg = 0;
77  return;
78 }
#define F77_lda
#define F77_N
#define F77_incY
#define F77_incX
int CBLAS_CallFromC
Definition: cblas_globals.c:1
void F77_dgemv(FCHAR, FINT, FINT, const double *, const double *, FINT, const double *, FINT, const double *, double *, FINT)
#define F77_M
void cblas_xerbla(int p, const char *rout, const char *form,...)
Definition: cblas_xerbla.c:8
const int N
Definition: speed_test.cpp:3
#define F77_TA
int RowMajorStrg
Definition: cblas_globals.c:2

◆ cblas_dger()

void cblas_dger ( const enum CBLAS_ORDER  order,
const int  M,
const int  N,
const double  alpha,
const double X,
const int  incX,
const double Y,
const int  incY,
double A,
const int  lda 
)

Definition at line 12 of file cblas_dger.c.

15 {
16 #ifdef F77_INT
17  F77_INT F77_M=M, F77_N=N, F77_lda=lda, F77_incX=incX, F77_incY=incY;
18 #else
19  #define F77_M M
20  #define F77_N N
21  #define F77_incX incX
22  #define F77_incY incY
23  #define F77_lda lda
24 #endif
25 
26  extern int CBLAS_CallFromC;
27  extern int RowMajorStrg;
28  RowMajorStrg = 0;
29 
30  CBLAS_CallFromC = 1;
31  if (order == CblasColMajor)
32  {
33  F77_dger( &F77_M, &F77_N, &alpha, X, &F77_incX, Y, &F77_incY, A,
34  &F77_lda);
35  }
36  else if (order == CblasRowMajor)
37  {
38  RowMajorStrg = 1;
39  F77_dger( &F77_N, &F77_M ,&alpha, Y, &F77_incY, X, &F77_incX, A,
40  &F77_lda);
41 
42  }
43  else cblas_xerbla(1, "cblas_dger", "Illegal Order setting, %d\n", order);
44  CBLAS_CallFromC = 0;
45  RowMajorStrg = 0;
46  return;
47 }
#define F77_incY
int CBLAS_CallFromC
Definition: cblas_globals.c:1
void F77_dger(FINT, FINT, const double *, const double *, FINT, const double *, FINT, double *, FINT)
#define F77_incX
#define F77_M
#define F77_lda
void cblas_xerbla(int p, const char *rout, const char *form,...)
Definition: cblas_xerbla.c:8
#define F77_N
const int N
Definition: speed_test.cpp:3
int RowMajorStrg
Definition: cblas_globals.c:2

◆ cblas_dnrm2()

double cblas_dnrm2 ( const int  N,
const double X,
const int  incX 
)

Definition at line 12 of file cblas_dnrm2.c.

13 {
14  double nrm2;
15 #ifdef F77_INT
16  F77_INT F77_N=N, F77_incX=incX;
17 #else
18  #define F77_N N
19  #define F77_incX incX
20 #endif
21  F77_dnrm2_sub( &F77_N, X, &F77_incX, &nrm2);
22  return nrm2;
23 }
void F77_dnrm2_sub(FINT, const double *, FINT, double *)
#define F77_incX
#define F77_N
const int N
Definition: speed_test.cpp:3

◆ cblas_drot()

void cblas_drot ( const int  N,
double X,
const int  incX,
double Y,
const int  incY,
const double  c,
const double  s 
)

Definition at line 11 of file cblas_dr