mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-19 06:24:51 +08:00
refactor: remove not used function
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
65519b76e0
commit
14c8f1f15d
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2022 Intel Corporation
|
||||
* Copyright (C) 2021-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -63,10 +63,6 @@ struct L3Range {
|
||||
return static_cast<uint32_t>(ret);
|
||||
}
|
||||
|
||||
uint64_t getSizeInBytes() const {
|
||||
return (1ULL << (minAlignmentBitOffset + getMask())); // NOLINT(clang-analyzer-core.UndefinedBinaryOperatorResult)
|
||||
}
|
||||
|
||||
uint64_t getMaskedAddress() const {
|
||||
return getAddress() & (~maxNBitValue(minAlignmentBitOffset + getMask()));
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Intel Corporation
|
||||
* Copyright (C) 2021-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -49,17 +49,17 @@ TEST(L3Range, whenTooBigSizeThenMaskCalculationIsAborted) {
|
||||
EXPECT_THROW(L3Range::getMaskFromSize(l3RangeMax * 2), std::exception);
|
||||
}
|
||||
|
||||
TEST(L3Range, WhenGettingMaskFromSizeThenCorrectSizeIsReturned) {
|
||||
TEST(L3Range, WhenGettingMaskFromSizeThenCorrectMaskIsSet) {
|
||||
L3Range range;
|
||||
|
||||
range.setMask(L3Range::getMaskFromSize(l3RangeMinimumAlignment));
|
||||
EXPECT_EQ(l3RangeMinimumAlignment, range.getSizeInBytes());
|
||||
EXPECT_EQ(0u, range.getMask());
|
||||
|
||||
range.setMask(L3Range::getMaskFromSize(l3RangeMinimumAlignment * 4));
|
||||
EXPECT_EQ(l3RangeMinimumAlignment * 4, range.getSizeInBytes());
|
||||
EXPECT_EQ(2u, range.getMask());
|
||||
|
||||
range.setMask(L3Range::getMaskFromSize(l3RangeMax));
|
||||
EXPECT_EQ(l3RangeMax, range.getSizeInBytes());
|
||||
EXPECT_EQ(32u - L3Range::minAlignmentBitOffset, range.getMask());
|
||||
}
|
||||
|
||||
TEST(L3Range, whenMaskGetsChangedThenReturnsProperlyMaskedAddress) {
|
||||
@@ -154,7 +154,7 @@ TEST(CoverRange, whenNonAlignedThenAbort) {
|
||||
|
||||
L3Range fromAdjacentRange(const L3Range &lhs, uint64_t size) {
|
||||
L3Range ret;
|
||||
ret.setAddress(lhs.getMaskedAddress() + lhs.getSizeInBytes());
|
||||
ret.setAddress(lhs.getMaskedAddress() + maxNBitValue(L3Range::minAlignmentBitOffset + lhs.getMask()) + 1);
|
||||
ret.setMask(L3Range::getMaskFromSize(size));
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user