616 lines
36 KiB
C
616 lines
36 KiB
C
|
|
/*** DO NOT EDIT THIS FILE DIRECTLY (use 'headers' to generate) ***/
|
|
|
|
#ifndef hypre_MV_HEADER
|
|
#define hypre_MV_HEADER
|
|
|
|
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
#include <math.h>
|
|
|
|
#include <HYPRE_config.h>
|
|
|
|
#include "HYPRE_seq_mv.h"
|
|
|
|
#include "_hypre_utilities.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/******************************************************************************
|
|
* Copyright 1998-2019 Lawrence Livermore National Security, LLC and other
|
|
* HYPRE Project Developers. See the top-level COPYRIGHT file for details.
|
|
*
|
|
* SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
|
******************************************************************************/
|
|
|
|
/******************************************************************************
|
|
*
|
|
* Header info for CSR Matrix data structures
|
|
*
|
|
* Note: this matrix currently uses 0-based indexing.
|
|
*
|
|
*****************************************************************************/
|
|
|
|
#ifndef hypre_CSR_MATRIX_HEADER
|
|
#define hypre_CSR_MATRIX_HEADER
|
|
|
|
#if defined(HYPRE_USING_CUSPARSE) || defined(HYPRE_USING_ROCSPARSE) || defined(HYPRE_USING_ONEMKLSPARSE)
|
|
struct hypre_CsrsvData;
|
|
typedef struct hypre_CsrsvData hypre_CsrsvData;
|
|
#endif
|
|
|
|
#if defined(HYPRE_USING_CUSPARSE) || defined(HYPRE_USING_ROCSPARSE) || defined(HYPRE_USING_ONEMKLSPARSE)
|
|
struct hypre_GpuMatData;
|
|
typedef struct hypre_GpuMatData hypre_GpuMatData;
|
|
#endif
|
|
|
|
/*--------------------------------------------------------------------------
|
|
* CSR Matrix
|
|
*--------------------------------------------------------------------------*/
|
|
|
|
typedef struct
|
|
{
|
|
HYPRE_Int *i;
|
|
HYPRE_Int *j;
|
|
HYPRE_BigInt *big_j;
|
|
HYPRE_Int num_rows;
|
|
HYPRE_Int num_cols;
|
|
HYPRE_Int num_nonzeros;
|
|
hypre_int *i_short;
|
|
hypre_int *j_short;
|
|
HYPRE_Int owns_data; /* Does the CSRMatrix create/destroy `data', `i', `j'? */
|
|
HYPRE_Complex *data;
|
|
HYPRE_Int *rownnz; /* for compressing rows in matrix multiplication */
|
|
HYPRE_Int num_rownnz;
|
|
HYPRE_MemoryLocation memory_location; /* memory location of arrays i, j, data */
|
|
#if defined(HYPRE_USING_CUSPARSE) || defined(HYPRE_USING_ROCSPARSE) || defined(HYPRE_USING_ONEMKLSPARSE)
|
|
HYPRE_Int *sorted_j; /* some cusparse routines require sorted CSR */
|
|
HYPRE_Complex *sorted_data;
|
|
hypre_CsrsvData *csrsv_data;
|
|
hypre_GpuMatData *mat_data;
|
|
#endif
|
|
} hypre_CSRMatrix;
|
|
|
|
/*--------------------------------------------------------------------------
|
|
* Accessor functions for the CSR Matrix structure
|
|
*--------------------------------------------------------------------------*/
|
|
|
|
#define hypre_CSRMatrixData(matrix) ((matrix) -> data)
|
|
#define hypre_CSRMatrixI(matrix) ((matrix) -> i)
|
|
#define hypre_CSRMatrixJ(matrix) ((matrix) -> j)
|
|
#define hypre_CSRMatrixBigJ(matrix) ((matrix) -> big_j)
|
|
#define hypre_CSRMatrixNumRows(matrix) ((matrix) -> num_rows)
|
|
#define hypre_CSRMatrixNumCols(matrix) ((matrix) -> num_cols)
|
|
#define hypre_CSRMatrixNumNonzeros(matrix) ((matrix) -> num_nonzeros)
|
|
#define hypre_CSRMatrixRownnz(matrix) ((matrix) -> rownnz)
|
|
#define hypre_CSRMatrixNumRownnz(matrix) ((matrix) -> num_rownnz)
|
|
#define hypre_CSRMatrixOwnsData(matrix) ((matrix) -> owns_data)
|
|
#define hypre_CSRMatrixMemoryLocation(matrix) ((matrix) -> memory_location)
|
|
|
|
#if defined(HYPRE_USING_CUSPARSE) || defined(HYPRE_USING_ROCSPARSE) || defined(HYPRE_USING_ONEMKLSPARSE)
|
|
#define hypre_CSRMatrixSortedJ(matrix) ((matrix) -> sorted_j)
|
|
#define hypre_CSRMatrixSortedData(matrix) ((matrix) -> sorted_data)
|
|
#define hypre_CSRMatrixCsrsvData(matrix) ((matrix) -> csrsv_data)
|
|
#define hypre_CSRMatrixGPUMatData(matrix) ((matrix) -> mat_data)
|
|
#endif
|
|
|
|
HYPRE_Int hypre_CSRMatrixGetLoadBalancedPartitionBegin( hypre_CSRMatrix *A );
|
|
HYPRE_Int hypre_CSRMatrixGetLoadBalancedPartitionEnd( hypre_CSRMatrix *A );
|
|
|
|
/*--------------------------------------------------------------------------
|
|
* CSR Boolean Matrix
|
|
*--------------------------------------------------------------------------*/
|
|
|
|
typedef struct
|
|
{
|
|
HYPRE_Int *i;
|
|
HYPRE_Int *j;
|
|
HYPRE_BigInt *big_j;
|
|
HYPRE_Int num_rows;
|
|
HYPRE_Int num_cols;
|
|
HYPRE_Int num_nonzeros;
|
|
HYPRE_Int owns_data;
|
|
|
|
} hypre_CSRBooleanMatrix;
|
|
|
|
/*--------------------------------------------------------------------------
|
|
* Accessor functions for the CSR Boolean Matrix structure
|
|
*--------------------------------------------------------------------------*/
|
|
|
|
#define hypre_CSRBooleanMatrix_Get_I(matrix) ((matrix)->i)
|
|
#define hypre_CSRBooleanMatrix_Get_J(matrix) ((matrix)->j)
|
|
#define hypre_CSRBooleanMatrix_Get_BigJ(matrix) ((matrix)->big_j)
|
|
#define hypre_CSRBooleanMatrix_Get_NRows(matrix) ((matrix)->num_rows)
|
|
#define hypre_CSRBooleanMatrix_Get_NCols(matrix) ((matrix)->num_cols)
|
|
#define hypre_CSRBooleanMatrix_Get_NNZ(matrix) ((matrix)->num_nonzeros)
|
|
#define hypre_CSRBooleanMatrix_Get_OwnsData(matrix) ((matrix)->owns_data)
|
|
|
|
#endif
|
|
|
|
/******************************************************************************
|
|
* Copyright 1998-2019 Lawrence Livermore National Security, LLC and other
|
|
* HYPRE Project Developers. See the top-level COPYRIGHT file for details.
|
|
*
|
|
* SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
|
******************************************************************************/
|
|
|
|
/******************************************************************************
|
|
*
|
|
* Header info for Mapped Matrix data structures
|
|
*
|
|
*****************************************************************************/
|
|
|
|
#ifndef hypre_MAPPED_MATRIX_HEADER
|
|
#define hypre_MAPPED_MATRIX_HEADER
|
|
|
|
/*--------------------------------------------------------------------------
|
|
* Mapped Matrix
|
|
*--------------------------------------------------------------------------*/
|
|
|
|
typedef struct
|
|
{
|
|
void *matrix;
|
|
HYPRE_Int (*ColMap)(HYPRE_Int, void *);
|
|
void *MapData;
|
|
|
|
} hypre_MappedMatrix;
|
|
|
|
/*--------------------------------------------------------------------------
|
|
* Accessor functions for the Mapped Matrix structure
|
|
*--------------------------------------------------------------------------*/
|
|
|
|
#define hypre_MappedMatrixMatrix(matrix) ((matrix) -> matrix)
|
|
#define hypre_MappedMatrixColMap(matrix) ((matrix) -> ColMap)
|
|
#define hypre_MappedMatrixMapData(matrix) ((matrix) -> MapData)
|
|
|
|
#define hypre_MappedMatrixColIndex(matrix,j) \
|
|
(hypre_MappedMatrixColMap(matrix)(j,hypre_MappedMatrixMapData(matrix)))
|
|
|
|
#endif
|
|
|
|
/******************************************************************************
|
|
* Copyright 1998-2019 Lawrence Livermore National Security, LLC and other
|
|
* HYPRE Project Developers. See the top-level COPYRIGHT file for details.
|
|
*
|
|
* SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
|
******************************************************************************/
|
|
|
|
/******************************************************************************
|
|
*
|
|
* Header info for Multiblock Matrix data structures
|
|
*
|
|
*****************************************************************************/
|
|
|
|
#ifndef hypre_MULTIBLOCK_MATRIX_HEADER
|
|
#define hypre_MULTIBLOCK_MATRIX_HEADER
|
|
|
|
/*--------------------------------------------------------------------------
|
|
* Multiblock Matrix
|
|
*--------------------------------------------------------------------------*/
|
|
|
|
typedef struct
|
|
{
|
|
HYPRE_Int num_submatrices;
|
|
HYPRE_Int *submatrix_types;
|
|
void **submatrices;
|
|
|
|
} hypre_MultiblockMatrix;
|
|
|
|
/*--------------------------------------------------------------------------
|
|
* Accessor functions for the Multiblock Matrix structure
|
|
*--------------------------------------------------------------------------*/
|
|
|
|
#define hypre_MultiblockMatrixSubmatrices(matrix) ((matrix) -> submatrices)
|
|
#define hypre_MultiblockMatrixNumSubmatrices(matrix) ((matrix) -> num_submatrices)
|
|
#define hypre_MultiblockMatrixSubmatrixTypes(matrix) ((matrix) -> submatrix_types)
|
|
|
|
#define hypre_MultiblockMatrixSubmatrix(matrix,j) (hypre_MultiblockMatrixSubmatrices\
|
|
(matrix)[j])
|
|
#define hypre_MultiblockMatrixSubmatrixType(matrix,j) (hypre_MultiblockMatrixSubmatrixTypes\
|
|
(matrix)[j])
|
|
|
|
#endif
|
|
|
|
/******************************************************************************
|
|
* Copyright 1998-2019 Lawrence Livermore National Security, LLC and other
|
|
* HYPRE Project Developers. See the top-level COPYRIGHT file for details.
|
|
*
|
|
* SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
|
******************************************************************************/
|
|
|
|
/******************************************************************************
|
|
*
|
|
* Header info for Vector data structure
|
|
*
|
|
*****************************************************************************/
|
|
|
|
#ifndef hypre_VECTOR_HEADER
|
|
#define hypre_VECTOR_HEADER
|
|
|
|
/*--------------------------------------------------------------------------
|
|
* hypre_Vector
|
|
*--------------------------------------------------------------------------*/
|
|
|
|
typedef struct
|
|
{
|
|
HYPRE_Complex *data;
|
|
HYPRE_Int size;
|
|
|
|
/* Does the Vector create/destroy `data'? */
|
|
HYPRE_Int owns_data;
|
|
|
|
/* memory location of array data */
|
|
HYPRE_MemoryLocation memory_location;
|
|
|
|
/* For multivectors...*/
|
|
HYPRE_Int num_vectors; /* the above "size" is size of one vector */
|
|
HYPRE_Int multivec_storage_method;
|
|
/* ...if 0, store colwise v0[0], v0[1], ..., v1[0], v1[1], ... v2[0]... */
|
|
/* ...if 1, store rowwise v0[0], v1[0], ..., v0[1], v1[1], ... */
|
|
/* With colwise storage, vj[i] = data[ j*size + i]
|
|
With rowwise storage, vj[i] = data[ j + num_vectors*i] */
|
|
HYPRE_Int vecstride, idxstride;
|
|
/* ... so vj[i] = data[ j*vecstride + i*idxstride ] regardless of row_storage.*/
|
|
} hypre_Vector;
|
|
|
|
/*--------------------------------------------------------------------------
|
|
* Accessor functions for the Vector structure
|
|
*--------------------------------------------------------------------------*/
|
|
|
|
#define hypre_VectorData(vector) ((vector) -> data)
|
|
#define hypre_VectorSize(vector) ((vector) -> size)
|
|
#define hypre_VectorOwnsData(vector) ((vector) -> owns_data)
|
|
#define hypre_VectorMemoryLocation(vector) ((vector) -> memory_location)
|
|
#define hypre_VectorNumVectors(vector) ((vector) -> num_vectors)
|
|
#define hypre_VectorMultiVecStorageMethod(vector) ((vector) -> multivec_storage_method)
|
|
#define hypre_VectorVectorStride(vector) ((vector) -> vecstride )
|
|
#define hypre_VectorIndexStride(vector) ((vector) -> idxstride )
|
|
|
|
#endif
|
|
|
|
/******************************************************************************
|
|
* Copyright 1998-2019 Lawrence Livermore National Security, LLC and other
|
|
* HYPRE Project Developers. See the top-level COPYRIGHT file for details.
|
|
*
|
|
* SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
|
******************************************************************************/
|
|
|
|
/* csr_matop.c */
|
|
HYPRE_Int hypre_CSRMatrixAddFirstPass ( HYPRE_Int firstrow, HYPRE_Int lastrow, HYPRE_Int *marker,
|
|
HYPRE_Int *twspace, HYPRE_Int *map_A2C, HYPRE_Int *map_B2C, hypre_CSRMatrix *A, hypre_CSRMatrix *B,
|
|
HYPRE_Int nnzrows_C, HYPRE_Int nrows_C, HYPRE_Int ncols_C, HYPRE_Int *rownnz_C,
|
|
HYPRE_MemoryLocation memory_location_C, HYPRE_Int *C_i, hypre_CSRMatrix **C_ptr );
|
|
HYPRE_Int hypre_CSRMatrixAddSecondPass ( HYPRE_Int firstrow, HYPRE_Int lastrow, HYPRE_Int *marker,
|
|
HYPRE_Int *twspace, HYPRE_Int *map_A2C, HYPRE_Int *map_B2C, HYPRE_Int *rownnz_C,
|
|
HYPRE_Complex alpha, HYPRE_Complex beta, hypre_CSRMatrix *A, hypre_CSRMatrix *B,
|
|
hypre_CSRMatrix *C);
|
|
hypre_CSRMatrix *hypre_CSRMatrixAddHost ( HYPRE_Complex alpha, hypre_CSRMatrix *A,
|
|
HYPRE_Complex beta, hypre_CSRMatrix *B );
|
|
hypre_CSRMatrix *hypre_CSRMatrixAdd ( HYPRE_Complex alpha, hypre_CSRMatrix *A, HYPRE_Complex beta,
|
|
hypre_CSRMatrix *B );
|
|
hypre_CSRMatrix *hypre_CSRMatrixBigAdd ( hypre_CSRMatrix *A, hypre_CSRMatrix *B );
|
|
hypre_CSRMatrix *hypre_CSRMatrixMultiplyHost ( hypre_CSRMatrix *A, hypre_CSRMatrix *B );
|
|
hypre_CSRMatrix *hypre_CSRMatrixMultiply ( hypre_CSRMatrix *A, hypre_CSRMatrix *B );
|
|
hypre_CSRMatrix *hypre_CSRMatrixDeleteZeros ( hypre_CSRMatrix *A, HYPRE_Real tol );
|
|
HYPRE_Int hypre_CSRMatrixTransposeHost ( hypre_CSRMatrix *A, hypre_CSRMatrix **AT, HYPRE_Int data );
|
|
HYPRE_Int hypre_CSRMatrixTranspose ( hypre_CSRMatrix *A, hypre_CSRMatrix **AT, HYPRE_Int data );
|
|
HYPRE_Int hypre_CSRMatrixReorder ( hypre_CSRMatrix *A );
|
|
HYPRE_Complex hypre_CSRMatrixSumElts ( hypre_CSRMatrix *A );
|
|
HYPRE_Real hypre_CSRMatrixFnorm( hypre_CSRMatrix *A );
|
|
HYPRE_Int hypre_CSRMatrixSplit(hypre_CSRMatrix *Bs_ext, HYPRE_BigInt first_col_diag_B,
|
|
HYPRE_BigInt last_col_diag_B, HYPRE_Int num_cols_offd_B, HYPRE_BigInt *col_map_offd_B,
|
|
HYPRE_Int *num_cols_offd_C_ptr, HYPRE_BigInt **col_map_offd_C_ptr, hypre_CSRMatrix **Bext_diag_ptr,
|
|
hypre_CSRMatrix **Bext_offd_ptr);
|
|
hypre_CSRMatrix * hypre_CSRMatrixAddPartial( hypre_CSRMatrix *A, hypre_CSRMatrix *B,
|
|
HYPRE_Int *row_nums);
|
|
void hypre_CSRMatrixComputeRowSumHost( hypre_CSRMatrix *A, HYPRE_Int *CF_i, HYPRE_Int *CF_j,
|
|
HYPRE_Complex *row_sum, HYPRE_Int type, HYPRE_Complex scal, const char *set_or_add);
|
|
void hypre_CSRMatrixComputeRowSum( hypre_CSRMatrix *A, HYPRE_Int *CF_i, HYPRE_Int *CF_j,
|
|
HYPRE_Complex *row_sum, HYPRE_Int type, HYPRE_Complex scal, const char *set_or_add);
|
|
void hypre_CSRMatrixExtractDiagonal( hypre_CSRMatrix *A, HYPRE_Complex *d, HYPRE_Int type);
|
|
void hypre_CSRMatrixExtractDiagonalHost( hypre_CSRMatrix *A, HYPRE_Complex *d, HYPRE_Int type);
|
|
HYPRE_Int hypre_CSRMatrixScale(hypre_CSRMatrix *A, HYPRE_Complex scalar);
|
|
HYPRE_Int hypre_CSRMatrixSetConstantValues( hypre_CSRMatrix *A, HYPRE_Complex value);
|
|
HYPRE_Int hypre_CSRMatrixDiagScale( hypre_CSRMatrix *A, hypre_Vector *ld, hypre_Vector *rd);
|
|
|
|
/* csr_matop_device.c */
|
|
hypre_CSRMatrix *hypre_CSRMatrixAddDevice ( HYPRE_Complex alpha, hypre_CSRMatrix *A,
|
|
HYPRE_Complex beta, hypre_CSRMatrix *B );
|
|
hypre_CSRMatrix *hypre_CSRMatrixMultiplyDevice ( hypre_CSRMatrix *A, hypre_CSRMatrix *B );
|
|
hypre_CSRMatrix *hypre_CSRMatrixTripleMultiplyDevice ( hypre_CSRMatrix *A, hypre_CSRMatrix *B,
|
|
hypre_CSRMatrix *C );
|
|
HYPRE_Int hypre_CSRMatrixSplitDevice_core( HYPRE_Int job, HYPRE_Int num_rows, HYPRE_Int B_ext_nnz,
|
|
HYPRE_Int *B_ext_ii, HYPRE_BigInt *B_ext_bigj, HYPRE_Complex *B_ext_data, char *B_ext_xata,
|
|
HYPRE_BigInt first_col_diag_B, HYPRE_BigInt last_col_diag_B, HYPRE_Int num_cols_offd_B,
|
|
HYPRE_BigInt *col_map_offd_B, HYPRE_Int **map_B_to_C_ptr, HYPRE_Int *num_cols_offd_C_ptr,
|
|
HYPRE_BigInt **col_map_offd_C_ptr, HYPRE_Int *B_ext_diag_nnz_ptr, HYPRE_Int *B_ext_diag_ii,
|
|
HYPRE_Int *B_ext_diag_j, HYPRE_Complex *B_ext_diag_data, char *B_ext_diag_xata,
|
|
HYPRE_Int *B_ext_offd_nnz_ptr, HYPRE_Int *B_ext_offd_ii, HYPRE_Int *B_ext_offd_j,
|
|
HYPRE_Complex *B_ext_offd_data, char *B_ext_offd_xata );
|
|
HYPRE_Int hypre_CSRMatrixSplitDevice(hypre_CSRMatrix *B_ext, HYPRE_BigInt first_col_diag_B,
|
|
HYPRE_BigInt last_col_diag_B, HYPRE_Int num_cols_offd_B, HYPRE_BigInt *col_map_offd_B,
|
|
HYPRE_Int **map_B_to_C_ptr, HYPRE_Int *num_cols_offd_C_ptr, HYPRE_BigInt **col_map_offd_C_ptr,
|
|
hypre_CSRMatrix **B_ext_diag_ptr, hypre_CSRMatrix **B_ext_offd_ptr);
|
|
HYPRE_Int hypre_CSRMatrixTransposeDevice ( hypre_CSRMatrix *A, hypre_CSRMatrix **AT,
|
|
HYPRE_Int data );
|
|
hypre_CSRMatrix* hypre_CSRMatrixAddPartialDevice( hypre_CSRMatrix *A, hypre_CSRMatrix *B,
|
|
HYPRE_Int *row_nums);
|
|
HYPRE_Int hypre_CSRMatrixColNNzRealDevice( hypre_CSRMatrix *A, HYPRE_Real *colnnz);
|
|
HYPRE_Int hypre_CSRMatrixMoveDiagFirstDevice( hypre_CSRMatrix *A );
|
|
HYPRE_Int hypre_CSRMatrixCheckDiagFirstDevice( hypre_CSRMatrix *A );
|
|
HYPRE_Int hypre_CSRMatrixFixZeroDiagDevice( hypre_CSRMatrix *A, HYPRE_Complex v, HYPRE_Real tol );
|
|
HYPRE_Int hypre_CSRMatrixReplaceDiagDevice( hypre_CSRMatrix *A, HYPRE_Complex *new_diag,
|
|
HYPRE_Complex v, HYPRE_Real tol );
|
|
void hypre_CSRMatrixComputeRowSumDevice( hypre_CSRMatrix *A, HYPRE_Int *CF_i, HYPRE_Int *CF_j,
|
|
HYPRE_Complex *row_sum, HYPRE_Int type, HYPRE_Complex scal, const char *set_or_add);
|
|
void hypre_CSRMatrixExtractDiagonalDevice( hypre_CSRMatrix *A, HYPRE_Complex *d, HYPRE_Int type);
|
|
hypre_CSRMatrix* hypre_CSRMatrixStack2Device(hypre_CSRMatrix *A, hypre_CSRMatrix *B);
|
|
hypre_CSRMatrix* hypre_CSRMatrixIdentityDevice(HYPRE_Int n, HYPRE_Complex alp);
|
|
hypre_CSRMatrix* hypre_CSRMatrixDiagMatrixFromVectorDevice(HYPRE_Int n, HYPRE_Complex *v);
|
|
hypre_CSRMatrix* hypre_CSRMatrixDiagMatrixFromMatrixDevice(hypre_CSRMatrix *A, HYPRE_Int type);
|
|
HYPRE_Int hypre_CSRMatrixRemoveDiagonalDevice(hypre_CSRMatrix *A);
|
|
HYPRE_Int hypre_CSRMatrixDropSmallEntriesDevice( hypre_CSRMatrix *A, HYPRE_Real tol,
|
|
HYPRE_Real *elmt_tols);
|
|
HYPRE_Int hypre_CSRMatrixSortRow(hypre_CSRMatrix *A);
|
|
HYPRE_Int hypre_CSRMatrixTriLowerUpperSolveDevice(char uplo, hypre_CSRMatrix *A,
|
|
HYPRE_Real *l1_norms, hypre_Vector *f, hypre_Vector *u );
|
|
HYPRE_Int hypre_CSRMatrixTriLowerUpperSolveRocsparse(char uplo, hypre_CSRMatrix *A,
|
|
HYPRE_Real *l1_norms, hypre_Vector *f, hypre_Vector *u );
|
|
HYPRE_Int hypre_CSRMatrixTriLowerUpperSolveCusparse(char uplo, hypre_CSRMatrix *A,
|
|
HYPRE_Real *l1_norms, hypre_Vector *f, hypre_Vector *u );
|
|
HYPRE_Int hypre_CSRMatrixIntersectPattern(hypre_CSRMatrix *A, hypre_CSRMatrix *B, HYPRE_Int *markA,
|
|
HYPRE_Int diag_option);
|
|
HYPRE_Int hypre_CSRMatrixDiagScaleDevice( hypre_CSRMatrix *A, hypre_Vector *ld, hypre_Vector *rd);
|
|
|
|
/* csr_matrix.c */
|
|
hypre_CSRMatrix *hypre_CSRMatrixCreate ( HYPRE_Int num_rows, HYPRE_Int num_cols,
|
|
HYPRE_Int num_nonzeros );
|
|
HYPRE_Int hypre_CSRMatrixDestroy ( hypre_CSRMatrix *matrix );
|
|
HYPRE_Int hypre_CSRMatrixInitialize_v2( hypre_CSRMatrix *matrix, HYPRE_Int bigInit,
|
|
HYPRE_MemoryLocation memory_location );
|
|
HYPRE_Int hypre_CSRMatrixInitialize ( hypre_CSRMatrix *matrix );
|
|
HYPRE_Int hypre_CSRMatrixBigInitialize ( hypre_CSRMatrix *matrix );
|
|
HYPRE_Int hypre_CSRMatrixBigJtoJ ( hypre_CSRMatrix *matrix );
|
|
HYPRE_Int hypre_CSRMatrixJtoBigJ ( hypre_CSRMatrix *matrix );
|
|
HYPRE_Int hypre_CSRMatrixSetDataOwner ( hypre_CSRMatrix *matrix, HYPRE_Int owns_data );
|
|
HYPRE_Int hypre_CSRMatrixSetRownnz ( hypre_CSRMatrix *matrix );
|
|
hypre_CSRMatrix *hypre_CSRMatrixRead ( char *file_name );
|
|
HYPRE_Int hypre_CSRMatrixPrint ( hypre_CSRMatrix *matrix, const char *file_name );
|
|
HYPRE_Int hypre_CSRMatrixPrint2( hypre_CSRMatrix *matrix, const char *file_name );
|
|
HYPRE_Int hypre_CSRMatrixPrintHB ( hypre_CSRMatrix *matrix_input, char *file_name );
|
|
HYPRE_Int hypre_CSRMatrixPrintMM( hypre_CSRMatrix *matrix, HYPRE_Int basei, HYPRE_Int basej,
|
|
HYPRE_Int trans, const char *file_name );
|
|
HYPRE_Int hypre_CSRMatrixCopy ( hypre_CSRMatrix *A, hypre_CSRMatrix *B, HYPRE_Int copy_data );
|
|
hypre_CSRMatrix *hypre_CSRMatrixClone ( hypre_CSRMatrix *A, HYPRE_Int copy_data );
|
|
hypre_CSRMatrix *hypre_CSRMatrixClone_v2( hypre_CSRMatrix *A, HYPRE_Int copy_data,
|
|
HYPRE_MemoryLocation memory_location );
|
|
hypre_CSRMatrix *hypre_CSRMatrixUnion ( hypre_CSRMatrix *A, hypre_CSRMatrix *B,
|
|
HYPRE_BigInt *col_map_offd_A, HYPRE_BigInt *col_map_offd_B, HYPRE_BigInt **col_map_offd_C );
|
|
HYPRE_Int hypre_CSRMatrixPrefetch( hypre_CSRMatrix *A, HYPRE_MemoryLocation memory_location);
|
|
HYPRE_Int hypre_CSRMatrixCheckSetNumNonzeros( hypre_CSRMatrix *matrix );
|
|
HYPRE_Int hypre_CSRMatrixResize( hypre_CSRMatrix *matrix, HYPRE_Int new_num_rows,
|
|
HYPRE_Int new_num_cols, HYPRE_Int new_num_nonzeros );
|
|
|
|
/* csr_matvec.c */
|
|
// y[offset:end] = alpha*A[offset:end,:]*x + beta*b[offset:end]
|
|
HYPRE_Int hypre_CSRMatrixMatvecOutOfPlace ( HYPRE_Complex alpha, hypre_CSRMatrix *A,
|
|
hypre_Vector *x, HYPRE_Complex beta, hypre_Vector *b, hypre_Vector *y, HYPRE_Int offset );
|
|
// y = alpha*A + beta*y
|
|
HYPRE_Int hypre_CSRMatrixMatvec ( HYPRE_Complex alpha, hypre_CSRMatrix *A, hypre_Vector *x,
|
|
HYPRE_Complex beta, hypre_Vector *y );
|
|
HYPRE_Int hypre_CSRMatrixMatvecT ( HYPRE_Complex alpha, hypre_CSRMatrix *A, hypre_Vector *x,
|
|
HYPRE_Complex beta, hypre_Vector *y );
|
|
HYPRE_Int hypre_CSRMatrixMatvec_FF ( HYPRE_Complex alpha, hypre_CSRMatrix *A, hypre_Vector *x,
|
|
HYPRE_Complex beta, hypre_Vector *y, HYPRE_Int *CF_marker_x, HYPRE_Int *CF_marker_y,
|
|
HYPRE_Int fpt );
|
|
|
|
/* csr_matvec_device.c */
|
|
HYPRE_Int hypre_CSRMatrixMatvecDevice(HYPRE_Int trans, HYPRE_Complex alpha, hypre_CSRMatrix *A,
|
|
hypre_Vector *x, HYPRE_Complex beta, hypre_Vector *b, hypre_Vector *y, HYPRE_Int offset );
|
|
HYPRE_Int hypre_CSRMatrixMatvecCusparseNewAPI( HYPRE_Int trans, HYPRE_Complex alpha,
|
|
hypre_CSRMatrix *A, hypre_Vector *x, HYPRE_Complex beta, hypre_Vector *y, HYPRE_Int offset );
|
|
HYPRE_Int hypre_CSRMatrixMatvecCusparseOldAPI( HYPRE_Int trans, HYPRE_Complex alpha,
|
|
hypre_CSRMatrix *A, hypre_Vector *x, HYPRE_Complex beta, hypre_Vector *y, HYPRE_Int offset );
|
|
HYPRE_Int hypre_CSRMatrixMatvecOMPOffload (HYPRE_Int trans, HYPRE_Complex alpha, hypre_CSRMatrix *A,
|
|
hypre_Vector *x, HYPRE_Complex beta, hypre_Vector *y, HYPRE_Int offset );
|
|
HYPRE_Int hypre_CSRMatrixMatvecRocsparse (HYPRE_Int trans, HYPRE_Complex alpha, hypre_CSRMatrix *A,
|
|
hypre_Vector *x, HYPRE_Complex beta, hypre_Vector *y, HYPRE_Int offset );
|
|
HYPRE_Int hypre_CSRMatrixMatvecOnemklsparse (HYPRE_Int trans, HYPRE_Complex alpha,
|
|
hypre_CSRMatrix *A,
|
|
hypre_Vector *x, HYPRE_Complex beta, hypre_Vector *y, HYPRE_Int offset );
|
|
|
|
/* genpart.c */
|
|
HYPRE_Int hypre_GeneratePartitioning ( HYPRE_BigInt length, HYPRE_Int num_procs,
|
|
HYPRE_BigInt **part_ptr );
|
|
HYPRE_Int hypre_GenerateLocalPartitioning ( HYPRE_BigInt length, HYPRE_Int num_procs,
|
|
HYPRE_Int myid, HYPRE_BigInt *part );
|
|
|
|
/* HYPRE_csr_matrix.c */
|
|
HYPRE_CSRMatrix HYPRE_CSRMatrixCreate ( HYPRE_Int num_rows, HYPRE_Int num_cols,
|
|
HYPRE_Int *row_sizes );
|
|
HYPRE_Int HYPRE_CSRMatrixDestroy ( HYPRE_CSRMatrix matrix );
|
|
HYPRE_Int HYPRE_CSRMatrixInitialize ( HYPRE_CSRMatrix matrix );
|
|
HYPRE_CSRMatrix HYPRE_CSRMatrixRead ( char *file_name );
|
|
void HYPRE_CSRMatrixPrint ( HYPRE_CSRMatrix matrix, char *file_name );
|
|
HYPRE_Int HYPRE_CSRMatrixGetNumRows ( HYPRE_CSRMatrix matrix, HYPRE_Int *num_rows );
|
|
|
|
/* HYPRE_mapped_matrix.c */
|
|
HYPRE_MappedMatrix HYPRE_MappedMatrixCreate ( void );
|
|
HYPRE_Int HYPRE_MappedMatrixDestroy ( HYPRE_MappedMatrix matrix );
|
|
HYPRE_Int HYPRE_MappedMatrixLimitedDestroy ( HYPRE_MappedMatrix matrix );
|
|
HYPRE_Int HYPRE_MappedMatrixInitialize ( HYPRE_MappedMatrix matrix );
|
|
HYPRE_Int HYPRE_MappedMatrixAssemble ( HYPRE_MappedMatrix matrix );
|
|
void HYPRE_MappedMatrixPrint ( HYPRE_MappedMatrix matrix );
|
|
HYPRE_Int HYPRE_MappedMatrixGetColIndex ( HYPRE_MappedMatrix matrix, HYPRE_Int j );
|
|
void *HYPRE_MappedMatrixGetMatrix ( HYPRE_MappedMatrix matrix );
|
|
HYPRE_Int HYPRE_MappedMatrixSetMatrix ( HYPRE_MappedMatrix matrix, void *matrix_data );
|
|
HYPRE_Int HYPRE_MappedMatrixSetColMap ( HYPRE_MappedMatrix matrix, HYPRE_Int (*ColMap )(HYPRE_Int,
|
|
void *));
|
|
HYPRE_Int HYPRE_MappedMatrixSetMapData ( HYPRE_MappedMatrix matrix, void *MapData );
|
|
|
|
/* HYPRE_multiblock_matrix.c */
|
|
HYPRE_MultiblockMatrix HYPRE_MultiblockMatrixCreate ( void );
|
|
HYPRE_Int HYPRE_MultiblockMatrixDestroy ( HYPRE_MultiblockMatrix matrix );
|
|
HYPRE_Int HYPRE_MultiblockMatrixLimitedDestroy ( HYPRE_MultiblockMatrix matrix );
|
|
HYPRE_Int HYPRE_MultiblockMatrixInitialize ( HYPRE_MultiblockMatrix matrix );
|
|
HYPRE_Int HYPRE_MultiblockMatrixAssemble ( HYPRE_MultiblockMatrix matrix );
|
|
void HYPRE_MultiblockMatrixPrint ( HYPRE_MultiblockMatrix matrix );
|
|
HYPRE_Int HYPRE_MultiblockMatrixSetNumSubmatrices ( HYPRE_MultiblockMatrix matrix, HYPRE_Int n );
|
|
HYPRE_Int HYPRE_MultiblockMatrixSetSubmatrixType ( HYPRE_MultiblockMatrix matrix, HYPRE_Int j,
|
|
HYPRE_Int type );
|
|
|
|
/* HYPRE_vector.c */
|
|
HYPRE_Vector HYPRE_VectorCreate ( HYPRE_Int size );
|
|
HYPRE_Int HYPRE_VectorDestroy ( HYPRE_Vector vector );
|
|
HYPRE_Int HYPRE_VectorInitialize ( HYPRE_Vector vector );
|
|
HYPRE_Int HYPRE_VectorPrint ( HYPRE_Vector vector, char *file_name );
|
|
HYPRE_Vector HYPRE_VectorRead ( char *file_name );
|
|
|
|
/* mapped_matrix.c */
|
|
hypre_MappedMatrix *hypre_MappedMatrixCreate ( void );
|
|
HYPRE_Int hypre_MappedMatrixDestroy ( hypre_MappedMatrix *matrix );
|
|
HYPRE_Int hypre_MappedMatrixLimitedDestroy ( hypre_MappedMatrix *matrix );
|
|
HYPRE_Int hypre_MappedMatrixInitialize ( hypre_MappedMatrix *matrix );
|
|
HYPRE_Int hypre_MappedMatrixAssemble ( hypre_MappedMatrix *matrix );
|
|
void hypre_MappedMatrixPrint ( hypre_MappedMatrix *matrix );
|
|
HYPRE_Int hypre_MappedMatrixGetColIndex ( hypre_MappedMatrix *matrix, HYPRE_Int j );
|
|
void *hypre_MappedMatrixGetMatrix ( hypre_MappedMatrix *matrix );
|
|
HYPRE_Int hypre_MappedMatrixSetMatrix ( hypre_MappedMatrix *matrix, void *matrix_data );
|
|
HYPRE_Int hypre_MappedMatrixSetColMap ( hypre_MappedMatrix *matrix, HYPRE_Int (*ColMap )(HYPRE_Int,
|
|
void *));
|
|
HYPRE_Int hypre_MappedMatrixSetMapData ( hypre_MappedMatrix *matrix, void *map_data );
|
|
|
|
/* multiblock_matrix.c */
|
|
hypre_MultiblockMatrix *hypre_MultiblockMatrixCreate ( void );
|
|
HYPRE_Int hypre_MultiblockMatrixDestroy ( hypre_MultiblockMatrix *matrix );
|
|
HYPRE_Int hypre_MultiblockMatrixLimitedDestroy ( hypre_MultiblockMatrix *matrix );
|
|
HYPRE_Int hypre_MultiblockMatrixInitialize ( hypre_MultiblockMatrix *matrix );
|
|
HYPRE_Int hypre_MultiblockMatrixAssemble ( hypre_MultiblockMatrix *matrix );
|
|
void hypre_MultiblockMatrixPrint ( hypre_MultiblockMatrix *matrix );
|
|
HYPRE_Int hypre_MultiblockMatrixSetNumSubmatrices ( hypre_MultiblockMatrix *matrix, HYPRE_Int n );
|
|
HYPRE_Int hypre_MultiblockMatrixSetSubmatrixType ( hypre_MultiblockMatrix *matrix, HYPRE_Int j,
|
|
HYPRE_Int type );
|
|
HYPRE_Int hypre_MultiblockMatrixSetSubmatrix ( hypre_MultiblockMatrix *matrix, HYPRE_Int j,
|
|
void *submatrix );
|
|
|
|
/* vector.c */
|
|
hypre_Vector *hypre_SeqVectorCreate ( HYPRE_Int size );
|
|
hypre_Vector *hypre_SeqMultiVectorCreate ( HYPRE_Int size, HYPRE_Int num_vectors );
|
|
HYPRE_Int hypre_SeqVectorDestroy ( hypre_Vector *vector );
|
|
HYPRE_Int hypre_SeqVectorInitialize_v2( hypre_Vector *vector,
|
|
HYPRE_MemoryLocation memory_location );
|
|
HYPRE_Int hypre_SeqVectorInitialize ( hypre_Vector *vector );
|
|
HYPRE_Int hypre_SeqVectorSetDataOwner ( hypre_Vector *vector, HYPRE_Int owns_data );
|
|
hypre_Vector *hypre_SeqVectorRead ( char *file_name );
|
|
HYPRE_Int hypre_SeqVectorPrint ( hypre_Vector *vector, char *file_name );
|
|
HYPRE_Int hypre_SeqVectorSetConstantValues ( hypre_Vector *v, HYPRE_Complex value );
|
|
HYPRE_Int hypre_SeqVectorSetRandomValues ( hypre_Vector *v, HYPRE_Int seed );
|
|
HYPRE_Int hypre_SeqVectorCopy ( hypre_Vector *x, hypre_Vector *y );
|
|
hypre_Vector *hypre_SeqVectorCloneDeep ( hypre_Vector *x );
|
|
hypre_Vector *hypre_SeqVectorCloneDeep_v2( hypre_Vector *x, HYPRE_MemoryLocation memory_location );
|
|
hypre_Vector *hypre_SeqVectorCloneShallow ( hypre_Vector *x );
|
|
HYPRE_Int hypre_SeqVectorScale( HYPRE_Complex alpha, hypre_Vector *y );
|
|
|
|
HYPRE_Int hypre_SeqVectorAxpy ( HYPRE_Complex alpha, hypre_Vector *x, hypre_Vector *y );
|
|
HYPRE_Real hypre_SeqVectorInnerProd ( hypre_Vector *x, hypre_Vector *y );
|
|
HYPRE_Int hypre_SeqVectorMassInnerProd(hypre_Vector *x, hypre_Vector **y, HYPRE_Int k,
|
|
HYPRE_Int unroll, HYPRE_Real *result);
|
|
HYPRE_Int hypre_SeqVectorMassInnerProd4(hypre_Vector *x, hypre_Vector **y, HYPRE_Int k,
|
|
HYPRE_Real *result);
|
|
HYPRE_Int hypre_SeqVectorMassInnerProd8(hypre_Vector *x, hypre_Vector **y, HYPRE_Int k,
|
|
HYPRE_Real *result);
|
|
HYPRE_Int hypre_SeqVectorMassDotpTwo(hypre_Vector *x, hypre_Vector *y, hypre_Vector **z,
|
|
HYPRE_Int k, HYPRE_Int unroll, HYPRE_Real *result_x, HYPRE_Real *result_y);
|
|
HYPRE_Int hypre_SeqVectorMassDotpTwo4(hypre_Vector *x, hypre_Vector *y, hypre_Vector **z,
|
|
HYPRE_Int k, HYPRE_Real *result_x, HYPRE_Real *result_y);
|
|
HYPRE_Int hypre_SeqVectorMassDotpTwo8(hypre_Vector *x, hypre_Vector *y, hypre_Vector **z,
|
|
HYPRE_Int k, HYPRE_Real *result_x, HYPRE_Real *result_y);
|
|
HYPRE_Int hypre_SeqVectorMassAxpy(HYPRE_Complex *alpha, hypre_Vector **x, hypre_Vector *y,
|
|
HYPRE_Int k, HYPRE_Int unroll);
|
|
HYPRE_Int hypre_SeqVectorMassAxpy4(HYPRE_Complex *alpha, hypre_Vector **x, hypre_Vector *y,
|
|
HYPRE_Int k);
|
|
HYPRE_Int hypre_SeqVectorMassAxpy8(HYPRE_Complex *alpha, hypre_Vector **x, hypre_Vector *y,
|
|
HYPRE_Int k);
|
|
HYPRE_Complex hypre_SeqVectorSumElts ( hypre_Vector *vector );
|
|
HYPRE_Int hypre_SeqVectorPrefetch(hypre_Vector *x, HYPRE_MemoryLocation memory_location);
|
|
//HYPRE_Int hypre_SeqVectorMax( HYPRE_Complex alpha, hypre_Vector *x, HYPRE_Complex beta, hypre_Vector *y );
|
|
|
|
HYPRE_Int hypreDevice_CSRSpAdd(HYPRE_Int ma, HYPRE_Int mb, HYPRE_Int n, HYPRE_Int nnzA,
|
|
HYPRE_Int nnzB, HYPRE_Int *d_ia, HYPRE_Int *d_ja, HYPRE_Complex alpha, HYPRE_Complex *d_aa,
|
|
HYPRE_Int *d_ja_map, HYPRE_Int *d_ib, HYPRE_Int *d_jb, HYPRE_Complex beta, HYPRE_Complex *d_ab,
|
|
HYPRE_Int *d_jb_map, HYPRE_Int *d_num_b, HYPRE_Int *nnzC_out, HYPRE_Int **d_ic_out,
|
|
HYPRE_Int **d_jc_out, HYPRE_Complex **d_ac_out);
|
|
|
|
HYPRE_Int hypreDevice_CSRSpTrans(HYPRE_Int m, HYPRE_Int n, HYPRE_Int nnzA, HYPRE_Int *d_ia,
|
|
HYPRE_Int *d_ja, HYPRE_Complex *d_aa, HYPRE_Int **d_ic_out, HYPRE_Int **d_jc_out,
|
|
HYPRE_Complex **d_ac_out, HYPRE_Int want_data);
|
|
|
|
HYPRE_Int hypreDevice_CSRSpTransCusparse(HYPRE_Int m, HYPRE_Int n, HYPRE_Int nnzA, HYPRE_Int *d_ia,
|
|
HYPRE_Int *d_ja, HYPRE_Complex *d_aa, HYPRE_Int **d_ic_out, HYPRE_Int **d_jc_out,
|
|
HYPRE_Complex **d_ac_out, HYPRE_Int want_data);
|
|
|
|
HYPRE_Int hypreDevice_CSRSpTransRocsparse(HYPRE_Int m, HYPRE_Int n, HYPRE_Int nnzA, HYPRE_Int *d_ia,
|
|
HYPRE_Int *d_ja, HYPRE_Complex *d_aa, HYPRE_Int **d_ic_out, HYPRE_Int **d_jc_out,
|
|
HYPRE_Complex **d_ac_out, HYPRE_Int want_data);
|
|
|
|
HYPRE_Int hypreDevice_CSRSpTransOnemklsparse(HYPRE_Int m, HYPRE_Int n, HYPRE_Int nnzA,
|
|
HYPRE_Int *d_ia, HYPRE_Int *d_ja, HYPRE_Complex *d_aa, HYPRE_Int **d_ic_out, HYPRE_Int **d_jc_out,
|
|
HYPRE_Complex **d_ac_out, HYPRE_Int want_data);
|
|
|
|
HYPRE_Int hypreDevice_CSRSpGemm(hypre_CSRMatrix *A, hypre_CSRMatrix *B, hypre_CSRMatrix **C_ptr);
|
|
|
|
HYPRE_Int hypreDevice_CSRSpGemmRownnzEstimate(HYPRE_Int m, HYPRE_Int k, HYPRE_Int n,
|
|
HYPRE_Int *d_ia, HYPRE_Int *d_ja, HYPRE_Int *d_ib, HYPRE_Int *d_jb, HYPRE_Int *d_rc);
|
|
|
|
HYPRE_Int hypreDevice_CSRSpGemmRownnzUpperbound(HYPRE_Int m, HYPRE_Int k, HYPRE_Int n,
|
|
HYPRE_Int *d_ia, HYPRE_Int *d_ja, HYPRE_Int *d_ib, HYPRE_Int *d_jb, HYPRE_Int in_rc,
|
|
HYPRE_Int *d_rc, HYPRE_Int *d_rf);
|
|
|
|
HYPRE_Int hypreDevice_CSRSpGemmRownnz(HYPRE_Int m, HYPRE_Int k, HYPRE_Int n, HYPRE_Int *d_ia,
|
|
HYPRE_Int *d_ja, HYPRE_Int *d_ib, HYPRE_Int *d_jb, HYPRE_Int in_rc, HYPRE_Int *d_rc);
|
|
|
|
HYPRE_Int hypreDevice_CSRSpGemmNumerWithRownnzUpperbound(HYPRE_Int m, HYPRE_Int k, HYPRE_Int n,
|
|
HYPRE_Int *d_ia, HYPRE_Int *d_ja, HYPRE_Complex *d_a, HYPRE_Int *d_ib, HYPRE_Int *d_jb,
|
|
HYPRE_Complex *d_b, HYPRE_Int *d_rc, HYPRE_Int exact_rownnz, HYPRE_Int **d_ic_out,
|
|
HYPRE_Int **d_jc_out, HYPRE_Complex **d_c_out, HYPRE_Int *nnzC);
|
|
|
|
HYPRE_Int hypreDevice_CSRSpGemmNumerWithRownnzEstimate(HYPRE_Int m, HYPRE_Int k, HYPRE_Int n,
|
|
HYPRE_Int *d_ia, HYPRE_Int *d_ja, HYPRE_Complex *d_a, HYPRE_Int *d_ib, HYPRE_Int *d_jb,
|
|
HYPRE_Complex *d_b, HYPRE_Int *d_rc, HYPRE_Int **d_ic_out, HYPRE_Int **d_jc_out,
|
|
HYPRE_Complex **d_c_out, HYPRE_Int *nnzC);
|
|
|
|
HYPRE_Int hypreDevice_CSRSpGemmCusparseGenericAPI(HYPRE_Int m, HYPRE_Int k, HYPRE_Int n,
|
|
HYPRE_Int nnzA, HYPRE_Int *d_ia, HYPRE_Int *d_ja, HYPRE_Complex *d_a, HYPRE_Int nnzB,
|
|
HYPRE_Int *d_ib, HYPRE_Int *d_jb, HYPRE_Complex *d_b, HYPRE_Int *nnzC_out, HYPRE_Int **d_ic_out,
|
|
HYPRE_Int **d_jc_out, HYPRE_Complex **d_c_out);
|
|
|
|
HYPRE_Int hypre_SeqVectorElmdivpy( hypre_Vector *x, hypre_Vector *b, hypre_Vector *y );
|
|
HYPRE_Int hypre_SeqVectorElmdivpyMarked( hypre_Vector *x, hypre_Vector *b, hypre_Vector *y,
|
|
HYPRE_Int *marker, HYPRE_Int marker_val );
|
|
|
|
HYPRE_Int hypre_CSRMatrixSpMVDevice( HYPRE_Complex alpha, hypre_CSRMatrix *A, hypre_Vector *x,
|
|
HYPRE_Complex beta, hypre_Vector *y, HYPRE_Int fill );
|
|
|
|
#if defined(HYPRE_USING_CUSPARSE) || defined(HYPRE_USING_ROCSPARSE) || defined(HYPRE_USING_ONEMKLSPARSE)
|
|
hypre_CsrsvData* hypre_CsrsvDataCreate();
|
|
void hypre_CsrsvDataDestroy(hypre_CsrsvData *data);
|
|
hypre_GpuMatData* hypre_GpuMatDataCreate();
|
|
void hypre_GPUMatDataSetCSRData(hypre_GpuMatData *data, hypre_CSRMatrix *matrix);
|
|
void hypre_GpuMatDataDestroy(hypre_GpuMatData *data);
|
|
hypre_GpuMatData* hypre_CSRMatrixGetGPUMatData(hypre_CSRMatrix *matrix);
|
|
#define hypre_CSRMatrixGPUMatDescr(matrix) ( hypre_GpuMatDataMatDecsr(hypre_CSRMatrixGetGPUMatData(matrix)) )
|
|
#define hypre_CSRMatrixGPUMatInfo(matrix) ( hypre_GpuMatDataMatInfo (hypre_CSRMatrixGetGPUMatData(matrix)) )
|
|
#define hypre_CSRMatrixGPUMatHandle(matrix) ( hypre_GpuMatDataMatHandle (hypre_CSRMatrixGetGPUMatData(matrix)) )
|
|
#define hypre_CSRMatrixGPUMatSpMVBuffer(matrix) ( hypre_GpuMatDataSpMVBuffer (hypre_CSRMatrixGetGPUMatData(matrix)) )
|
|
#endif
|
|
void hypre_CSRMatrixGpuSpMVAnalysis(hypre_CSRMatrix *matrix);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|
|
|