Monero
Loading...
Searching...
No Matches
randomx_vm Class Referenceabstract

#include <virtual_machine.hpp>

Inheritance diagram for randomx_vm:
Collaboration diagram for randomx_vm:

Public Member Functions

virtual ~randomx_vm ()=0
virtual void allocate ()=0
virtual void getFinalResult (void *out, size_t outSize)=0
virtual void hashAndFill (void *out, size_t outSize, uint64_t *fill_state)=0
virtual void setDataset (randomx_dataset *dataset)
virtual void setCache (randomx_cache *cache)
virtual void initScratchpad (void *seed)=0
virtual void run (void *seed)=0
void resetRoundingMode ()
randomx::RegisterFilegetRegisterFile ()
const void * getScratchpad ()
const randomx::ProgramgetProgram ()
const uint8_tgetMemory () const

Public Attributes

std::string cacheKey
uint64_t tempHash [8]

Protected Member Functions

void initialize ()

Protected Attributes

randomx::Program program
randomx::RegisterFile reg
randomx::ProgramConfiguration config
randomx::MemoryRegisters mem
uint8_tscratchpad = nullptr
union { 
   randomx_cache *   cachePtr = nullptr 
   randomx_dataset *   datasetPtr 
}; 
uint64_t datasetOffset

Constructor & Destructor Documentation

◆ ~randomx_vm()

randomx_vm::~randomx_vm ( )
pure virtual

Member Function Documentation

◆ allocate()

virtual void randomx_vm::allocate ( )
pure virtual

◆ getFinalResult()

virtual void randomx_vm::getFinalResult ( void * out,
size_t outSize )
pure virtual

◆ getMemory()

const uint8_t * randomx_vm::getMemory ( ) const
inline

◆ getProgram()

const randomx::Program & randomx_vm::getProgram ( )
inline

◆ getRegisterFile()

randomx::RegisterFile * randomx_vm::getRegisterFile ( )
inline

◆ getScratchpad()

const void * randomx_vm::getScratchpad ( )
inline

◆ hashAndFill()

virtual void randomx_vm::hashAndFill ( void * out,
size_t outSize,
uint64_t * fill_state )
pure virtual

◆ initialize()

void randomx_vm::initialize ( )
protected

◆ initScratchpad()

virtual void randomx_vm::initScratchpad ( void * seed)
pure virtual

◆ resetRoundingMode()

void randomx_vm::resetRoundingMode ( )

◆ run()

virtual void randomx_vm::run ( void * seed)
pure virtual

◆ setCache()

◆ setDataset()

virtual void randomx_vm::setDataset ( randomx_dataset * dataset)
inlinevirtual

Reimplemented in randomx::CompiledLightVm< Allocator, softAes, secureJit >, randomx::CompiledLightVm< AlignedAllocator< CacheLineSize >, false, false >, randomx::CompiledLightVm< AlignedAllocator< CacheLineSize >, false, true >, randomx::CompiledLightVm< AlignedAllocator< CacheLineSize >, true, false >, randomx::CompiledLightVm< AlignedAllocator< CacheLineSize >, true, true >, randomx::CompiledLightVm< LargePageAllocator, false, false >, randomx::CompiledLightVm< LargePageAllocator, false, true >, randomx::CompiledLightVm< LargePageAllocator, true, false >, randomx::CompiledLightVm< LargePageAllocator, true, true >, randomx::CompiledVm< Allocator, softAes, secureJit >, randomx::CompiledVm< AlignedAllocator< CacheLineSize >, false, false >, randomx::CompiledVm< AlignedAllocator< CacheLineSize >, false, true >, randomx::CompiledVm< AlignedAllocator< CacheLineSize >, true, false >, randomx::CompiledVm< AlignedAllocator< CacheLineSize >, true, true >, randomx::CompiledVm< LargePageAllocator, false, false >, randomx::CompiledVm< LargePageAllocator, false, true >, randomx::CompiledVm< LargePageAllocator, true, false >, randomx::CompiledVm< LargePageAllocator, true, true >, randomx::InterpretedLightVm< Allocator, softAes >, randomx::InterpretedLightVm< AlignedAllocator< CacheLineSize >, false >, randomx::InterpretedLightVm< AlignedAllocator< CacheLineSize >, true >, randomx::InterpretedLightVm< LargePageAllocator, false >, randomx::InterpretedLightVm< LargePageAllocator, true >, randomx::InterpretedVm< Allocator, softAes >, randomx::InterpretedVm< AlignedAllocator< CacheLineSize >, false >, randomx::InterpretedVm< AlignedAllocator< CacheLineSize >, true >, randomx::InterpretedVm< LargePageAllocator, false >, and randomx::InterpretedVm< LargePageAllocator, true >.

Member Data Documentation

◆ [union]

union { ... } randomx_vm

◆ cacheKey

std::string randomx_vm::cacheKey

◆ cachePtr

randomx_cache* randomx_vm::cachePtr = nullptr

◆ config

randomx::ProgramConfiguration randomx_vm::config
protected

◆ datasetOffset

uint64_t randomx_vm::datasetOffset
protected

◆ datasetPtr

randomx_dataset* randomx_vm::datasetPtr

◆ mem

randomx::MemoryRegisters randomx_vm::mem
protected

◆ program

randomx::Program randomx_vm::program
protected

◆ reg

randomx::RegisterFile randomx_vm::reg
protected

◆ scratchpad

uint8_t* randomx_vm::scratchpad = nullptr
protected

◆ tempHash

uint64_t randomx_vm::tempHash[8]

The documentation for this class was generated from the following files: