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:
@@ -74,10 +74,10 @@ class Monitor : public HeapObject {
|
||||
typedef details::SimplyLinkedNode<Semaphore*, StackObject> LinkedNode;
|
||||
|
||||
private:
|
||||
static const intptr_t kLockBit = 0x1;
|
||||
static constexpr intptr_t kLockBit = 0x1;
|
||||
|
||||
static const int kMaxSpinIter = 55; //!< Total number of spin iterations.
|
||||
static const int kMaxReadSpinIter = 50; //!< Read iterations before yielding
|
||||
static constexpr int kMaxSpinIter = 55; //!< Total number of spin iterations.
|
||||
static constexpr int kMaxReadSpinIter = 50; //!< Read iterations before yielding
|
||||
|
||||
/*! Linked list of semaphores the contending threads are waiting on
|
||||
* and main lock.
|
||||
|
||||
Reference in New Issue
Block a user