refactor: reorder members to reduce internal padding in structs

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2024-03-25 14:44:36 +00:00
committed by Compute-Runtime-Automation
parent 9b715c3ffc
commit 78a4a92b44
61 changed files with 288 additions and 266 deletions

View File

@@ -316,6 +316,8 @@ class GraphicsAllocation : public IDNode<GraphicsAllocation> {
return bindlessInfo;
}
MOCKABLE_VIRTUAL void updateCompletionDataForAllocationAndFragments(uint64_t newFenceValue, uint32_t contextId);
void setShareableHostMemory(bool shareableHostMemory) { this->shareableHostMemory = shareableHostMemory; }
bool isShareableHostMemory() const { return shareableHostMemory; }
OsHandleStorage fragmentsStorage;
StorageInfo storageInfo = {};
@@ -325,8 +327,8 @@ class GraphicsAllocation : public IDNode<GraphicsAllocation> {
constexpr static TaskCountType objectNotResident = std::numeric_limits<TaskCountType>::max();
constexpr static TaskCountType objectNotUsed = std::numeric_limits<TaskCountType>::max();
constexpr static TaskCountType objectAlwaysResident = std::numeric_limits<TaskCountType>::max() - 1;
std::atomic<uint32_t> hostPtrTaskCountAssignment{0};
bool isShareableHostMemory = false;
protected:
struct UsageInfo {
@@ -388,8 +390,9 @@ class GraphicsAllocation : public IDNode<GraphicsAllocation> {
AllocationType allocationType = AllocationType::unknown;
StackVec<UsageInfo, 32> usageInfos;
std::atomic<uint32_t> registeredContextsNum{0};
StackVec<Gmm *, EngineLimits::maxHandleCount> gmms;
ResidencyData residency;
std::atomic<uint32_t> registeredContextsNum{0};
bool shareableHostMemory = false;
};
} // namespace NEO