/*
 * Copyright (C) 2024-2026 Intel Corporation
 *
 * SPDX-License-Identifier: MIT
 *
 */

#include <loader/ze_loader.h>
#include <string>
#include <ze_api.h>

#pragma once

namespace L0 {
void *getLoaderHandle();
std::string getLoaderVersion();

ze_result_t translateHandle(zel_handle_type_t type, void *handler, void **pHandler);

template <class T>
static inline ze_result_t translateHandle(zel_handle_type_t type, T handler, T *pHandler) {
    return translateHandle(type, handler, reinterpret_cast<void **>(pHandler));
}

template <class T>
static inline ze_result_t translateHandle(zel_handle_type_t type, T &handler) {
    return translateHandle(type, handler, &handler);
}
} // namespace L0
