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

Function clip_encode_float_image

smallthinker/tools/mtmd/clip.cpp:4096–4107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4094}
4095
4096bool clip_encode_float_image (struct clip_ctx * ctx, int n_threads, float * img, int h, int w, float * vec) {
4097 clip_image_f32 clip_img;
4098 clip_img.buf.resize(h * w * 3);
4099 for (int i = 0; i < h*w*3; i++)
4100 {
4101 clip_img.buf[i] = img[i];
4102 }
4103 clip_img.nx = w;
4104 clip_img.ny = h;
4105 clip_image_encode(ctx, n_threads, &clip_img, vec);
4106 return true;
4107}
4108
4109//
4110// API used internally with mtmd

Callers

nothing calls this directly

Calls 2

clip_image_encodeFunction · 0.70
resizeMethod · 0.45

Tested by

no test coverage detected