Skip to content
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

Make Wrapper Around Executable #1

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

evolvedmicrobe
Copy link

Goal here was to refactor the code to make it easy for us to call in our pipelines and use the intel MKL instead of the GPLed fftw library.

  • Convert from a standalone executable to a set of init/step/free methods. Extract from the main class the load and run methods it calls, and place in a new file 10X_tsne.[h|cpp] a class that maintains state with a C++ class and has a TSNEStateclass which has initialization andstep_tsne_bymethod along with a destructor to free resources. This is mostly cut/paste, but I made a few changes (e.g. I added averbose` field to only print statements if requested.
  • Define extern "C" interface to this library so it can be called from Rust.
  • Avoid compiling the old cut/paste versions of the code with a #ifdef ORIGINAL_TSNE_PROGRAM but leave the files around to make it easier to compare things to the older state.
  • Run clang-format on the changed files. This led to some churn but I think was worth it overall.

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.

1 participant