Files
compute-runtime/level_zero/api/core/ze_residency.cpp
Jaime Arteaga d96e462754 Reorganize Level Zero Core API files
Change-Id: I95750b90748dd65310fa72b030ea3ab2f72d3f24
Signed-off: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
2020-03-25 11:21:43 +01:00

44 lines
989 B
C++

/*
* Copyright (C) 2019-2020 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "level_zero/core/source/device/device.h"
#include <level_zero/ze_api.h>
extern "C" {
__zedllexport ze_result_t __zecall
zeDeviceMakeMemoryResident(
ze_device_handle_t hDevice,
void *ptr,
size_t size) {
return L0::Device::fromHandle(hDevice)->makeMemoryResident(ptr, size);
}
__zedllexport ze_result_t __zecall
zeDeviceEvictMemory(
ze_device_handle_t hDevice,
void *ptr,
size_t size) {
return L0::Device::fromHandle(hDevice)->evictMemory(ptr, size);
}
__zedllexport ze_result_t __zecall
zeDeviceMakeImageResident(
ze_device_handle_t hDevice,
ze_image_handle_t hImage) {
return L0::Device::fromHandle(hDevice)->makeImageResident(hImage);
}
__zedllexport ze_result_t __zecall
zeDeviceEvictImage(
ze_device_handle_t hDevice,
ze_image_handle_t hImage) {
return L0::Device::fromHandle(hDevice)->evictImage(hImage);
}
} // extern "C"