| 1569 | }; |
| 1570 | |
| 1571 | size_t llama_context::state_get_size() { |
| 1572 | llama_io_write_dummy io; |
| 1573 | try { |
| 1574 | return state_write_data(io); |
| 1575 | } catch (const std::exception & err) { |
| 1576 | LLAMA_LOG_ERROR("%s: error getting state size: %s\n", __func__, err.what()); |
| 1577 | return 0; |
| 1578 | } |
| 1579 | } |
| 1580 | |
| 1581 | size_t llama_context::state_get_data(uint8_t * dst, size_t size) { |
| 1582 | llama_io_write_buffer io(dst, size); |
no test coverage detected