147d993e7Ssuyashtn /* Portions of this code are under: 247d993e7Ssuyashtn Copyright (c) 2022 Advanced Micro Devices, Inc. All rights reserved. 347d993e7Ssuyashtn */ 4*a4963045SJacob Faibussowitsch #pragma once 547d993e7Ssuyashtn 66d54fb17SJacob Faibussowitsch #include <petscpkg_version.h> 747d993e7Ssuyashtn #if PETSC_PKG_HIP_VERSION_GE(5, 2, 0) 847d993e7Ssuyashtn #include <hipsparse/hipsparse.h> 947d993e7Ssuyashtn #else 1047d993e7Ssuyashtn #include <hipsparse.h> 1147d993e7Ssuyashtn #endif 126d54fb17SJacob Faibussowitsch #include <petsc/private/veccupmimpl.h> 1347d993e7Ssuyashtn 1447d993e7Ssuyashtn struct Mat_MPIAIJHIPSPARSE { 1547d993e7Ssuyashtn /* The following are used by GPU capabilities to store matrix storage formats on the device */ 162c4ab24aSJunchao Zhang MatHIPSPARSEStorageFormat diagGPUMatFormat = MAT_HIPSPARSE_CSR; 172c4ab24aSJunchao Zhang MatHIPSPARSEStorageFormat offdiagGPUMatFormat = MAT_HIPSPARSE_CSR; 1847d993e7Ssuyashtn }; 19