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

Persistent cache #441

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

salmanulhaq
Copy link

  • Made clear_persistent_cache static
  • Catching exception if there's no .boost_compute folder (or in use)
  • Followed @ddemidov suggestion on computing hash for persistent cache lookup

@kylelutz have to re-use appdata path snippet since appdata_path() is private within program but clear_persistent_cache suits better in program_cache.

@ddemidov
Copy link
Contributor

You forgot to actually change the implementation of boost::compute::detail::sha1. I went and made the same improvement for my own library here; feel free to reuse it.

{
#ifdef BOOST_COMPUTE_USE_OFFLINE_CACHE
// Path delimiter symbol for the current OS.
static const std::string delim = boost::filesystem::path("/").make_preferred().string();
Copy link
Collaborator

Choose a reason for hiding this comment

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

So instead of doing all this here, you should call the detail::appdath_path() function defined in <boost/compute/detail/path.hpp>. I recently extracted this code from the program class so you may have to rebase on top of the develop branch to get it.

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.

4 participants