[libc-commits] [PATCH] D146681: [libc] Add a loader utility for NVPTX architectures for testing
Joseph Huber via Phabricator via libc-commits
libc-commits at lists.llvm.org
Thu Mar 23 10:02:55 PDT 2023
jhuber6 added inline comments.
================
Comment at: libc/utils/gpu/loader/Loader.h:43-54
+ void *dev_envp = alloc(envc * sizeof(char *));
+
+ for (int i = 0; i < envc; ++i) {
+ size_t size = strlen(envp[i]) + 1;
+ void *dev_str = alloc(size);
+ // Load the host memory buffer with the pointer values of the newly
+ // allocated strings.
----------------
jdoerfert wrote:
> probably with a different fn name, but isn't this the same?
Good point, same code after getting the size.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146681/new/
https://reviews.llvm.org/D146681
More information about the libc-commits
mailing list