fixed function declaration order
This commit is contained in:
parent
7c5b2b57b0
commit
cffe923ea3
1 changed files with 8 additions and 8 deletions
16
llama.cpp
16
llama.cpp
|
@ -3743,14 +3743,6 @@ size_t llama_get_state_size(const struct llama_context * ctx) {
|
|||
return s_total;
|
||||
}
|
||||
|
||||
size_t llama_copy_state_data(struct llama_context * ctx, uint8_t * dst)
|
||||
{
|
||||
llama_data_buffer_context data_ctx(dst);
|
||||
llama_copy_state_data_internal(ctx, &data_ctx);
|
||||
|
||||
return data_ctx.get_size_written();
|
||||
}
|
||||
|
||||
/** copy state data into either a buffer or file depending on the passed in context
|
||||
*
|
||||
* file context:
|
||||
|
@ -3861,6 +3853,14 @@ void llama_copy_state_data_internal(struct llama_context * ctx, llama_data_conte
|
|||
}
|
||||
}
|
||||
|
||||
size_t llama_copy_state_data(struct llama_context * ctx, uint8_t * dst)
|
||||
{
|
||||
llama_data_buffer_context data_ctx(dst);
|
||||
llama_copy_state_data_internal(ctx, &data_ctx);
|
||||
|
||||
return data_ctx.get_size_written();
|
||||
}
|
||||
|
||||
// Sets the state reading from the specified source address
|
||||
size_t llama_set_state_data(struct llama_context * ctx, uint8_t * src) {
|
||||
uint8_t * inp = src;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue