Skip to content

Commit

Permalink
comment out preprocess
Browse files Browse the repository at this point in the history
  • Loading branch information
ua741 committed Oct 25, 2023
1 parent 3709638 commit da0e0e9
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions clip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -784,18 +784,18 @@ typedef struct {
const clip_ctx * ctx;
} ImageData;

// Function to preprocess a single image in a thread
void * preprocess_image(void * arg) {
ImageData * imageData = static_cast<ImageData *>(arg);
const clip_image_u8 * input = imageData->input;
clip_image_f32 * resized = imageData->resized;
const clip_ctx * ctx = imageData->ctx;
// // Function to preprocess a single image in a thread
// void * preprocess_image(void * arg) {
// ImageData * imageData = static_cast<ImageData *>(arg);
// const clip_image_u8 * input = imageData->input;
// clip_image_f32 * resized = imageData->resized;
// const clip_ctx * ctx = imageData->ctx;

// Call the original preprocess function on the image
clip_image_preprocess(ctx, input, resized);
// // Call the original preprocess function on the image
// clip_image_preprocess(ctx, input, resized);

pthread_exit(NULL);
}
// pthread_exit(NULL);
// }

// Function to batch-preprocess multiple images i
// void clip_image_batch_preprocess(const clip_ctx * ctx, const int n_threads, const clip_image_u8_batch * img_inputs,
Expand Down

0 comments on commit da0e0e9

Please sign in to comment.