1
0
Fork 0
mirror of https://gitlab.com/niansa/libjustlm.git synced 2025-03-06 20:49:17 +01:00

Fixed compilation error with exceptions enabled

This commit is contained in:
niansa 2023-05-09 22:23:34 +02:00
parent 5e666d83db
commit a43c5e64ce
2 changed files with 10 additions and 0 deletions

View file

@ -91,7 +91,12 @@ class GPTJInference final : public Inference {
state->tokens.resize(params.n_ctx_window_top_bar);
}
// Evaluate tokens
# ifdef LM_NOEXCEPT
LM_CORETURN LM_COAWAIT evaluate_tokens(0, on_scroll);
# else
LM_COAWAIT evaluate_tokens(0, on_scroll);
LM_CORETURN true;
# endif
}
LM_SCHEDULABLE(LM_ERRBOOL) evaluate_tokens(size_t starting_offset, const std::function<bool (float)> &on_tick = nullptr) LM_NOEXCEPTDECL {

View file

@ -69,7 +69,12 @@ class LLaMaInference final : public Inference {
state->tokens.resize(params.n_ctx_window_top_bar);
}
// Evaluate tokens
# ifdef LM_NOEXCEPT
LM_CORETURN LM_COAWAIT evaluate_tokens(0, on_scroll);
# else
LM_COAWAIT evaluate_tokens(0, on_scroll);
LM_CORETURN true;
# endif
}
LM_SCHEDULABLE(LM_ERRBOOL) evaluate_tokens(size_t starting_offset, const std::function<bool (float)> &on_tick = nullptr) LM_NOEXCEPTDECL {