2018-09-26 15:28:11 +02:00
|
|
|
/*
|
2019-01-01 21:14:17 +01:00
|
|
|
* Copyright (C) 2018-2019 Intel Corporation
|
2018-09-26 15:28:11 +02:00
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
#include "runtime/command_stream/aub_stream_provider.h"
|
2018-10-02 10:37:17 +02:00
|
|
|
#include "runtime/memory_manager/address_mapper.h"
|
2018-09-26 15:28:11 +02:00
|
|
|
#include "runtime/memory_manager/physical_address_allocator.h"
|
2018-10-30 18:29:32 +01:00
|
|
|
#include "third_party/aub_stream/headers/aub_manager.h"
|
|
|
|
|
|
2018-09-26 15:28:11 +02:00
|
|
|
namespace OCLRT {
|
2018-11-10 22:25:48 +01:00
|
|
|
struct HardwareInfo;
|
2018-09-26 15:28:11 +02:00
|
|
|
|
|
|
|
|
class AubCenter {
|
|
|
|
|
public:
|
2018-11-25 14:58:12 -08:00
|
|
|
AubCenter(const HardwareInfo *pHwInfo, bool localMemoryEnabled, const std::string &aubFileName);
|
2018-12-10 17:12:32 +01:00
|
|
|
AubCenter();
|
2018-09-26 15:28:11 +02:00
|
|
|
virtual ~AubCenter() = default;
|
|
|
|
|
|
|
|
|
|
void initPhysicalAddressAllocator(PhysicalAddressAllocator *pPhysicalAddressAllocator) {
|
|
|
|
|
physicalAddressAllocator = std::unique_ptr<PhysicalAddressAllocator>(pPhysicalAddressAllocator);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
PhysicalAddressAllocator *getPhysicalAddressAllocator() const {
|
|
|
|
|
return physicalAddressAllocator.get();
|
|
|
|
|
}
|
|
|
|
|
|
2018-10-02 10:37:17 +02:00
|
|
|
AddressMapper *getAddressMapper() const {
|
|
|
|
|
return addressMapper.get();
|
|
|
|
|
}
|
|
|
|
|
|
2018-09-26 15:28:11 +02:00
|
|
|
AubStreamProvider *getStreamProvider() const {
|
|
|
|
|
return streamProvider.get();
|
|
|
|
|
}
|
|
|
|
|
|
2019-01-18 21:44:23 +01:00
|
|
|
aub_stream::AubManager *getAubManager() const {
|
2018-11-26 18:17:57 -08:00
|
|
|
return aubManager.get();
|
|
|
|
|
}
|
|
|
|
|
|
2018-09-26 15:28:11 +02:00
|
|
|
protected:
|
|
|
|
|
std::unique_ptr<PhysicalAddressAllocator> physicalAddressAllocator;
|
2018-10-02 10:37:17 +02:00
|
|
|
std::unique_ptr<AddressMapper> addressMapper;
|
2018-09-26 15:28:11 +02:00
|
|
|
std::unique_ptr<AubStreamProvider> streamProvider;
|
2018-10-30 18:29:32 +01:00
|
|
|
|
2019-01-18 21:44:23 +01:00
|
|
|
std::unique_ptr<aub_stream::AubManager> aubManager;
|
2018-09-26 15:28:11 +02:00
|
|
|
};
|
|
|
|
|
} // namespace OCLRT
|