[clang] [llvm] [Offload] Provide a kernel library useable by the offload runtime (PR #104168)
Joseph Huber via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 14 14:45:49 PDT 2024
================
@@ -1533,6 +1533,55 @@ Error GenericDeviceTy::printInfo() {
return Plugin::success();
}
+Expected<GenericKernelTy &>
+GenericDeviceTy::getKernel(llvm::StringRef Name, DeviceImageTy *ImagePtr) {
+
+ GenericKernelTy *&KernelPtr = KernelMap[Name];
+ if (!KernelPtr) {
----------------
jhuber6 wrote:
I think this is similar handling to the `ctor / dtor` kernels. Maybe we could unify that?
https://github.com/llvm/llvm-project/pull/104168
More information about the cfe-commits
mailing list