Skip to content

Make entire public API C-compatible #58

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Sep 14, 2023
Merged

Make entire public API C-compatible #58

merged 13 commits into from
Sep 14, 2023

Conversation

denis-ismailaj
Copy link
Collaborator

No description provided.

Copy link
Collaborator

@Green-Sky Green-Sky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks ok overall

@monatis
Copy link
Owner

monatis commented Sep 14, 2023

I think it looks good overall.

One thing in my mind is, maybe we can accept clip_image_f32 * images, size_t n_images instead of the clip_image_f32_batch struct. It seems to be tedious to create that struct.

@denis-ismailaj
Copy link
Collaborator Author

One thing in my mind is, maybe we can accept clip_image_f32 * images, size_t n_images instead of the clip_image_f32_batch struct. It seems to be tedious to create that struct.

Either that or provide a function that produces the batch struct given a std::vector.

@monatis
Copy link
Owner

monatis commented Sep 14, 2023

Yes, maybe a util function in the common-clip lib. I'll look into that.

@monatis monatis merged commit d766092 into fix-zsl Sep 14, 2023
monatis added a commit that referenced this pull request Sep 14, 2023
…ble (#58)

* rm __pycache__

* gitignore __pycache__

* gitignore dist

* Refactor encoding functions to make normalization optional

* Fix pip package #55

* Make entire public API C-compatible (#58)

* main.c: remove hardcoded vec_dim

* Make all public functions use C-compatible signatures

* Move private declarations to clip.cpp

* Merge with fix-zsl

* Update examples

* python: rm redundant bindings to CLIPLayer and models

* formatting: apply formatting script

* readme: add notices about the new API

* zsl: use const auto &

* tests: fix benchmark utility

* python: bump version

* Add constructor-like functions for batched structs

---------

Co-authored-by: M. Yusuf Sarıgöz <[email protected]>

---------

Co-authored-by: Denis Ismailaj <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants