13d8e8822SJeremy L Thompson // Copyright (c) 2017-2022, Lawrence Livermore National Security, LLC and other CEED contributors. 23d8e8822SJeremy L Thompson // All Rights Reserved. See the top-level LICENSE and NOTICE files for details. 33d8e8822SJeremy L Thompson // 43d8e8822SJeremy L Thompson // SPDX-License-Identifier: BSD-2-Clause 53d8e8822SJeremy L Thompson // 63d8e8822SJeremy L Thompson // This file is part of CEED: http://github.com/ceed 7*24a65d3dSJeremy L Thompson #pragma once 85754ecacSJeremy L Thompson 95754ecacSJeremy L Thompson #include <ceed.h> 1049aac155SJeremy L Thompson #include <petscsys.h> 115754ecacSJeremy L Thompson 125754ecacSJeremy L Thompson // Translate PetscMemType to CeedMemType 132b730f8bSJeremy L Thompson static inline CeedMemType MemTypeP2C(PetscMemType mem_type) { return PetscMemTypeDevice(mem_type) ? CEED_MEM_DEVICE : CEED_MEM_HOST; } 14