summaryrefslogtreecommitdiff
path: root/src/cache.cpp
AgeCommit message (Collapse)Author
2018-05-01Now stores a shared_ptr to the Program class in the cacheCedric Nugteren
2017-02-12Made RemoveBySubset from the cache work with references to keysCedric Nugteren
2017-02-11Added an option to remove items from the caches, optionally by a subset of 2 ↵Cedric Nugteren
specific key-values only
2017-01-24Routine: cache the database instance as wellIvan Shapovalov
This does not change much, but will become useful in next commits when plugin support is introduced.
2017-01-24Routine, Cache: generalize, reduce amount of copying in fast pathIvan Shapovalov
Implement a generalized Cache<K, V>. Two variants are provided: the first one is based on std::map, using C++14-specific transparent std::less<> and generalized std::map::find() to allow searching by tuple of references. The second one is based on std::vector and O(n) lookup, but remains C++11-compliant.
2016-10-22treewide: use C++ exceptions properlyIvan Shapovalov
Since the codebase is designed around proper C++ idioms such as RAII, it makes sense to only use C++ exceptions internally instead of mixing exceptions and error codes. The exceptions are now caught at top level to preserve compatibility with the existing error code-based API. Note that we deliberately do not catch C++ runtime errors (such as `std::bad_alloc`) nor logic errors (aka failed assertions) because no actual handling can ever happen for such errors. However, in the C interface we do catch _all_ exceptions (...) and convert them into a wild-card error code.
2016-07-10Fixed a bug related to the cache and retrieval of programs based on the ↵Cedric Nugteren
OpenCL context
2016-07-08Cache now compares cl_context instead of a pointer to a context; added ↵Cedric Nugteren
verbose print statements to the cache
2016-06-19Renamed all C++ source files to .cpp to match the .hpp extension betterCedric Nugteren