MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / clip_image_encode

Function clip_image_encode

smallthinker/tools/mtmd/clip.cpp:3636–3643  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3634}
3635
3636bool clip_image_encode(struct clip_ctx * ctx, const int n_threads, clip_image_f32 * img, float * vec) {
3637 clip_image_f32_batch imgs;
3638 clip_image_f32_ptr img_copy(clip_image_f32_init());
3639 *img_copy = *img;
3640 imgs.entries.push_back(std::move(img_copy));
3641
3642 return clip_image_batch_encode(ctx, n_threads, &imgs, vec);
3643}
3644
3645bool clip_image_batch_encode(clip_ctx * ctx, const int n_threads, const clip_image_f32_batch * imgs_c_ptr, float * vec) {
3646 const clip_image_f32_batch & imgs = *imgs_c_ptr;

Callers 2

clip_encode_float_imageFunction · 0.70
mtmd_encodeFunction · 0.70

Calls 3

clip_image_f32_initFunction · 0.85
clip_image_batch_encodeFunction · 0.70
push_backMethod · 0.45

Tested by

no test coverage detected