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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
|
/*
* Copyright (C) 2020-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "level_zero/core/source/context/context.h"
#include "level_zero/core/source/device/device.h"
#include "level_zero/core/source/image/image.h"
#include <level_zero/ze_api.h>
namespace L0 {
ze_result_t ZE_APICALL zeImageGetProperties(
ze_device_handle_t hDevice,
const ze_image_desc_t *desc,
ze_image_properties_t *pImageProperties) {
return L0::Device::fromHandle(hDevice)->imageGetProperties(desc, pImageProperties);
}
ze_result_t ZE_APICALL zeImageCreate(
ze_context_handle_t hContext,
ze_device_handle_t hDevice,
const ze_image_desc_t *desc,
ze_image_handle_t *phImage) {
return L0::Context::fromHandle(hContext)->createImage(hDevice, desc, phImage);
}
ze_result_t ZE_APICALL zeImageDestroy(
ze_image_handle_t hImage) {
return L0::Image::fromHandle(hImage)->destroy();
}
} // namespace L0
extern "C" {
ZE_APIEXPORT ze_result_t ZE_APICALL zeImageGetProperties(
ze_device_handle_t hDevice,
const ze_image_desc_t *desc,
ze_image_properties_t *pImageProperties) {
return L0::zeImageGetProperties(
hDevice,
desc,
pImageProperties);
}
ZE_APIEXPORT ze_result_t ZE_APICALL zeImageCreate(
ze_context_handle_t hContext,
ze_device_handle_t hDevice,
const ze_image_desc_t *desc,
ze_image_handle_t *phImage) {
return L0::zeImageCreate(
hContext,
hDevice,
desc,
phImage);
}
ZE_APIEXPORT ze_result_t ZE_APICALL zeImageDestroy(
ze_image_handle_t hImage) {
return L0::zeImageDestroy(
hImage);
}
}
|