| 3897 | } |
| 3898 | |
| 3899 | bool clip_encode_float_image (struct clip_ctx * ctx, int n_threads, float * img, int h, int w, float * vec) { |
| 3900 | clip_image_f32 clip_img; |
| 3901 | clip_img.buf.resize(h * w * 3); |
| 3902 | for (int i = 0; i < h*w*3; i++) |
| 3903 | { |
| 3904 | clip_img.buf[i] = img[i]; |
| 3905 | } |
| 3906 | clip_img.nx = w; |
| 3907 | clip_img.ny = h; |
| 3908 | clip_image_encode(ctx, n_threads, &clip_img, vec); |
| 3909 | return true; |
| 3910 | } |
| 3911 | |
| 3912 | // |
| 3913 | // API used internally with mtmd |
nothing calls this directly
no test coverage detected