Remember cache input data (#133)

Make init_cache and set_cache no-ops if fed the same data as before
This commit is contained in:
hyc
2019-10-04 08:31:32 +02:00
committed by tevador
parent f1199a9fc6
commit 01648b3bd6
4 changed files with 20 additions and 5 deletions
+1
View File
@@ -50,6 +50,7 @@ struct randomx_cache {
randomx::DatasetInitFunc* datasetInit;
randomx::SuperscalarProgram programs[RANDOMX_CACHE_ACCESSES];
std::vector<uint64_t> reciprocalCache;
std::string cacheKey;
bool isInitialized() {
return programs[0].getSize() != 0;