Actual source code: dxml.c
1: /*$Id: dxml.c,v 1.24 2001/08/07 03:02:47 balay Exp $*/
3: /*
4: Provides an interface to the DEC Alpha DXML library
5: At the moment the DXNL library only offers sparse matrix vector product.
6: */
7: #include src/mat/impls/aij/seq/aij.h
9: #if defined(PETSC_HAVE_DXML) && !defined(__cplusplus)
11: #undef __FUNCT__
13: static int MatMult_SeqAIJ_DXML(Mat A,Vec x,Vec y)
14: {
15: Mat_SeqAIJ *a = (Mat_SeqAIJ*)A->data;
16: PetscScalar *xx,*yy;
17: int ierr,zero = 0;
20: VecGetArray(x,&xx);
21: VecGetArray(y,&yy);
22: dmatvec_genr_(&zero,a->a,a->i,a->j,&a->nz,0,xx,yy,&a->m);
23: PetscLogFlops(2*a->nz - a->m);
24: return(0);
25: }
28: #undef __FUNCT__
30: int MatUseDXML_SeqAIJ(Mat A)
31: {
33: A->ops->mult = MatMult_SeqAIJ_DXML;
34: return(0);
35: }
37: #else
39: #undef __FUNCT__
41: int MatUseDXML_SeqAIJ(Mat A)
42: {
44: return(0);
45: }
48: #endif