mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +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
@ -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 {
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "shared/source/helpers/basic_math.h"
|
||||
#include "shared/source/helpers/constants.h"
|
||||
|
||||
#include <mutex>
|
||||
|
||||
|
@ -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"
|
||||
|
Reference in New Issue
Block a user