initBlock: cycle columns, asm implementation

This commit is contained in:
tevador
2019-03-15 18:00:51 +01:00
parent 55a22febbd
commit edde7672e0
5 changed files with 249 additions and 30 deletions
+3 -3
View File
@@ -54,7 +54,7 @@ namespace RandomX {
#endif
uint32_t currentBlock = addr / CacheLineSize;
if (currentBlock != startBlock || output != currentLine.data()) {
initBlock(cache, (uint8_t*)currentLine.data(), currentBlock);
initBlock(cache, (uint8_t*)currentLine.data(), currentBlock, RANDOMX_CACHE_ACCESSES / 8);
}
else {
sync();
@@ -81,7 +81,7 @@ namespace RandomX {
void LightClientAsyncWorker::getBlocks(void* out, uint32_t startBlock, uint32_t blockCount) {
for (uint32_t i = 0; i < blockCount; ++i) {
initBlock(cache, (uint8_t*)out + CacheLineSize * i, startBlock + i);
initBlock(cache, (uint8_t*)out + CacheLineSize * i, startBlock + i, RANDOMX_CACHE_ACCESSES / 8);
}
}
@@ -101,7 +101,7 @@ namespace RandomX {
std::cout << sw.getElapsed() << ": runWorker-getBlocks " << startBlock << "/" << blockCount << std::endl;
#endif
//getBlocks(output, startBlock, blockCount);
initBlock(cache, (uint8_t*)output, startBlock);
initBlock(cache, (uint8_t*)output, startBlock, RANDOMX_CACHE_ACCESSES / 8);
hasWork = false;
#ifdef TRACE
std::cout << sw.getElapsed() << ": runWorker-finished " << startBlock << "/" << blockCount << std::endl;