Update ggml/src/ggml-backend-impl.h
Some checks are pending
flake8 Lint / Lint (push) Waiting to run

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
This commit is contained in:
Diego Devesa 2024-11-24 19:12:22 +01:00 committed by GitHub
parent ad1e27a0af
commit 402a0e94dc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -211,18 +211,18 @@ extern "C" {
// Add backend dynamic loading support to the backend
#ifdef GGML_BACKEND_DL
#ifdef __cplusplus
# define GGML_BACKEND_DL_IMPL(reg_fn) \
extern "C" { \
GGML_BACKEND_API ggml_backend_reg_t ggml_backend_init(); \
} \
ggml_backend_reg_t ggml_backend_init() { \
return reg_fn(); \
# define GGML_BACKEND_DL_IMPL(reg_fn) \
extern "C" { \
GGML_BACKEND_API ggml_backend_reg_t ggml_backend_init(void); \
} \
ggml_backend_reg_t ggml_backend_init(void) { \
return reg_fn(); \
}
#else
# define GGML_BACKEND_DL_IMPL(reg_fn) \
GGML_BACKEND_API ggml_backend_reg_t ggml_backend_init(); \
ggml_backend_reg_t ggml_backend_init() { \
return reg_fn(); \
# define GGML_BACKEND_DL_IMPL(reg_fn) \
GGML_BACKEND_API ggml_backend_reg_t ggml_backend_init(void); \
ggml_backend_reg_t ggml_backend_init(void) { \
return reg_fn(); \
}
#endif
#else