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
Esse commit está contido em:
Tao Sang authored and Tao Sang committed 2020-07-22 22:14:13 -04:00
1 pai 2800fc2fa3
commit fdef6f722f
62 files changed
+224 -227

No files matched your search

+6 -6
Ver Arquivo
@@ -89,13 +89,13 @@ const pointer badPointer = (pointer)(intptr_t)_BAD_INTPTR;
const address badAddress = (address)(intptr_t)_BAD_INTPTR;
//! \endcond
const size_t Ki = 1024;
const size_t Mi = Ki * Ki;
const size_t Gi = Ki * Ki * Ki;
constexpr size_t Ki = 1024;
constexpr size_t Mi = Ki * Ki;
constexpr size_t Gi = Ki * Ki * Ki;
const size_t K = 1000;
const size_t M = K * K;
const size_t G = K * K * K;
constexpr size_t K = 1000;
constexpr size_t M = K * K;
constexpr size_t G = K * K * K;
#include "utils/debug.hpp"