.. _program_listing_file_include_embers_amdgpu_arch.h: Program Listing for File arch.h =============================== |exhale_lsh| :ref:`Return to documentation for file ` (``include/embers/amdgpu/arch.h``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp /* Copyright © 2020 Advanced Micro Devices, Inc. All rights reserved */ #ifndef _EMBERS_AMDGPU_ARCH_H_ #define _EMBERS_AMDGPU_ARCH_H_ #include #include namespace embers { namespace amdgpu { enum class ArchFamily { INVALID = 0, GFX9 = 1, GFX940Plus = 2, GFX10Plus = 3, GFX11Plus = 4, }; class GFXArch { private: ArchFamily family_; public: __host__ __device__ GFXArch() : family_(ArchFamily::INVALID) {} __host__ __device__ GFXArch(ArchFamily family) : family_(family) {} __host__ __device__ operator std::string() const noexcept { switch (family_) { case ArchFamily::GFX9: return "GFX9"; case ArchFamily::GFX940Plus: return "GFX940Plus"; case ArchFamily::GFX10Plus: return "GFX10Plus"; case ArchFamily::GFX11Plus: return "GFX11Plus"; default: return "INVALID"; } } __host__ __device__ ArchFamily Family() const noexcept { return family_; } }; } // namespace amdgpu } // namespace embers #endif // _EMBERS_AMDGPU_ARCH_H_