12 BytomMatList16* matList_int16;
13 uint8_t result[32] = {0};
14 map <vector<uint8_t>, BytomMatList16*> seedCache;
15 static const int cacheSize = 42; //"Answer to the Ultimate Question of Life, the Universe, and Everything"
18 uint8_t *SimdTs(uint8_t blockheader[32], uint8_t seed[32]){
20 vector<uint8_t> seedVec(seed, seed + 32);
22 if(seedCache.find(seedVec) != seedCache.end()) {
23 // printf("\t---%s---\n", "Seed already exists in the cache.");
24 matList_int16 = seedCache[seedVec];
27 extend(exted, seed); // extends seed to exted
29 init_seed(extSeed, exted);
31 matList_int16 = new BytomMatList16;
32 matList_int16->init(extSeed);
34 seedCache.insert(make_pair(seedVec, matList_int16));
37 iter_mineBytom(blockheader, 32, result);
39 if(seedCache.size() > cacheSize) {
40 for(map<vector<uint8_t>, BytomMatList16*>::iterator it=seedCache.begin(); it!=seedCache.end(); ++it){