Apply constexpr on global constant varaibles
When HIP_ENABLE_DEFERRED_LOADING=0, many global variables will be referenced but they are not initialized in that early time. The patch will use constexpr to initialze global constant varables in compile time. Change-Id: I9d538b7abc6a0ce700ec3332b97fc144db5fc1ef
This commit is contained in:
@@ -31,7 +31,7 @@ bool Comgr::is_ready_ = false;
|
||||
bool Comgr::LoadLib() {
|
||||
#if defined(COMGR_DYN_DLL)
|
||||
ClPrint(amd::LOG_INFO, amd::LOG_CODE, "Loading COMGR library.");
|
||||
static const char* ComgrLibName =
|
||||
static constexpr const char* ComgrLibName =
|
||||
LP64_SWITCH(WINDOWS_SWITCH("amd_comgr32.dll", "libamd_comgr32.so.1"),
|
||||
WINDOWS_SWITCH("amd_comgr.dll", "libamd_comgr.so.1"));
|
||||
cep_.handle = Os::loadLibrary(ComgrLibName);
|
||||
|
||||
Reference in New Issue
Block a user