xref: /petsc/src/mat/impls/aij/mpi/mpihipsparse/mpihipsparsematimpl.h (revision 98d129c30f3ee9fdddc40fdbc5a989b7be64f888)
1 /* Portions of this code are under:
2    Copyright (c) 2022 Advanced Micro Devices, Inc. All rights reserved.
3 */
4 #pragma once
5 
6 #include <petscpkg_version.h>
7 #if PETSC_PKG_HIP_VERSION_GE(5, 2, 0)
8   #include <hipsparse/hipsparse.h>
9 #else
10   #include <hipsparse.h>
11 #endif
12 #include <petsc/private/veccupmimpl.h>
13 
14 struct Mat_MPIAIJHIPSPARSE {
15   /* The following are used by GPU capabilities to store matrix storage formats on the device */
16   MatHIPSPARSEStorageFormat diagGPUMatFormat    = MAT_HIPSPARSE_CSR;
17   MatHIPSPARSEStorageFormat offdiagGPUMatFormat = MAT_HIPSPARSE_CSR;
18 };
19