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: I9837c42e6bab38a894ece4e0f34b64f81b38fef0
[ROCm/hip commit: 78f9a70578]
This commit is contained in:
@@ -70,12 +70,12 @@ struct pstreams {
|
||||
/// Type used for file descriptors.
|
||||
typedef int fd_type;
|
||||
|
||||
static const pmode pstdin = std::ios_base::out; ///< Write to stdin
|
||||
static const pmode pstdout = std::ios_base::in; ///< Read from stdout
|
||||
static const pmode pstderr = std::ios_base::app; ///< Read from stderr
|
||||
static constexpr pmode pstdin = std::ios_base::out; ///< Write to stdin
|
||||
static constexpr pmode pstdout = std::ios_base::in; ///< Read from stdout
|
||||
static constexpr pmode pstderr = std::ios_base::app; ///< Read from stderr
|
||||
|
||||
/// Create a new process group for the child process.
|
||||
static const pmode newpg = std::ios_base::trunc;
|
||||
static constexpr pmode newpg = std::ios_base::trunc;
|
||||
|
||||
protected:
|
||||
enum { bufsz = 32 }; ///< Size of pstreambuf buffers.
|
||||
|
||||
Reference in New Issue
Block a user