2018-09-05 21:17:52 +08:00
|
|
|
/*
|
2019-01-10 20:57:40 +08:00
|
|
|
* Copyright (C) 2017-2019 Intel Corporation
|
2018-09-18 15:11:08 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
*/
|
2018-09-05 21:17:52 +08:00
|
|
|
|
|
|
|
#pragma once
|
2019-02-27 18:39:32 +08:00
|
|
|
#include "engine_node.h"
|
|
|
|
|
2018-09-05 21:17:52 +08:00
|
|
|
#include <cinttypes>
|
2018-09-07 13:18:38 +08:00
|
|
|
#include <vector>
|
2018-09-05 21:17:52 +08:00
|
|
|
namespace OCLRT {
|
2018-09-07 13:18:38 +08:00
|
|
|
|
2018-09-05 21:17:52 +08:00
|
|
|
struct ResidencyData {
|
2018-11-28 18:01:41 +08:00
|
|
|
ResidencyData() {
|
|
|
|
std::fill_n(resident, sizeof(resident), false);
|
|
|
|
}
|
|
|
|
|
2018-09-06 17:17:26 +08:00
|
|
|
~ResidencyData() = default;
|
2018-11-28 18:01:41 +08:00
|
|
|
bool resident[maxOsContextCount];
|
2018-09-07 13:18:38 +08:00
|
|
|
|
2018-10-22 22:43:20 +08:00
|
|
|
void updateCompletionData(uint64_t newFenceValue, uint32_t contextId);
|
2018-09-07 13:18:38 +08:00
|
|
|
uint64_t getFenceValueForContextId(uint32_t contextId);
|
|
|
|
|
|
|
|
protected:
|
2018-10-22 22:43:20 +08:00
|
|
|
std::vector<uint64_t> lastFenceValues;
|
2018-09-05 21:17:52 +08:00
|
|
|
};
|
|
|
|
} // namespace OCLRT
|