You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

cblas_sger.c 1.1 kB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. *
  3. * cblas_sger.c
  4. * This program is a C interface to sger.
  5. * Written by Keita Teranishi
  6. * 4/6/1998
  7. *
  8. */
  9. #include "cblas.h"
  10. #include "cblas_f77.h"
  11. void cblas_sger(const CBLAS_LAYOUT layout, const int M, const int N,
  12. const float alpha, const float *X, const int incX,
  13. const float *Y, const int incY, float *A, const int lda)
  14. {
  15. #ifdef F77_INT
  16. F77_INT F77_M=M, F77_N=N, F77_lda=lda, F77_incX=incX, F77_incY=incY;
  17. #else
  18. #define F77_M M
  19. #define F77_N N
  20. #define F77_incX incX
  21. #define F77_incY incY
  22. #define F77_lda lda
  23. #endif
  24. extern int CBLAS_CallFromC;
  25. extern int RowMajorStrg;
  26. RowMajorStrg = 0;
  27. CBLAS_CallFromC = 1;
  28. if (layout == CblasColMajor)
  29. {
  30. F77_sger( &F77_M, &F77_N, &alpha, X, &F77_incX, Y, &F77_incY, A,
  31. &F77_lda);
  32. }
  33. else if (layout == CblasRowMajor)
  34. {
  35. RowMajorStrg = 1;
  36. F77_sger( &F77_N, &F77_M, &alpha, Y, &F77_incY, X, &F77_incX, A,
  37. &F77_lda);
  38. }
  39. else cblas_xerbla(1, "cblas_sger", "Illegal layout setting, %d\n", layout);
  40. CBLAS_CallFromC = 0;
  41. RowMajorStrg = 0;
  42. return;
  43. }