blas.h 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. /*! DAXPY compute y := alpha * x + y where alpha is a scalar and x and y are n-vectors.
  19. * See http://www.netlib.org/blas/daxpy.f for more information.
  20. */
  21. void saxpy_(int* N, float* ALPHA, float* X, int* INCX, float* Y, int* INCY);
  22. void daxpy_(int* N, double* ALPHA, double* X, int* INCX, double* Y, int* INCY);
  23. /*! DGEMM performs one of the matrix-matrix operations
  24. *
  25. * C := alpha*op( A )*op( B ) + beta*C,
  26. *
  27. * where op( X ) is one of
  28. *
  29. * op( X ) = X or op( X ) = X',
  30. *
  31. * alpha and beta are scalars, and A, B and C are matrices, with op( A )
  32. * an m by k matrix, op( B ) a k by n matrix and C an m by n matrix.
  33. * See http://www.netlib.org/blas/dgemm.f for more information.
  34. */
  35. void sgemm_(char* TRANSA, char* TRANSB, int* M, int* N, int* K, float* ALPHA, float* A, int* LDA, float* B, int* LDB, float* BETA, float* C, int* LDC);
  36. void dgemm_(char* TRANSA, char* TRANSB, int* M, int* N, int* K, double* ALPHA, double* A, int* LDA, double* B, int* LDB, double* BETA, double* C, int* LDC);
  37. /*! DGEMV performs one of the matrix-vector operations
  38. *
  39. * y := alpha*A*x + beta*y, or y := alpha*A'*x + beta*y,
  40. *
  41. * where alpha and beta are scalars, x and y are vectors and A is an m by n matrix.
  42. * See http://www.netlib.org/blas/dgemv.f for more information
  43. */
  44. void sgemv_(char* TRANS, int* M, int* N, float* ALPHA, float* A, int* LDA, float* X, int* INCX, float* BETA, float* Y, int* INCY);
  45. void dgemv_(char* TRANS, int* M, int* N, double* ALPHA, double* A, int* LDA, double* X, int* INCX, double* BETA, double* Y, int* INCY);
  46. /*! DGER performs the rank 1 operation
  47. *
  48. * A := alpha*x*y' + A,
  49. *
  50. * where alpha is a scalar, x is an m element vector, y is an n element
  51. * vector and A is an m by n matrix.
  52. * See http://www.netlib.org/blas/dger.f for more information
  53. */
  54. void sger_(int* M, int* N, float* ALPHA, float* X, int* INCX, float* Y, int* INCY, float* A, int* LDA);
  55. void dger_(int* M, int* N, double* ALPHA, double* X, int* INCX, double* Y, int* INCY, double* A, int* LDA);
  56. /*! DSCAL computes y := alpha * y where alpha is a scalar and y is an n-vector.
  57. * See http://www.netlib.org/blas/dscal.f for more information
  58. */
  59. void sscal_(int* N, float* ALPHA, float* X, int* INCX);
  60. void dscal_(int* N, double* ALPHA, double* X, int* INCX);
  61. }
  62. #endif