mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-29 17:13:29 +08:00
This commit moves address mapper from CSR to execution environment in order to generate unique GTT VA for LRCA, HWSP and ring buffer between different CSRs. Additionally, moved the rest of AUB file stream tests to separate module. Change-Id: I02ae44202c0255277a7ac17532485419e0c403ab
45 lines
1.2 KiB
C++
45 lines
1.2 KiB
C++
/*
|
|
* Copyright (C) 2018 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#pragma once
|
|
#include "runtime/command_stream/aub_stream_provider.h"
|
|
#include "runtime/memory_manager/address_mapper.h"
|
|
#include "runtime/memory_manager/physical_address_allocator.h"
|
|
|
|
namespace OCLRT {
|
|
|
|
class AubCenter {
|
|
public:
|
|
AubCenter() {
|
|
addressMapper = std::make_unique<AddressMapper>();
|
|
streamProvider = std::make_unique<AubFileStreamProvider>();
|
|
}
|
|
virtual ~AubCenter() = default;
|
|
|
|
void initPhysicalAddressAllocator(PhysicalAddressAllocator *pPhysicalAddressAllocator) {
|
|
physicalAddressAllocator = std::unique_ptr<PhysicalAddressAllocator>(pPhysicalAddressAllocator);
|
|
}
|
|
|
|
PhysicalAddressAllocator *getPhysicalAddressAllocator() const {
|
|
return physicalAddressAllocator.get();
|
|
}
|
|
|
|
AddressMapper *getAddressMapper() const {
|
|
return addressMapper.get();
|
|
}
|
|
|
|
AubStreamProvider *getStreamProvider() const {
|
|
return streamProvider.get();
|
|
}
|
|
|
|
protected:
|
|
std::unique_ptr<PhysicalAddressAllocator> physicalAddressAllocator;
|
|
std::unique_ptr<AddressMapper> addressMapper;
|
|
std::unique_ptr<AubStreamProvider> streamProvider;
|
|
};
|
|
} // namespace OCLRT
|