1 /* Copyright (C) 2005 The Scalable Software Infrastructure Project. All rights reserved.
2 
3    Redistribution and use in source and binary forms, with or without
4    modification, are permitted provided that the following conditions are met:
5    1. Redistributions of source code must retain the above copyright
6       notice, this list of conditions and the following disclaimer.
7    2. Redistributions in binary form must reproduce the above copyright
8       notice, this list of conditions and the following disclaimer in the
9       documentation and/or other materials provided with the distribution.
10    3. Neither the name of the project nor the names of its contributors
11       may be used to endorse or promote products derived from this software
12       without specific prior written permission.
13 
14    THIS SOFTWARE IS PROVIDED BY THE SCALABLE SOFTWARE INFRASTRUCTURE PROJECT
15    ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
16    TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17    PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE SCALABLE SOFTWARE INFRASTRUCTURE
18    PROJECT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
19    OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
20    SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
21    INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
22    CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
23    ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
24    POSSIBILITY OF SUCH DAMAGE.
25 */
26 
27 
28 #ifdef HAVE_CONFIG_H
29 	#include "lis_config.h"
30 #else
31 #ifdef HAVE_CONFIG_WIN_H
32 	#include "lis_config_win.h"
33 #endif
34 #endif
35 
36 #include <stdio.h>
37 #include <stdlib.h>
38 #ifdef HAVE_MALLOC_H
39         #include <malloc.h>
40 #endif
41 #include <string.h>
42 #include <stdarg.h>
43 #include <math.h>
44 #ifdef _OPENMP
45 	#include <omp.h>
46 #endif
47 #ifdef USE_MPI
48 	#include <mpi.h>
49 #endif
50 #include "lislib.h"
51 
52 /************************************************
53  * lis_matvec_f
54  * lis_matvech_f
55  ************************************************/
56 
57 #ifdef USE_FORTRAN
58 
59 #undef __FUNC__
60 #define __FUNC__ "lis_matvec_f"
lis_matvec_f(LIS_MATRIX_F * A,LIS_VECTOR_F * x,LIS_VECTOR_F * y,LIS_INT * ierr)61 void lis_matvec_f(LIS_MATRIX_F *A, LIS_VECTOR_F *x, LIS_VECTOR_F *y, LIS_INT *ierr)
62 {
63 	LIS_DEBUG_FUNC_IN;
64 
65 	*ierr = lis_matvec((LIS_MATRIX)LIS_V2P(A),(LIS_VECTOR)LIS_V2P(x),(LIS_VECTOR)LIS_V2P(y));
66 	if( *ierr )	return;
67 
68 	LIS_DEBUG_FUNC_OUT;
69 	return;
70 }
71 
72 #undef __FUNC__
73 #define __FUNC__ "lis_matvech_f"
lis_matvech_f(LIS_MATRIX_F * A,LIS_VECTOR_F * x,LIS_VECTOR_F * y,LIS_INT * ierr)74 void lis_matvech_f(LIS_MATRIX_F *A, LIS_VECTOR_F *x, LIS_VECTOR_F *y, LIS_INT *ierr)
75 {
76 	LIS_DEBUG_FUNC_IN;
77 
78 	*ierr = lis_matvech((LIS_MATRIX)LIS_V2P(A),(LIS_VECTOR)LIS_V2P(x),(LIS_VECTOR)LIS_V2P(y));
79 	if( *ierr )	return;
80 
81 	LIS_DEBUG_FUNC_OUT;
82 	return;
83 }
84 
85 
86 #endif
87 
88 
89