1 /*
2  * Copyright (C) 2021 Intel Corporation
3  *
4  * SPDX-License-Identifier: MIT
5  *
6  */
7 
8 #pragma once
9 #include <level_zero/zet_api.h>
10 
11 #include <memory>
12 #include <stdint.h>
13 
14 namespace L0 {
15 
16 struct Device;
17 
18 class CacheReservation {
19   public:
20     virtual ~CacheReservation() = default;
21 
22     static std::unique_ptr<CacheReservation> create(Device &device);
23 
24     virtual bool reserveCache(size_t cacheLevel, size_t cacheReservationSize) = 0;
25     virtual bool setCacheAdvice(void *ptr, size_t regionSize, ze_cache_ext_region_t cacheRegion) = 0;
26     virtual size_t getMaxCacheReservationSize() = 0;
27 };
28 
29 } // namespace L0