hypre/multivector/interpreter.h

59 lines
2.4 KiB
C
Raw Normal View History

2006-08-03 06:32:43 +08:00
/*BHEADER**********************************************************************
2008-07-18 09:34:48 +08:00
* Copyright (c) 2008, Lawrence Livermore National Security, LLC.
2006-08-03 06:32:43 +08:00
* Produced at the Lawrence Livermore National Laboratory.
2008-07-18 09:34:48 +08:00
* This file is part of HYPRE. See file COPYRIGHT for details.
2006-08-03 06:32:43 +08:00
*
2008-07-18 09:34:48 +08:00
* HYPRE is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License (as published by the Free
* Software Foundation) version 2.1 dated February 1999.
2006-08-03 06:32:43 +08:00
*
* $Revision$
***********************************************************************EHEADER*/
2005-07-22 06:24:25 +08:00
#ifndef LOBPCG_INTERFACE_INTERPRETER
#define LOBPCG_INTERFACE_INTERPRETER
#include "_hypre_utilities.h"
2005-07-22 06:24:25 +08:00
typedef struct
{
/* vector operations */
void* (*CreateVector) ( void *vector );
HYPRE_Int (*DestroyVector) ( void *vector );
2005-07-22 06:24:25 +08:00
HYPRE_Real (*InnerProd) ( void *x, void *y );
HYPRE_Int (*CopyVector) ( void *x, void *y );
HYPRE_Int (*ClearVector) ( void *x );
HYPRE_Int (*SetRandomValues) ( void *x, HYPRE_Int seed );
HYPRE_Int (*ScaleVector) ( HYPRE_Complex alpha, void *x );
HYPRE_Int (*Axpy) ( HYPRE_Complex alpha, void *x, void *y );
HYPRE_Int (*VectorSize) (void * vector);
2005-07-22 06:24:25 +08:00
/* multivector operations */
/* do we need the following entry? */
void* (*CreateMultiVector) ( void*, HYPRE_Int n, void *vector );
void* (*CopyCreateMultiVector) ( void *x, HYPRE_Int );
2005-07-22 06:24:25 +08:00
void (*DestroyMultiVector) ( void *x );
HYPRE_Int (*Width) ( void *x );
HYPRE_Int (*Height) ( void *x );
2005-07-22 06:24:25 +08:00
void (*SetMask) ( void *x, HYPRE_Int *mask );
2005-07-22 06:24:25 +08:00
void (*CopyMultiVector) ( void *x, void *y );
void (*ClearMultiVector) ( void *x );
void (*SetRandomVectors) ( void *x, HYPRE_Int seed );
void (*MultiInnerProd) ( void *x, void *y, HYPRE_Int, HYPRE_Int, HYPRE_Int, HYPRE_Real* );
void (*MultiInnerProdDiag) ( void *x, void *y, HYPRE_Int*, HYPRE_Int, HYPRE_Real* );
void (*MultiVecMat) ( void *x, HYPRE_Int, HYPRE_Int, HYPRE_Int, HYPRE_Complex*, void *y );
void (*MultiVecMatDiag) ( void *x, HYPRE_Int*, HYPRE_Int, HYPRE_Complex*, void *y );
void (*MultiAxpy) ( HYPRE_Complex alpha, void *x, void *y );
2005-07-22 06:24:25 +08:00
/* do we need the following 2 entries? */
void (*MultiXapy) ( void *x, HYPRE_Int, HYPRE_Int, HYPRE_Int, HYPRE_Complex*, void *y );
2005-07-22 06:24:25 +08:00
void (*Eval) ( void (*f)( void*, void*, void* ), void*, void *x, void *y );
} mv_InterfaceInterpreter;
#endif