blas.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /* Kernel Independent Fast Multipole Method
  2. Copyright (C) 2004 Lexing Ying, New York University
  3. This program is free software; you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation; either version 2, or (at your option)
  6. any later version.
  7. This program is distributed in the hope that it will be useful, but WITHOUT
  8. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  9. FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
  10. for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program; see the file COPYING. If not, write to the Free
  13. Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  14. 02111-1307, USA. */
  15. #ifndef _BLAS_H_
  16. #define _BLAS_H_
  17. extern "C"
  18. {
  19. /*! DAXPY compute y := alpha * x + y where alpha is a scalar and x and y are n-vectors.
  20. * See http://www.netlib.org/blas/daxpy.f for more information.
  21. */
  22. void saxpy_(int* N, float* ALPHA, float* X, int* INCX, float* Y, int* INCY);
  23. void daxpy_(int* N, double* ALPHA, double* X, int* INCX, double* Y, int* INCY);
  24. /*! DGEMM performs one of the matrix-matrix operations
  25. *
  26. * C := alpha*op( A )*op( B ) + beta*C,
  27. *
  28. * where op( X ) is one of
  29. *
  30. * op( X ) = X or op( X ) = X',
  31. *
  32. * alpha and beta are scalars, and A, B and C are matrices, with op( A )
  33. * an m by k matrix, op( B ) a k by n matrix and C an m by n matrix.
  34. * See http://www.netlib.org/blas/dgemm.f for more information.
  35. */
  36. void sgemm_(char* TRANSA, char* TRANSB, int* M, int* N, int* K, float* ALPHA, float* A,
  37. int* LDA, float* B, int* LDB, float* BETA, float* C, int* LDC);
  38. void dgemm_(char* TRANSA, char* TRANSB, int* M, int* N, int* K, double* ALPHA, double* A,
  39. int* LDA, double* B, int* LDB, double* BETA, double* C, int* LDC);
  40. /*! DGEMV performs one of the matrix-vector operations
  41. *
  42. * y := alpha*A*x + beta*y, or y := alpha*A'*x + beta*y,
  43. *
  44. * where alpha and beta are scalars, x and y are vectors and A is an m by n matrix.
  45. * See http://www.netlib.org/blas/dgemv.f for more information
  46. */
  47. void sgemv_(char* TRANS, int* M, int* N, float* ALPHA, float* A, int* LDA, float* X, int* INCX,
  48. float* BETA, float* Y, int* INCY);
  49. void dgemv_(char* TRANS, int* M, int* N, double* ALPHA, double* A, int* LDA, double* X, int* INCX,
  50. double* BETA, double* Y, int* INCY);
  51. /*! DGER performs the rank 1 operation
  52. *
  53. * A := alpha*x*y' + A,
  54. *
  55. * where alpha is a scalar, x is an m element vector, y is an n element
  56. * vector and A is an m by n matrix.
  57. * See http://www.netlib.org/blas/dger.f for more information
  58. */
  59. void sger_ (int* M, int * N, float* ALPHA, float* X, int* INCX, float* Y, int* INCY,
  60. float* A, int* LDA);
  61. void dger_ (int* M, int * N, double* ALPHA, double* X, int* INCX, double* Y, int* INCY,
  62. double* A, int* LDA);
  63. /*! DSCAL computes y := alpha * y where alpha is a scalar and y is an n-vector.
  64. * See http://www.netlib.org/blas/dscal.f for more information
  65. */
  66. void sscal_(int* N, float* ALPHA, float* X, int* INCX);
  67. void dscal_(int* N, double* ALPHA, double* X, int* INCX);
  68. }
  69. #endif