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:
Tao Sang
2020-07-14 20:10:24 -04:00
کامیت شده توسط Tao Sang
والد 2800fc2fa3
کامیت fdef6f722f
62فایلهای تغییر یافته به همراه224 افزوده شده و 227 حذف شده
@@ -30,7 +30,7 @@ namespace gpu {
class ConstBuffer : public Memory {
public:
//! Vector size of the constant buffer
static const size_t VectorSize = 16;
static constexpr size_t VectorSize = 16;
//! Constructor for the ConstBuffer class
ConstBuffer(VirtualGPU& gpu, //!< Virtual GPU device object