Implemented unified cryptonight and RandomX scratchpad memory.
This commit is contained in:
parent
5699147aab
commit
20313cbc56
30 changed files with 434 additions and 297 deletions
|
@ -31,14 +31,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
namespace randomx {
|
||||
|
||||
template<class Allocator, bool softAes>
|
||||
void InterpretedLightVm<Allocator, softAes>::setCache(randomx_cache* cache) {
|
||||
template<bool softAes>
|
||||
void InterpretedLightVm<softAes>::setCache(randomx_cache* cache) {
|
||||
cachePtr = cache;
|
||||
mem.memory = cache->memory;
|
||||
}
|
||||
|
||||
template<class Allocator, bool softAes>
|
||||
void InterpretedLightVm<Allocator, softAes>::datasetRead(uint64_t address, int_reg_t(&r)[8]) {
|
||||
template<bool softAes>
|
||||
void InterpretedLightVm<softAes>::datasetRead(uint64_t address, int_reg_t(&r)[8]) {
|
||||
uint32_t itemNumber = address / CacheLineSize;
|
||||
int_reg_t rl[8];
|
||||
|
||||
|
@ -48,8 +48,6 @@ namespace randomx {
|
|||
r[q] ^= rl[q];
|
||||
}
|
||||
|
||||
template class InterpretedLightVm<AlignedAllocator<CacheLineSize>, false>;
|
||||
template class InterpretedLightVm<AlignedAllocator<CacheLineSize>, true>;
|
||||
template class InterpretedLightVm<LargePageAllocator, false>;
|
||||
template class InterpretedLightVm<LargePageAllocator, true>;
|
||||
template class InterpretedLightVm<false>;
|
||||
template class InterpretedLightVm<true>;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue