| 1 |
/* |
| 2 |
* Copyright (C) 2021-2022 Intel Corporation |
| 3 |
* |
| 4 |
* SPDX-License-Identifier: MIT |
| 5 |
* |
| 6 |
*/ |
| 7 |
|
| 8 |
#pragma once |
| 9 |
|
| 10 |
#include "wsl_compute_helper_types_tokens.h" |
| 11 |
|
| 12 |
#ifdef _WIN32 |
| 13 |
#define CCONV __cdecl |
| 14 |
static const char *wslComputeHelperLibName = "wsl_compute_helper.dll"; |
| 15 |
#else |
| 16 |
#define CCONV |
| 17 |
[[maybe_unused]] static const char *wslComputeHelperLibName = "libwsl_compute_helper.so"; |
| 18 |
#endif |
| 19 |
|
| 20 |
typedef size_t(CCONV *getSizeRequiredForStructFPT)(TOK structId); |
| 21 |
static const char *const getSizeRequiredForStructName = "getSizeRequiredForStruct"; |
| 22 |
|
| 23 |
typedef bool(CCONV *tokensToStructFPT)(TOK structId, void *dst, size_t dstSizeInBytes, const TokenHeader *begin, const TokenHeader *end); |
| 24 |
static const char *const tokensToStructName = "tokensToStruct"; |
| 25 |
|
| 26 |
typedef size_t(CCONV *getSizeRequiredForTokensFPT)(TOK structId); |
| 27 |
static const char *const getSizeRequiredForTokensName = "getSizeRequiredForTokens"; |
| 28 |
|
| 29 |
typedef bool(CCONV *structToTokensFPT)(TOK structId, TokenHeader *dst, size_t dstSizeInBytes, const void *src, size_t srcSizeInBytes); |
| 30 |
static const char *const structToTokensName = "structToTokens"; |
| 31 |
|
| 32 |
typedef void(CCONV *destroyStructRepresentationFPT)(TOK structId, void *src, size_t srcSizeInBytes); |
| 33 |
static const char *const destroyStructRepresentationName = "destroyStructRepresentation"; |
| 34 |
|
| 35 |
typedef uint64_t(CCONV *getVersionFPT)(); |
| 36 |
static const char *const getVersionName = "getVersion"; |