File tree 4 files changed +9
-6
lines changed
4 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ ur_result_t mock_urPlatformGetInfo(void *pParams) {
29
29
}
30
30
31
31
if (*params.ppropName == UR_PLATFORM_INFO_NAME) {
32
- const char mock_platform_name[] = " UR_PLATFORM_MOCK " ;
32
+ const char mock_platform_name[] = " Mock Platform " ;
33
33
if (*params.ppPropSizeRet ) {
34
34
**params.ppPropSizeRet = sizeof (mock_platform_name);
35
35
}
Original file line number Diff line number Diff line change @@ -19,14 +19,18 @@ void LibLoader::freeAdapterLibrary(HMODULE handle) {
19
19
logger::error (
20
20
" Failed to unload the library with the handle at address {}" ,
21
21
handle);
22
+ } else {
23
+ logger::info (" unloaded adapter 0x{}" , handle);
22
24
}
23
25
}
24
26
}
25
27
26
28
std::unique_ptr<HMODULE, LibLoader::lib_dtor>
27
29
LibLoader::loadAdapterLibrary (const char *name) {
28
- return std::unique_ptr<HMODULE, LibLoader::lib_dtor>(
30
+ auto handle = std::unique_ptr<HMODULE, LibLoader::lib_dtor>(
29
31
LoadLibraryExA (name, nullptr , 0 ));
32
+ logger::info (" loaded adapter 0x{} ({})" , handle, name);
33
+ return handle;
30
34
}
31
35
32
36
void *LibLoader::getFunctionPtr (HMODULE handle, const char *func_name) {
Original file line number Diff line number Diff line change @@ -188,10 +188,9 @@ class AdapterRegistry {
188
188
adaptersLoadPaths.clear ();
189
189
190
190
std::vector<fs::path> loadPaths;
191
- auto adapterNamePathOpt = getAdapterNameAsPath ( mockAdapterName) ;
191
+ auto adapterNamePath = fs::path{ mockAdapterName} ;
192
192
auto loaderLibPathOpt = getLoaderLibPath ();
193
- if (adapterNamePathOpt.has_value () && loaderLibPathOpt.has_value ()) {
194
- const auto &adapterNamePath = adapterNamePathOpt.value ();
193
+ if (loaderLibPathOpt.has_value ()) {
195
194
const auto &loaderLibPath = loaderLibPathOpt.value ();
196
195
loadPaths.emplace_back (loaderLibPath / adapterNamePath);
197
196
}
Original file line number Diff line number Diff line change 1
1
<TEST>[INFO]: urLoaderInit succeeded.
2
2
<TEST>[INFO]: urPlatformGet found 1 platforms
3
- <TEST>[INFO]: Found UR_PLATFORM_MOCK
3
+ <TEST>[INFO]: Found Mock Platform
You can’t perform that action at this time.
0 commit comments