refactor: correct variable namings

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2023-11-23 17:09:04 +00:00
committed by Compute-Runtime-Automation
parent 9e3a8bdf1b
commit 36194c4e7d
126 changed files with 872 additions and 894 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2022 Intel Corporation
* Copyright (C) 2021-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -11,17 +11,17 @@
namespace NEO {
namespace AppResourceDefines {
template <typename TMemberSource, typename = int>
static constexpr bool has_ResourceTag = false;
static constexpr bool hasResourceTag = false;
#if defined(_DEBUG) || (_RELEASE_INTERNAL)
template <typename TMemberSource>
static constexpr bool has_ResourceTag<TMemberSource, decltype((void)TMemberSource::ResourceTag, int{})> = true;
static constexpr bool hasResourceTag<TMemberSource, decltype((void)TMemberSource::ResourceTag, int{})> = true;
constexpr bool resourceTagSupport = true;
#else
constexpr bool resourceTagSupport = false;
template <typename TMemberSource>
static constexpr bool has_ResourceTag<TMemberSource, decltype((void)TMemberSource::ResourceTag, int{})> = false;
static constexpr bool hasResourceTag<TMemberSource, decltype((void)TMemberSource::ResourceTag, int{})> = false;
#endif
constexpr uint32_t maxStrLen = 8u;

View File

@@ -93,11 +93,8 @@ union FloatConversion {
float f;
};
// clang-format off
static const FloatConversion PosInfinity = {0x7f800000};
static const FloatConversion NegInfinity = {0xff800000};
static const FloatConversion Nan = {0x7fc00000};
// clang-format on
static const FloatConversion posInfinity = {0x7f800000};
static const FloatConversion negInfinity = {0xff800000};
inline uint16_t float2Half(float f) {
FloatConversion u;
@@ -106,7 +103,7 @@ inline uint16_t float2Half(float f) {
uint32_t fsign = (u.u >> 16) & 0x8000;
float x = std::fabs(f);
// Nan
// nan
if (x != x) {
u.u >>= (24 - 11);
u.u &= 0x7fff;
@@ -116,7 +113,7 @@ inline uint16_t float2Half(float f) {
// overflow
if (x >= std::ldexp(1.0f, 16)) {
if (x == PosInfinity.f)
if (x == posInfinity.f)
return 0x7c00 | fsign;
return 0x7bff | fsign;

View File

@@ -52,7 +52,7 @@ inline constexpr uint64_t max36BitAddress = (maxNBitValue(36));
inline constexpr uint64_t max48BitAddress = maxNBitValue(48);
inline constexpr uintptr_t page4kEntryMask = std::numeric_limits<uintptr_t>::max() & ~MemoryConstants::pageMask;
inline constexpr uintptr_t page64kEntryMask = std::numeric_limits<uintptr_t>::max() & ~MemoryConstants::page64kMask;
inline constexpr int GfxAddressBits = is64bit ? 48 : 32;
inline constexpr int gfxAddressBits = is64bit ? 48 : 32;
inline constexpr uint64_t maxSvmAddress = is64bit ? maxNBitValue(47) : maxNBitValue(32);
inline constexpr size_t chunkThreshold = MemoryConstants::pageSize64k;

View File

@@ -7,7 +7,6 @@
#pragma once
#include "shared/source/built_ins/sip_kernel_type.h"
#include "shared/source/commands/bxml_generator_glue.h"
#include "shared/source/helpers/definitions/engine_group_types.h"
#include "shared/source/helpers/engine_node_helper.h"
#include "shared/source/helpers/options.h"
@@ -450,13 +449,4 @@ struct MemorySynchronizationCommands {
static void setBarrierExtraProperties(void *barrierCmd, PipeControlArgs &args);
};
union SURFACE_STATE_BUFFER_LENGTH {
uint32_t length;
struct SurfaceState {
uint32_t width : BITFIELD_RANGE(0, 6);
uint32_t height : BITFIELD_RANGE(7, 20);
uint32_t depth : BITFIELD_RANGE(21, 31);
} surfaceState;
};
} // namespace NEO

View File

@@ -106,7 +106,7 @@ void GfxCoreHelperHw<Family>::setRenderSurfaceStateForScratchResource(const Root
RENDER_SURFACE_STATE state = Family::cmdInitRenderSurfaceState;
auto surfaceSize = alignUp(bufferSize, 4);
SURFACE_STATE_BUFFER_LENGTH length = {0};
SurfaceStateBufferLength length = {0};
length.length = static_cast<uint32_t>(surfaceSize - 1);
state.setWidth(length.surfaceState.width + 1);

View File

@@ -52,7 +52,7 @@ static const uint32_t primeNumbers[] = {
19, 17, 13, 11,
7, 5, 3, 2};
static const size_t MAX_PRIMES = sizeof(primeNumbers) / sizeof(primeNumbers[0]);
static const size_t maxPrimes = sizeof(primeNumbers) / sizeof(primeNumbers[0]);
// Recursive template function to test prime factors
template <uint32_t primeIndex>
@@ -220,7 +220,7 @@ void computeWorkgroupSize1D(uint32_t maxWorkGroupSize, size_t workGroupSize[3],
workSize = std::min(workSize, maxWorkGroupSize);
// Try all primes as potential factors
workSize = factor<MAX_PRIMES - 1>(items, workSize, maxWorkGroupSize);
workSize = factor<maxPrimes - 1>(items, workSize, maxWorkGroupSize);
workGroupSize[0] = workSize;
workGroupSize[1] = 1;