Skip to content

Commit

Permalink
C2131: expression did not evaluate to a constant
Browse files Browse the repository at this point in the history
  • Loading branch information
ua741 committed Oct 25, 2023
1 parent b448a37 commit d91787e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions clip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1397,7 +1397,7 @@ bool clip_compare_text_and_image(const clip_ctx * ctx, const int n_threads, cons
return false;
}

if (!clip_text_encode(ctx, n_threads, &tokens, txt_vec, true)) {
if (!clip_text_encode(ctx, n_threads, &tokens, txt_vec.data(), true)) {
return false;
}

Expand All @@ -1408,12 +1408,12 @@ bool clip_compare_text_and_image(const clip_ctx * ctx, const int n_threads, cons
return false;
}

if (!clip_image_encode(ctx, n_threads, &img_res, img_vec, true)) {
if (!clip_image_encode(ctx, n_threads, &img_res, img_vec.data(), true)) {
return false;
}

// compute similarity
*score = clip_similarity_score(img_vec, txt_vec, projection_dim);
*score = clip_similarity_score(img_vec.data(), txt_vec.data(), projection_dim);

return true;
}
Expand Down

0 comments on commit d91787e

Please sign in to comment.