CorTeX Core ABI 7
ToolTech Software · C++ library reference
Loading...
Searching...
No Matches
ctxCompiler Class Referenceabstract

Accelerates execution of ctxVirtualMachineProgram by compiler backens. More...

#include <ctxCompiler.h>

Inheritance diagram for ctxCompiler:

Public Member Functions

virtual gzType * getType () const
virtual gzBool initialize ()=0
virtual gzBool hasError ()=0
virtual gzString getError ()=0

Static Public Member Functions

static gzType * getClassType ()
static gzBool parallelize ()
static gzBool execute (ctxVirtualMachineProgram *program, const ctxProgramExecution flags=CTX_PRG_EXEC_DEFAULT, ctxDetailedRegisterUse *register_use=NULL)
static gzBool pinMemory (gzVoid *address)
static gzBool waitMemory (gzVoid *address)
static gzBool readMemory (gzVoid *address, gzUInt64 offset, gzUInt64 bytes, gzUInt64 stride=0, gzUInt32 count=1)
 Makes count host byte ranges current after backend writes: the range k starts at address + offset + k * stride and is bytes long.
static gzUInt32 parallelInstructionCount ()
static gzBool installSystemCompiler (ctxCompilerTypes type=CTX_COMPILER_DEFAULT, gzString *error=nullptr)
static gzVoid unInstallSystemCompiler ()
static gzBool hasSystemCompiler ()

Protected Member Functions

virtual gzBool parallelize_ ()=0
virtual gzBool execute_ (ctxVirtualMachineProgram *program, const ctxProgramExecution flags, ctxDetailedRegisterUse *register_use)=0
virtual gzBool pinMemory_ (gzVoid *address)=0
virtual gzBool waitMemory_ (gzVoid *address)=0
virtual gzUInt32 parallelInstructionCount_ ()=0
virtual gzBool readMemory_ (gzVoid *address, gzUInt64 offset, gzUInt64 bytes, gzUInt64 stride, gzUInt32 count)
 Ranged readback hook for readMemory(); the default pins the whole bank.

Static Protected Attributes

static gzRefPointer< ctxCompiler > systemCompiler

Detailed Description

Accelerates execution of ctxVirtualMachineProgram by compiler backens.

Definition at line 50 of file ctxCompiler.h.

Member Function Documentation

◆ execute()

gzBool ctxCompiler::execute ( ctxVirtualMachineProgram * program,
const ctxProgramExecution flags = CTX_PRG_EXEC_DEFAULT,
ctxDetailedRegisterUse * register_use = NULL )
static

References CTX_EXPORT, and CTX_PRG_EXEC_DEFAULT.

◆ execute_()

virtual gzBool ctxCompiler::execute_ ( ctxVirtualMachineProgram * program,
const ctxProgramExecution flags,
ctxDetailedRegisterUse * register_use )
protectedpure virtual

References CTX_EXPORT.

◆ getClassType()

gzType * ctxCompiler::getClassType ( )
static

References CTX_EXPORT.

◆ getError()

virtual gzString ctxCompiler::getError ( )
pure virtual

References CTX_EXPORT.

◆ getType()

virtual gzType * ctxCompiler::getType ( ) const
virtual

◆ hasError()

virtual gzBool ctxCompiler::hasError ( )
pure virtual

References CTX_EXPORT.

◆ hasSystemCompiler()

gzBool ctxCompiler::hasSystemCompiler ( )
static

References CTX_EXPORT.

◆ initialize()

virtual gzBool ctxCompiler::initialize ( )
pure virtual

References CTX_EXPORT.

◆ installSystemCompiler()

gzBool ctxCompiler::installSystemCompiler ( ctxCompilerTypes type = CTX_COMPILER_DEFAULT,
gzString * error = nullptr )
static

References CTX_COMPILER_DEFAULT, and CTX_EXPORT.

◆ parallelInstructionCount()

gzUInt32 ctxCompiler::parallelInstructionCount ( )
static

References CTX_EXPORT.

◆ parallelInstructionCount_()

virtual gzUInt32 ctxCompiler::parallelInstructionCount_ ( )
protectedpure virtual

References CTX_EXPORT.

◆ parallelize()

gzBool ctxCompiler::parallelize ( )
static

References CTX_EXPORT.

◆ parallelize_()

virtual gzBool ctxCompiler::parallelize_ ( )
protectedpure virtual

References CTX_EXPORT.

◆ pinMemory()

gzBool ctxCompiler::pinMemory ( gzVoid * address)
static

References CTX_EXPORT.

◆ pinMemory_()

virtual gzBool ctxCompiler::pinMemory_ ( gzVoid * address)
protectedpure virtual

References CTX_EXPORT.

◆ readMemory()

gzBool ctxCompiler::readMemory ( gzVoid * address,
gzUInt64 offset,
gzUInt64 bytes,
gzUInt64 stride = 0,
gzUInt32 count = 1 )
static

Makes count host byte ranges current after backend writes: the range k starts at address + offset + k * stride and is bytes long.

Unlike pinMemory(), only these ranges are copied and the bank stays stale on the host; read nothing outside them. A zero stride means bytes. Backends without a ranged transfer pin the whole bank. Returns FALSE without a system compiler or for an untracked or out-of-range bank.

References CTX_EXPORT.

◆ readMemory_()

virtual gzBool ctxCompiler::readMemory_ ( gzVoid * address,
gzUInt64 offset,
gzUInt64 bytes,
gzUInt64 stride,
gzUInt32 count )
protectedvirtual

Ranged readback hook for readMemory(); the default pins the whole bank.

References CTX_EXPORT.

◆ unInstallSystemCompiler()

gzVoid ctxCompiler::unInstallSystemCompiler ( )
static

References CTX_EXPORT.

◆ waitMemory()

gzBool ctxCompiler::waitMemory ( gzVoid * address)
static

References CTX_EXPORT.

◆ waitMemory_()

virtual gzBool ctxCompiler::waitMemory_ ( gzVoid * address)
protectedpure virtual

References CTX_EXPORT.

Member Data Documentation

◆ systemCompiler

gzRefPointer<ctxCompiler> ctxCompiler::systemCompiler
staticprotected

Definition at line 100 of file ctxCompiler.h.


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