text: //////////////////////////////////////////////////////////////////////////////
  // Copyright (c) 2016-22, Lawrence Livermore National Security, LLC and Umpire
  // project contributors. See the COPYRIGHT file for details.
  //
  // SPDX-License-Identifier: (MIT)
  //////////////////////////////////////////////////////////////////////////////
  #ifndef UMPIRE_HipUnifiedMemoryResourceFactory_HPP
  #define UMPIRE_HipUnifiedMemoryResourceFactory_HPP
  
  #include "umpire/resource/MemoryResourceFactory.hpp"
  
  namespace umpire {
  namespace resource {
  
  /*!
   * \brief Factory class to construct a MemoryResource that uses AMD
   * "unified" memory, accesible from both the CPU and AMD GPUs.
   */
  class HipUnifiedMemoryResourceFactory : public MemoryResourceFactory {
    bool isValidMemoryResourceFor(const std::string& name) noexcept final override;
  
    std::unique_ptr<resource::MemoryResource> create(const std::string& name, int id) final override;
  
    std::unique_ptr<resource::MemoryResource> create(const std::string& name, int id,
                                                     MemoryResourceTraits traits) final override;
  
    MemoryResourceTraits getDefaultTraits() final override;
  };
  
  } // end of namespace resource
  } // end of namespace umpire
  
  #endif // UMPIRE_HipUnifiedMemoryResourceFactory_HPP
  