1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165
|
/*!
* \file
* \brief BLAS header functions. For internal use only.
* \author Adam Piatyszek
*
* -------------------------------------------------------------------------
*
* IT++ - C++ library of mathematical, signal processing, speech processing,
* and communications classes and functions
*
* Copyright (C) 1995-2008 (see AUTHORS file for a list of contributors)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
* -------------------------------------------------------------------------
*/
#ifndef BLAS_H
#define BLAS_H
#ifndef _MSC_VER
# include <itpp/config.h>
#else
# include <itpp/config_msvc.h>
#endif
#include <complex>
//! \cond
namespace blas {
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
// ----------------------------------------------------------------------
// BLAS 1 functions
// ----------------------------------------------------------------------
void dswap_(const int *n,
double *x, const int *incx,
double *y, const int *incy);
void zswap_(const int *n,
std::complex<double> *x, const int *incx,
std::complex<double> *y, const int *incy);
void dscal_(const int *n,
const double *alpha,
double *x, const int *incx);
void zscal_(const int *n,
const std::complex<double> *alpha,
std::complex<double> *x, const int *incx);
void dcopy_(const int *n,
const double *x, const int *incx,
double *y, const int *incy);
void zcopy_(const int *n,
const std::complex<double> *x, const int *incx,
std::complex<double> *y, const int *incy);
void daxpy_(const int *n,
const double *alpha,
const double *x, const int *incx,
double *y, const int *incy);
void zaxpy_(const int *n,
const std::complex<double> *alpha,
const std::complex<double> *x, const int *incx,
std::complex<double> *y, const int *incy);
double ddot_(const int *n,
const double *x, const int *incx,
const double *y, const int *incy);
#if defined(HAVE_ZDOTUSUB) || defined(HAVE_ZDOTU_VOID)
#if defined(HAVE_ZDOTU_VOID)
# define zdotusub_ zdotu_
#endif // HAVE_ZDOTU_VOID
void zdotusub_(std::complex<double> *dot,
const int *n,
const std::complex<double> *x, const int *incx,
const std::complex<double> *y, const int *incy);
#endif // HAVE_ZDOTUSUB || HAVE_ZDOTU_VOID
// ----------------------------------------------------------------------
// BLAS 2 functions
// ----------------------------------------------------------------------
void dgemv_(const char *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 zgemv_(const char *transA, const int *m, const int *n,
const std::complex<double> *alpha,
const std::complex<double> *A, const int *ldA,
const std::complex<double> *x, const int *incx,
const std::complex<double> *beta,
std::complex<double> *y, const int *incy);
void dger_(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 zgeru_(const int *m, const int *n,
const std::complex<double> *alpha,
const std::complex<double> *x, const int *inxx,
const std::complex<double> *y, const int *incy,
std::complex<double> *A, const int *ldA);
void zgerc_(const int *m, const int *n,
const std::complex<double> *alpha,
const std::complex<double> *x, const int *inxx,
const std::complex<double> *y, const int *incy,
std::complex<double> *A, const int *ldA);
// ----------------------------------------------------------------------
// BLAS 3 functions
// ----------------------------------------------------------------------
void dgemm_(const char *transA, const char *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 zgemm_(const char *transA, const char *transB,
const int *m, const int *n, const int *k,
const std::complex<double> *alpha,
const std::complex<double> *A, const int *ldA,
const std::complex<double> *B, const int *ldB,
const std::complex<double> *beta,
std::complex<double> *C, const int *ldC);
#ifdef __cplusplus
}
#endif /* __cplusplus */
} // namespace blas
//! \endcond
#endif // #ifndef BLAS_H
|