2020-02-13 21:03:54 +08:00
|
|
|
/*
|
2023-01-16 23:30:27 +08:00
|
|
|
* Copyright (C) 2020-2023 Intel Corporation
|
2020-02-13 21:03:54 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
2020-02-24 05:44:01 +08:00
|
|
|
#include "shared/source/helpers/get_info_status.h"
|
2020-02-13 21:03:54 +08:00
|
|
|
|
|
|
|
#include <CL/cl.h>
|
|
|
|
|
|
|
|
static inline cl_int changeGetInfoStatusToCLResultType(GetInfoStatus status) {
|
|
|
|
switch (status) {
|
2023-12-13 17:17:24 +08:00
|
|
|
case GetInfoStatus::success:
|
2020-02-13 21:03:54 +08:00
|
|
|
return CL_SUCCESS;
|
|
|
|
|
2023-12-13 17:17:24 +08:00
|
|
|
case GetInfoStatus::invalidContext:
|
2020-02-13 21:03:54 +08:00
|
|
|
return CL_INVALID_CONTEXT;
|
|
|
|
|
2023-12-13 17:17:24 +08:00
|
|
|
case GetInfoStatus::invalidValue:
|
2020-02-13 21:03:54 +08:00
|
|
|
return CL_INVALID_VALUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
return CL_INVALID_VALUE;
|
|
|
|
}
|