@@ -135,15 +135,15 @@ class ProgramManager {
135135 static ProgramManager &getInstance ();
136136
137137 RTDeviceBinaryImage &getDeviceImage (KernelNameStrRefT KernelName,
138- const ContextImplPtr &ContextImpl,
138+ context_impl &ContextImpl,
139139 const device_impl *DeviceImpl);
140140
141141 RTDeviceBinaryImage &getDeviceImage (
142142 const std::unordered_set<RTDeviceBinaryImage *> &ImagesToVerify,
143- const ContextImplPtr &ContextImpl, const device_impl *DeviceImpl);
143+ context_impl &ContextImpl, const device_impl *DeviceImpl);
144144
145145 ur_program_handle_t createURProgram (const RTDeviceBinaryImage &Img,
146- const ContextImplPtr &ContextImpl,
146+ context_impl &ContextImpl,
147147 const std::vector<device> &Devices);
148148 // / Creates a UR program using either a cached device code binary if present
149149 // / in the persistent cache or from the supplied device image otherwise.
@@ -167,7 +167,7 @@ class ProgramManager {
167167 std::pair<ur_program_handle_t , bool > getOrCreateURProgram (
168168 const RTDeviceBinaryImage &Img,
169169 const std::vector<const RTDeviceBinaryImage *> &AllImages,
170- const ContextImplPtr &ContextImpl, const std::vector<device> &Devices,
170+ context_impl &ContextImpl, const std::vector<device> &Devices,
171171 const std::string &CompileAndLinkOptions, SerializedObj SpecConsts);
172172 // / Builds or retrieves from cache a program defining the kernel with given
173173 // / name.
@@ -176,7 +176,7 @@ class ProgramManager {
176176 // / \param Context the context to build the program with
177177 // / \param Device the device for which the program is built
178178 // / \param KernelName the kernel's name
179- ur_program_handle_t getBuiltURProgram (const ContextImplPtr &ContextImpl,
179+ ur_program_handle_t getBuiltURProgram (context_impl &ContextImpl,
180180 device_impl &DeviceImpl,
181181 KernelNameStrRefT KernelName,
182182 const NDRDescT &NDRDesc = {});
@@ -193,13 +193,12 @@ class ProgramManager {
193193 // / the program should be built with.
194194 ur_program_handle_t
195195 getBuiltURProgram (const BinImgWithDeps &ImgWithDeps,
196- const ContextImplPtr &ContextImpl,
197- const std::vector<device> &Devs,
196+ context_impl &ContextImpl, const std::vector<device> &Devs,
198197 const DevImgPlainWithDeps *DevImgWithDeps = nullptr ,
199198 const SerializedObj &SpecConsts = {});
200199
201200 FastKernelCacheValPtr
202- getOrCreateKernel (const ContextImplPtr &ContextImpl, device_impl &DeviceImpl,
201+ getOrCreateKernel (context_impl &ContextImpl, device_impl &DeviceImpl,
203202 KernelNameStrRefT KernelName,
204203 KernelNameBasedCacheT *KernelNameBasedCachePtr,
205204 const NDRDescT &NDRDesc = {});
@@ -214,7 +213,7 @@ class ProgramManager {
214213 const std::vector<unsigned char > &SpecializationConsts);
215214
216215 ur_program_handle_t getUrProgramFromUrKernel (ur_kernel_handle_t Kernel,
217- const ContextImplPtr &Context);
216+ context_impl &Context);
218217
219218 void addImage (sycl_device_binary RawImg, bool RegisterImgExports = true ,
220219 RTDeviceBinaryImage **OutImage = nullptr ,
@@ -223,7 +222,7 @@ class ProgramManager {
223222 void removeImages (sycl_device_binaries DeviceImages);
224223 void debugPrintBinaryImages () const ;
225224 static std::string getProgramBuildLog (const ur_program_handle_t &Program,
226- const ContextImplPtr &Context);
225+ context_impl &Context);
227226
228227 uint32_t getDeviceLibReqMask (const RTDeviceBinaryImage &Img);
229228
@@ -394,7 +393,7 @@ class ProgramManager {
394393
395394 using ProgramPtr = std::unique_ptr<std::remove_pointer_t <ur_program_handle_t >,
396395 decltype (&::urProgramRelease)>;
397- ProgramPtr build (ProgramPtr Program, const ContextImplPtr &Context,
396+ ProgramPtr build (ProgramPtr Program, context_impl &Context,
398397 const std::string &CompileOptions,
399398 const std::string &LinkOptions,
400399 std::vector<ur_device_handle_t > &Devices,
0 commit comments