Skip to content

Commit a9e26cc

Browse files
author
Hugh Delaney
committed
Fix bug
1 parent 601bc7d commit a9e26cc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

sycl/source/detail/pi.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ static void initializePlugins(std::vector<plugin> &Plugins) {
388388
std::cerr << "SYCL_PI_TRACE[all]: "
389389
<< "No Plugins Found." << std::endl;
390390

391-
for (unsigned int I = 0; I < PluginNames.size(); I++) {
391+
for (unsigned int I = 0u, PluginIdx = 0u; I < PluginNames.size(); I++) {
392392
std::shared_ptr<PiPlugin> PluginInformation = std::make_shared<PiPlugin>(
393393
PiPlugin{_PI_H_VERSION_STRING, _PI_H_VERSION_STRING,
394394
/*Targets=*/nullptr, /*FunctionPointers=*/{}});
@@ -452,7 +452,8 @@ static void initializePlugins(std::vector<plugin> &Plugins) {
452452
std::cerr << "SYCL_PI_TRACE[basic]: "
453453
<< "Plugin found and successfully loaded: "
454454
<< PluginNames[I].first << " [ PluginVersion: "
455-
<< Plugins[I].getPiPlugin().PluginVersion << "]" << std::endl;
455+
<< Plugins[PluginIdx++].getPiPlugin().PluginVersion << " ]"
456+
<< std::endl;
456457
}
457458

458459
#ifdef XPTI_ENABLE_INSTRUMENTATION

0 commit comments

Comments
 (0)