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: static int MatMult_SeqAIJ_DXML(Mat A,Vec x,Vec y)
 12: {
 13:   Mat_SeqAIJ   *a = (Mat_SeqAIJ*)A->data;
 14:   PetscScalar  *xx,*yy;
 15:   int          ierr,zero = 0;

 18:   VecGetArray(x,&xx);
 19:   VecGetArray(y,&yy);
 20:   dmatvec_genr_(&zero,a->a,a->i,a->j,&a->nz,0,xx,yy,&a->m);
 21:   PetscLogFlops(2*a->nz - a->m);
 22:   return(0);
 23: }


 26: int MatUseDXML_SeqAIJ(Mat A)
 27: {
 29:   A->ops->mult = MatMult_SeqAIJ_DXML;
 30:   return(0);
 31: }

 33: #else

 35: int MatUseDXML_SeqAIJ(Mat A)
 36: {
 38:   return(0);
 39: }


 42: #endif