diff options
author | Cedric Nugteren <web@cedricnugteren.nl> | 2016-07-10 11:24:36 +0200 |
---|---|---|
committer | Cedric Nugteren <web@cedricnugteren.nl> | 2016-07-10 11:24:36 +0200 |
commit | 39e9b1238ff66a680579a181c0f0c2424e65e003 (patch) | |
tree | e0f01c7f508418a004aef56fc4edef00ed0b8d77 /src/cache.cpp | |
parent | 9caa7ca5b9c1fdf99473582cd357506dffd51b44 (diff) |
Fixed a bug related to the cache and retrieval of programs based on the OpenCL context
Diffstat (limited to 'src/cache.cpp')
-rw-r--r-- | src/cache.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cache.cpp b/src/cache.cpp index 2b90eccc..6080f082 100644 --- a/src/cache.cpp +++ b/src/cache.cpp @@ -38,7 +38,7 @@ void StoreProgramToCache(const Program &program, const Context &context, printf("[DEBUG] Storing program in cache\n"); #endif program_cache_mutex_.lock(); - program_cache_.push_back(ProgramCache{program, context.pointer(), precision, routine_name}); + program_cache_.push_back(ProgramCache{program, context(), precision, routine_name}); program_cache_mutex_.unlock(); } @@ -69,7 +69,7 @@ const Program& GetProgramFromCache(const Context &context, const Precision &prec #endif program_cache_mutex_.lock(); for (auto &cached_program: program_cache_) { - if (cached_program.MatchInCache(context.pointer(), precision, routine_name)) { + if (cached_program.MatchInCache(context(), precision, routine_name)) { program_cache_mutex_.unlock(); return cached_program.program; } @@ -97,7 +97,7 @@ bool ProgramIsInCache(const Context &context, const Precision &precision, const std::string &routine_name) { program_cache_mutex_.lock(); for (auto &cached_program: program_cache_) { - if (cached_program.MatchInCache(context.pointer(), precision, routine_name)) { + if (cached_program.MatchInCache(context(), precision, routine_name)) { program_cache_mutex_.unlock(); return true; } |