//===---------------- AMDGPUAddrSpace.h -------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // /// \file /// AMDGPU address space definition /// // //===----------------------------------------------------------------------===// #ifndef LLVM_SUPPORT_AMDGPUADDRSPACE_H #define LLVM_SUPPORT_AMDGPUADDRSPACE_H namespace llvm { /// OpenCL uses address spaces to differentiate between /// various memory regions on the hardware. On the CPU /// all of the address spaces point to the same memory, /// however on the GPU, each address space points to /// a separate piece of memory that is unique from other /// memory locations. namespace AMDGPUAS { enum : unsigned { … }; } // end namespace AMDGPUAS namespace AMDGPU { inline bool isFlatGlobalAddrSpace(unsigned AS) { … } inline bool isExtendedGlobalAddrSpace(unsigned AS) { … } } // end namespace AMDGPU } // end namespace llvm #endif // LLVM_SUPPORT_AMDGPUADDRSPACE_H