[llvm] [offload] Add olLaunchKernelWithPtrArgs with an argument pointer array (PR #194333)

Piotr Balcer via llvm-commits llvm-commits at lists.llvm.org
Mon May 4 07:23:30 PDT 2026


pbalcer wrote:

I updated the code in the PR to replace the existing olLaunchKernel API to accept array of arguments:
```
struct Foo {
  int a;
  int b;
};

void *Mem = ...;

uint32_t N = 1;
Foo F{2, 3};
uint32_t *Out = (uint32_t *)Mem;

void *ArgPtrs[] = {&N, &F, &Out};
size_t ArgSizes[] = {sizeof(N), sizeof(F), sizeof(Out)};

olLaunchKernel(Queue, Device, Kernel, &LaunchArgs, ArgPtrs, ArgSizes);
```

https://github.com/llvm/llvm-project/pull/194333


More information about the llvm-commits mailing list