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