blas.h 4.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. /*
  2. * StarPU
  3. * Copyright (C) INRIA 2008-2009 (see AUTHORS file)
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU Lesser General Public License as published by
  7. * the Free Software Foundation; either version 2.1 of the License, or (at
  8. * your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful, but
  11. * WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13. *
  14. * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  15. */
  16. #ifndef __BLAS_H__
  17. #define __BLAS_H__
  18. #include <starpu.h>
  19. #ifdef ATLAS
  20. #include <cblas.h>
  21. #endif
  22. void SGEMM(char *transa, char *transb, int M, int N, int K, float alpha, float *A, int lda,
  23. float *B, int ldb, float beta, float *C, int ldc);
  24. float SASUM(int N, float *X, int incX);
  25. void SSCAL(int N, float alpha, float *X, int incX);
  26. void STRSM (const char *side, const char *uplo, const char *transa,
  27. const char *diag, const int m, const int n,
  28. const float alpha, const float *A, const int lda,
  29. float *B, const int ldb);
  30. void SSYR (const char *uplo, const int n, const float alpha,
  31. const float *x, const int incx, float *A, const int lda);
  32. void SSYRK (const char *uplo, const char *trans, const int n,
  33. const int k, const float alpha, const float *A,
  34. const int lda, const float beta, float *C,
  35. const int ldc);
  36. void SGER (const int m, const int n, const float alpha,
  37. const float *x, const int incx, const float *y,
  38. const int incy, float *A, const int lda);
  39. void STRSV (const char *uplo, const char *trans, const char *diag,
  40. const int n, const float *A, const int lda, float *x,
  41. const int incx);
  42. void STRMM(const char *side, const char *uplo, const char *transA,
  43. const char *diag, const int m, const int n,
  44. const float alpha, const float *A, const int lda,
  45. float *B, const int ldb);
  46. void STRMV(const char *uplo, const char *transA, const char *diag,
  47. const int n, const float *A, const int lda, float *X,
  48. const int incX);
  49. void SAXPY(const int n, const float alpha, float *X, const int incX, float *Y, const int incy);
  50. int ISAMAX (const int n, float *X, const int incX);
  51. float SDOT(const int n, const float *x, const int incx, const float *y, const int incy);
  52. #if defined(GOTO) || defined(SYSTEM_BLAS)
  53. extern void sgemm_ (const char *transa, const char *transb, const int *m,
  54. const int *n, const int *k, const float *alpha,
  55. const float *A, const int *lda, const float *B,
  56. const int *ldb, const float *beta, float *C,
  57. const int *ldc);
  58. extern void ssyr_ (const char *uplo, const int *n, const float *alpha,
  59. const float *x, const int *incx, float *A, const int *lda);
  60. extern void ssyrk_ (const char *uplo, const char *trans, const int *n,
  61. const int *k, const float *alpha, const float *A,
  62. const int *lda, const float *beta, float *C,
  63. const int *ldc);
  64. extern void strsm_ (const char *side, const char *uplo, const char *transa,
  65. const char *diag, const int *m, const int *n,
  66. const float *alpha, const float *A, const int *lda,
  67. float *B, const int *ldb);
  68. extern double sasum_ (const int *n, const float *x, const int *incx);
  69. extern void sscal_ (const int *n, const float *alpha, float *x,
  70. const int *incx);
  71. extern void sger_(const int *m, const int *n, const float *alpha,
  72. const float *x, const int *incx, const float *y,
  73. const int *incy, float *A, const int *lda);
  74. extern void strsv_ (const char *uplo, const char *trans, const char *diag,
  75. const int *n, const float *A, const int *lda, float *x,
  76. const int *incx);
  77. extern void strmm_(const char *side, const char *uplo, const char *transA,
  78. const char *diag, const int *m, const int *n,
  79. const float *alpha, const float *A, const int *lda,
  80. float *B, const int *ldb);
  81. extern void strmv_(const char *uplo, const char *transA, const char *diag,
  82. const int *n, const float *A, const int *lda, float *X,
  83. const int *incX);
  84. extern void saxpy_(const int *n, const float *alpha, float *X, const int *incX,
  85. float *Y, const int *incy);
  86. extern int isamax_(const int *n, float *X, const int *incX);
  87. /* for some reason, FLOATRET is not a float but a double in GOTOBLAS */
  88. extern double sdot_(const int *n, const float *x, const int *incx, const float *y, const int *incy);
  89. #endif
  90. #endif // __BLAS_H__