mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-25 13:33:02 +08:00
Change KB, MB, GB to constexpr values
Change-Id: I6f726b142f945d22d6ea12289600c397da19cbb0 Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
1f8fdf4fc0
commit
14eb8eae3f
@@ -14,10 +14,6 @@
|
||||
#include <cstdlib>
|
||||
#include <stdio.h>
|
||||
|
||||
#define KB 1024uLL
|
||||
#define MB (KB * KB)
|
||||
#define GB (KB * MB)
|
||||
|
||||
namespace Math {
|
||||
|
||||
constexpr uint32_t nextPowerOfTwo(uint32_t value) {
|
||||
|
||||
@@ -51,6 +51,10 @@ constexpr uint64_t maxSvmAddress = is64bit ? maxNBitValue(47) : maxNBitValue(32)
|
||||
|
||||
} // namespace MemoryConstants
|
||||
|
||||
constexpr uint64_t KB = MemoryConstants::kiloByte;
|
||||
constexpr uint64_t MB = MemoryConstants::megaByte;
|
||||
constexpr uint64_t GB = MemoryConstants::gigaByte;
|
||||
|
||||
namespace BlitterConstants {
|
||||
constexpr uint64_t maxBlitWidth = 0x7FC0; // 0x7FFF aligned to cacheline size
|
||||
constexpr uint64_t maxBlitHeight = 0x3FC0; // 0x4000 aligned to cacheline size
|
||||
|
||||
Reference in New Issue
Block a user