Change KB, MB, GB to constexpr values

Change-Id: I6f726b142f945d22d6ea12289600c397da19cbb0
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
Filip Hazubski
2020-04-28 15:23:04 +02:00
committed by sys_ocldev
parent 1f8fdf4fc0
commit 14eb8eae3f
6 changed files with 8 additions and 7 deletions

View File

@ -7,7 +7,7 @@
#include "shared/source/os_interface/linux/allocator_helper.h"
#include "shared/source/helpers/basic_math.h"
#include "shared/source/helpers/constants.h"
namespace NEO {

View File

@ -5,7 +5,7 @@
*
*/
#include "shared/source/helpers/basic_math.h"
#include "shared/source/helpers/constants.h"
#include "shared/source/os_interface/linux/allocator_helper.h"
#include "gtest/gtest.h"

View File

@ -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) {

View File

@ -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

View File

@ -7,7 +7,7 @@
#pragma once
#include "shared/source/helpers/basic_math.h"
#include "shared/source/helpers/constants.h"
#include <mutex>

View File

@ -6,6 +6,7 @@
*/
#include "shared/source/helpers/basic_math.h"
#include "shared/source/helpers/constants.h"
#include "shared/source/helpers/kernel_helpers.h"
#include "test.h"