MCPcopy Create free account
hub / github.com/antirez/llama.cpp-deepseek-v4-flash / llama_sampler_clone

Function llama_sampler_clone

src/llama-sampler.cpp:397–414  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

395}
396
397struct llama_sampler * llama_sampler_clone(const struct llama_sampler * smpl) {
398 if (!smpl) {
399 return nullptr;
400 }
401
402 if (smpl->iface->clone) {
403 return smpl->iface->clone(smpl);
404 }
405
406 if (smpl->ctx == nullptr) {
407 return llama_sampler_init(
408 /* .iface = */ smpl->iface,
409 /* .ctx = */ nullptr
410 );
411 }
412
413 GGML_ABORT("the sampler does not support cloning");
414}
415
416void llama_sampler_free(struct llama_sampler * smpl) {
417 if (smpl == nullptr) {

Callers 2

common_sampler_cloneFunction · 0.85

Calls 2

llama_sampler_initFunction · 0.85
cloneMethod · 0.45

Tested by

no test coverage detected