Skip to content

Commit dca67ad

Browse files
author
Artem Gindinson
committed
[SYCL][NFC] Make the RT::PiPlugin object private
Signed-off-by: Artem Gindinson <artem.gindinson@intel.com>
1 parent d596593 commit dca67ad

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

sycl/source/detail/plugin.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ class plugin {
2929

3030
~plugin() = default;
3131

32+
const RT::PiPlugin &getPiPlugin() const { return MPlugin; }
33+
3234
/// Checks return value from PI calls.
3335
///
3436
/// \throw Exception if pi_result is not a PI_SUCCESS.
@@ -71,11 +73,9 @@ class plugin {
7173
RT::PiResult Err = call_nocheck<PiApiOffset>(Args...);
7274
checkPiResult(Err);
7375
}
74-
// TODO: Make this private. Currently used in program_manager to create a
75-
// pointer to PiProgram.
76-
RT::PiPlugin MPlugin;
7776

7877
private:
78+
RT::PiPlugin MPlugin;
7979
bool MPiEnableTrace;
8080

8181
}; // class plugin

sycl/source/detail/program_manager/program_manager.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,8 +367,8 @@ ProgramManager::getBuiltPIProgram(OSModuleHandle M, const context &Context,
367367
ContextImplPtr ContextImpl = getSyclObjImpl(Context);
368368
const detail::plugin &Plugin = ContextImpl->getPlugin();
369369
RT::PiProgram Prg = createPIProgram(Img, Context);
370-
ProgramPtr ProgramManaged(Prg,
371-
Plugin.MPlugin.PiFunctionTable.piProgramRelease);
370+
ProgramPtr ProgramManaged(
371+
Prg, Plugin.getPiPlugin().PiFunctionTable.piProgramRelease);
372372

373373
// Link a fallback implementation of device libraries if they are not
374374
// supported by a device compiler.

0 commit comments

Comments
 (0)