$search
00001 /* 00002 * OpenNL: Numerical Library 00003 * Copyright (C) 2004 Bruno Levy 00004 * 00005 * This program is free software; you can redistribute it and/or modify 00006 * it under the terms of the GNU General Public License as published by 00007 * the Free Software Foundation; either version 2 of the License, or 00008 * (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program; if not, write to the Free Software 00017 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00018 * 00019 * If you modify this software, you should include a notice giving the 00020 * name of the person performing the modification, the date of modification, 00021 * and the reason for such modification. 00022 * 00023 * Contact: Bruno Levy 00024 * 00025 * levy@loria.fr 00026 * 00027 * ISA Project 00028 * LORIA, INRIA Lorraine, 00029 * Campus Scientifique, BP 239 00030 * 54506 VANDOEUVRE LES NANCY CEDEX 00031 * FRANCE 00032 * 00033 * Note that the GNU General Public License does not permit incorporating 00034 * the Software into proprietary programs. 00035 */ 00036 00037 #include <NL/nl_private.h> 00038 00039 #ifndef __NL_BLAS__ 00040 #define __NL_BLAS__ 00041 00042 #ifndef NL_FORTRAN_WRAP 00043 #define NL_FORTRAN_WRAP(x) x##_ 00044 #endif 00045 00046 00047 /***********************************************************************************/ 00048 /* C wrappers for BLAS routines */ 00049 00050 /* x <- a*x */ 00051 void dscal( int n, double alpha, double *x, int incx ) ; 00052 00053 /* y <- x */ 00054 void dcopy( 00055 int n, double *x, int incx, double *y, int incy 00056 ) ; 00057 00058 /* y <- a*x+y */ 00059 void daxpy( 00060 int n, double alpha, double *x, int incx, double *y, 00061 int incy 00062 ) ; 00063 00064 /* returns x^T*y */ 00065 double ddot( 00066 int n, double *x, int incx, double *y, int incy 00067 ) ; 00068 00070 double dnrm2( int n, double *x, int incx ) ; 00071 00072 typedef enum { NoTranspose=0, Transpose=1, ConjugateTranspose=2 } MatrixTranspose ; 00073 typedef enum { UpperTriangle=0, LowerTriangle=1 } MatrixTriangle ; 00074 typedef enum { UnitTriangular=0, NotUnitTriangular=1 } MatrixUnitTriangular ; 00075 00077 void dtpsv( 00078 MatrixTriangle uplo, MatrixTranspose trans, 00079 MatrixUnitTriangular diag, int n, double *AP, 00080 double *x, int incx 00081 ) ; 00082 00084 void dgemv( 00085 MatrixTranspose trans, int m, int n, double alpha, 00086 double *A, int ldA, double *x, int incx, 00087 double beta, double *y, int incy 00088 ) ; 00089 00090 #endif