[libc-commits] [PATCH] D156731: [libc] Add basic wrappers for the backend address spaces
Joseph Huber via Phabricator via libc-commits
libc-commits at lists.llvm.org
Mon Jul 31 12:52:19 PDT 2023
jhuber6 added inline comments.
================
Comment at: libc/src/__support/GPU/amdgpu/utils.h:25-28
+template <typename T> using Private = [[clang::address_space(5)]] T;
+template <typename T> using Constant = [[clang::address_space(4)]] T;
+template <typename T> using Shared = [[clang::address_space(3)]] T;
+template <typename T> using Global = [[clang::address_space(1)]] T;
----------------
arsenm wrote:
> I don't really condone using the numbered address spaces to access these, they don't quite work the same way
They directly map LLVM ones to the ones documented in the backend. Since this is regular C++ we don't have any other option.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156731/new/
https://reviews.llvm.org/D156731
More information about the libc-commits
mailing list