ILGPU  0.9.0
ILGPU.Context Class Reference

Represents the main ILGPU context. More...

Inheritance diagram for ILGPU.Context:
ILGPU.Util.CachedExtensionBase< ContextExtension >

Classes

struct  MethodEmitter
 Represents a method builder in the .Net world.
 

Public Member Functions

 Context ()
 Constructs a new ILGPU main context More...
 
 Context (ContextFlags flags)
 Constructs a new ILGPU main context More...
 
 Context (OptimizationLevel optimizationLevel)
 Constructs a new ILGPU main context More...
 
 Context (ContextFlags flags, OptimizationLevel optimizationLevel)
 Constructs a new ILGPU main context More...
 
bool HasFlags (ContextFlags flags)
 Returns true if the current context has the given flags. More...
 
ContextCodeGenerationPhase BeginCodeGeneration ()
 Begins a new code generation phase. More...
 
ContextCodeGenerationPhase BeginCodeGeneration (IRContext irContext)
 Begins a new code generation phase. More...
 
Task< ContextCodeGenerationPhaseBeginCodeGenerationAsync ()
 Begins a new code generation phase (asynchronous). More...
 
Task< ContextCodeGenerationPhaseBeginCodeGenerationAsync (IRContext irContext)
 Begins a new code generation phase (asynchronous). More...
 
override void ClearCache (ClearCacheMode mode)
 Clears internal caches. However, this does not affect individual accelerator caches. More...
 

Public Attributes

const string RuntimeAssemblyName = "ILGPURuntime"
 The name of the dynamic runtime assembly. More...
 
const string AssemblyName = "ILGPU"
 Represents the general ILGPU assembly name. More...
 
const string FullAssemblyModuleName = AssemblyName + ".dll"
 Represents the general ILGPU assembly module name. More...
 
const string IRFileExtension = ".gpuil"
 The ILGPU assembly file extension. More...
 

Static Public Attributes

static readonly ContextFlags DefaultFlags = ContextFlags.None
 Represents the default flags of a new context. More...
 
static readonly ContextFlags DefaultDebug
 Represents the default debug flags of a new context. More...
 
static readonly ContextFlags FastMathFlags
 Represents the default flags of a new context. More...
 

Protected Member Functions

override void Dispose (bool disposing)
 

Properties

static string Version [get]
 Returns the current ILGPU version. More...
 
TargetPlatform TargetPlatform [get]
 Returns the current target platform. More...
 
IRContext IRContext [get]
 Returns the main IR context. More...
 
ContextFlags Flags [get]
 Returns the associated context flags. More...
 
OptimizationLevel OptimizationLevel [get]
 Returns the optimization level. More...
 
DebugInformationManager DebugInformationManager [get]
 Returns the main debug-information manager. More...
 
IRTypeContext TypeContext [get]
 Returns the main type context. More...
 
Transformer ContextTransformer [get]
 Returns the default context transformer. More...
 
IntrinsicImplementationManager IntrinsicManager [get]
 Returns the underlying intrinsic manager. More...
 

Events

EventHandler< AcceleratorAcceleratorCreated
 Will be called when a new accelerator has been created. More...
 

Detailed Description

Represents the main ILGPU context.

Members of this class are thread-safe.

Constructor & Destructor Documentation

ILGPU.Context.Context ( )

Constructs a new ILGPU main context

ILGPU.Context.Context ( ContextFlags  flags)

Constructs a new ILGPU main context

Parameters
flagsThe context flags.
ILGPU.Context.Context ( OptimizationLevel  optimizationLevel)

Constructs a new ILGPU main context

Parameters
optimizationLevelThe optimization level.
ILGPU.Context.Context ( ContextFlags  flags,
OptimizationLevel  optimizationLevel 
)

Constructs a new ILGPU main context

Parameters
optimizationLevelThe optimization level.
flagsThe context flags.

Member Function Documentation

ContextCodeGenerationPhase ILGPU.Context.BeginCodeGeneration ( )

Begins a new code generation phase.

Returns
The new code generation phase.
ContextCodeGenerationPhase ILGPU.Context.BeginCodeGeneration ( IRContext  irContext)

Begins a new code generation phase.

Returns
The new code generation phase.
Task<ContextCodeGenerationPhase> ILGPU.Context.BeginCodeGenerationAsync ( )

Begins a new code generation phase (asynchronous).

Returns
The new code generation phase.
Task<ContextCodeGenerationPhase> ILGPU.Context.BeginCodeGenerationAsync ( IRContext  irContext)

Begins a new code generation phase (asynchronous).

Returns
The new code generation phase.
override void ILGPU.Context.ClearCache ( ClearCacheMode  mode)
virtual

Clears internal caches. However, this does not affect individual accelerator caches.

Parameters
modeThe clear mode.

This method is not thread-safe.

Reimplemented from ILGPU.Util.CachedExtensionBase< ContextExtension >.

override void ILGPU.Context.Dispose ( bool  disposing)
protected

bool ILGPU.Context.HasFlags ( ContextFlags  flags)

Returns true if the current context has the given flags.

Parameters
flagsThe flags to check.
Returns
True, if the current context has the given flags.

Member Data Documentation

const string ILGPU.Context.AssemblyName = "ILGPU"

Represents the general ILGPU assembly name.

readonly ContextFlags ILGPU.Context.DefaultDebug
static
Initial value:
=
ContextFlags.EnableDebugSymbols |
ContextFlags.EnableAssertions

Represents the default debug flags of a new context.

readonly ContextFlags ILGPU.Context.DefaultFlags = ContextFlags.None
static

Represents the default flags of a new context.

readonly ContextFlags ILGPU.Context.FastMathFlags
static
Initial value:

Represents the default flags of a new context.

const string ILGPU.Context.FullAssemblyModuleName = AssemblyName + ".dll"

Represents the general ILGPU assembly module name.

const string ILGPU.Context.IRFileExtension = ".gpuil"

The ILGPU assembly file extension.

const string ILGPU.Context.RuntimeAssemblyName = "ILGPURuntime"

The name of the dynamic runtime assembly.

Property Documentation

Transformer ILGPU.Context.ContextTransformer
get

Returns the default context transformer.

DebugInformationManager ILGPU.Context.DebugInformationManager
get

Returns the main debug-information manager.

ContextFlags ILGPU.Context.Flags
get

Returns the associated context flags.

IntrinsicImplementationManager ILGPU.Context.IntrinsicManager
get

Returns the underlying intrinsic manager.

IRContext ILGPU.Context.IRContext
get

Returns the main IR context.

OptimizationLevel ILGPU.Context.OptimizationLevel
get

Returns the optimization level.

TargetPlatform ILGPU.Context.TargetPlatform
get

Returns the current target platform.

IRTypeContext ILGPU.Context.TypeContext
get
Initial value:

Returns the main type context.

string ILGPU.Context.Version
staticget

Returns the current ILGPU version.

Event Documentation

EventHandler<Accelerator> ILGPU.Context.AcceleratorCreated

Will be called when a new accelerator has been created.


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