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