| 449 | } |
| 450 | |
| 451 | static struct llama_sampler * llama_sampler_chain_clone(const struct llama_sampler * smpl) { |
| 452 | const auto * chain_src = (const llama_sampler_chain *) smpl->ctx; |
| 453 | |
| 454 | auto * result = llama_sampler_chain_init(chain_src->params); |
| 455 | |
| 456 | for (auto * smpl : chain_src->samplers) { |
| 457 | llama_sampler_chain_add(result, llama_sampler_clone(smpl)); |
| 458 | } |
| 459 | |
| 460 | return result; |
| 461 | } |
| 462 | |
| 463 | static void llama_sampler_chain_free(struct llama_sampler * smpl) { |
| 464 | auto * chain = (llama_sampler_chain *) smpl->ctx; |
nothing calls this directly
no test coverage detected