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