Explorar o código

llava: fix errors in clip.h on certain compilers (#13030)

Jeffrey Morgan hai 9 meses
pai
achega
6602304814
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  1. 3 2
      examples/llava/clip.h

+ 3 - 2
examples/llava/clip.h

@@ -30,12 +30,13 @@ struct clip_image_size {
     int height;
     int height;
 };
 };
 
 
+struct clip_image_f32;
 struct clip_image_u8_batch;
 struct clip_image_u8_batch;
 struct clip_image_f32_batch;
 struct clip_image_f32_batch;
 
 
 struct clip_context_params {
 struct clip_context_params {
     bool use_gpu;
     bool use_gpu;
-    ggml_log_level verbosity;
+    enum ggml_log_level verbosity;
 };
 };
 
 
 // deprecated, use clip_init
 // deprecated, use clip_init
@@ -84,7 +85,7 @@ CLIP_API void clip_image_f32_batch_free(struct clip_image_f32_batch * batch);
 CLIP_API size_t clip_image_f32_batch_n_images(const struct clip_image_f32_batch * batch); // equivalent to batch->size()
 CLIP_API size_t clip_image_f32_batch_n_images(const struct clip_image_f32_batch * batch); // equivalent to batch->size()
 CLIP_API size_t clip_image_f32_batch_nx(const struct clip_image_f32_batch * batch, int idx); // equivalent to batch[idx]->nx
 CLIP_API size_t clip_image_f32_batch_nx(const struct clip_image_f32_batch * batch, int idx); // equivalent to batch[idx]->nx
 CLIP_API size_t clip_image_f32_batch_ny(const struct clip_image_f32_batch * batch, int idx); // equivalent to batch[idx]->ny
 CLIP_API size_t clip_image_f32_batch_ny(const struct clip_image_f32_batch * batch, int idx); // equivalent to batch[idx]->ny
-CLIP_API clip_image_f32 * clip_image_f32_get_img(const struct clip_image_f32_batch * batch, int idx); // equivalent to batch[idx]->data
+CLIP_API struct clip_image_f32 * clip_image_f32_get_img(const struct clip_image_f32_batch * batch, int idx); // equivalent to batch[idx]->data
 
 
 /**
 /**
  * Build image from pixels decoded by other libraries instead of stb_image.h for better performance.
  * Build image from pixels decoded by other libraries instead of stb_image.h for better performance.