1: /* Portions of this code are under: 2: Copyright (c) 2022 Advanced Micro Devices, Inc. All rights reserved. 3: */ 4: #pragma once 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> 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: };