File: residency.h

package info (click to toggle)
intel-compute-runtime 25.35.35096.9-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 79,324 kB
  • sloc: cpp: 926,243; lisp: 3,433; sh: 715; makefile: 162; python: 21
file content (25 lines) | stat: -rw-r--r-- 595 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/*
 * Copyright (C) 2018-2021 Intel Corporation
 *
 * SPDX-License-Identifier: MIT
 *
 */

#pragma once
#include "shared/source/utilities/stackvec.h"

#include <vector>

namespace NEO {

struct ResidencyData {
    ResidencyData(size_t maxOsContextCount) : resident(maxOsContextCount, 0), lastFenceValues(static_cast<size_t>(maxOsContextCount)) {}
    std::vector<bool> resident;

    void updateCompletionData(uint64_t newFenceValue, uint32_t contextId);
    uint64_t getFenceValueForContextId(uint32_t contextId);

  protected:
    StackVec<uint64_t, 32> lastFenceValues;
};
} // namespace NEO