From e801037de60e70172c4f69823f0fa284effadf8f Mon Sep 17 00:00:00 2001 From: CJ Pais Date: Sun, 18 Feb 2024 13:25:49 -0800 Subject: [PATCH] remove c++ style from header --- examples/llava/clip.cpp | 17 +++++++++++++++++ examples/llava/clip.h | 18 ------------------ examples/llava/llava.cpp | 17 +++++++++++++++++ examples/server/server.cpp | 17 +++++++++++++++++ 4 files changed, 51 insertions(+), 18 deletions(-) diff --git a/examples/llava/clip.cpp b/examples/llava/clip.cpp index 0a26cf62c..98d512f67 100644 --- a/examples/llava/clip.cpp +++ b/examples/llava/clip.cpp @@ -34,6 +34,23 @@ //#define CLIP_DEBUG_FUNCTIONS +// RGB uint8 image +struct clip_image_u8 { + int nx; + int ny; + + std::vector buf; +}; + +// RGB float32 image (NHWC) +// Memory layout: RGBRGBRGB... +struct clip_image_f32 { + int nx; + int ny; + + std::vector buf; +}; + static std::string format(const char * fmt, ...) { va_list ap; va_list ap2; diff --git a/examples/llava/clip.h b/examples/llava/clip.h index 33f83490c..e5bd54924 100644 --- a/examples/llava/clip.h +++ b/examples/llava/clip.h @@ -3,7 +3,6 @@ #include #include -#include #ifdef LLAMA_SHARED # if defined(_WIN32) && !defined(__MINGW32__) @@ -27,23 +26,6 @@ extern "C" { struct clip_ctx; -// RGB uint8 image -struct clip_image_u8 { - int nx; - int ny; - - std::vector buf; -}; - -// RGB float32 image (NHWC) -// Memory layout: RGBRGBRGB... -struct clip_image_f32 { - int nx; - int ny; - - std::vector buf; -}; - struct clip_image_u8_batch { struct clip_image_u8 * data; size_t size; diff --git a/examples/llava/llava.cpp b/examples/llava/llava.cpp index 9cb962936..4cb65a07b 100644 --- a/examples/llava/llava.cpp +++ b/examples/llava/llava.cpp @@ -9,6 +9,23 @@ #include #include +// RGB uint8 image +struct clip_image_u8 { + int nx; + int ny; + + std::vector buf; +}; + +// RGB float32 image (NHWC) +// Memory layout: RGBRGBRGB... +struct clip_image_f32 { + int nx; + int ny; + + std::vector buf; +}; + struct clip_image_grid_shape { int first; int second; diff --git a/examples/server/server.cpp b/examples/server/server.cpp index 0645386da..f5667fc7a 100644 --- a/examples/server/server.cpp +++ b/examples/server/server.cpp @@ -43,6 +43,23 @@ struct server_params int32_t write_timeout = 600; }; +// RGB uint8 image +struct clip_image_u8 { + int nx; + int ny; + + std::vector buf; +}; + +// RGB float32 image (NHWC) +// Memory layout: RGBRGBRGB... +struct clip_image_f32 { + int nx; + int ny; + + std::vector buf; +}; + bool server_verbose = false; static size_t common_part(const std::vector &a, const std::vector &b)