ILGPU  0.9.0
ILGPU.Backends.EntryPoints.ArgumentMapper Class Referenceabstract

Maps kernel arguments to a compatible representation that can be accessed by the native kernel. More...

Inheritance diagram for ILGPU.Backends.EntryPoints.ArgumentMapper:
ILGPU.ICache ILGPU.Backends.PointerViews.ViewArgumentMapper ILGPU.Backends.SeparateViews.ViewArgumentMapper ILGPU.Backends.PTX.PTXArgumentMapper ILGPU.Backends.OpenCL.CLArgumentMapper

Classes

struct  ArgumentSource
 An argument source. More...
 
interface  IMappingHandler
 An abstract argument mapping handler. More...
 
interface  ISeparateViewMappingHandler
 An abstract argument mapping handler. More...
 
interface  ISource
 An emission source. More...
 
interface  ITarget
 An emission target. More...
 
struct  LocalSource
 A ILLocal source. More...
 
struct  LocalTarget
 A ILLocal target. More...
 
struct  StructureSource
 A structure source. More...
 
struct  StructureTarget
 A structure source. More...
 
struct  ViewSource
 A view-parameter source. More...
 

Public Member Functions

void ClearCache (ClearCacheMode mode)
 Clears internal caches. More...
 

Protected Member Functions

 ArgumentMapper (Context context)
 Constructs a new argument mapper. More...
 
abstract Type MapViewType (Type viewType, Type elementType)
 Maps a view type to its implementation specific type. More...
 
Type MapStructType (Type structType)
 Maps the given structure type to a compatible structure type. More...
 
Type RegisterTypeMapping (Type type, Type mappedType)
 Registers a type mapping entry and returns the mapped type. More...
 
Type MapType (Type type)
 Maps the given source type to a compatible target type. More...
 
abstract void MapViewInstance< TILEmitter, TSource, TTarget > (in TILEmitter emitter, Type elementType, TSource source, TTarget target)
 Emits a set of commands that map an implementation view instance and stores the converted instance into the given target. More...
 
void MapStructInstance< TILEmitter, TSource, TTarget > (in TILEmitter emitter, TSource source, TTarget target)
 Maps a specific structure instance. More...
 
void MapInstance< TILEmitter, TSource, TTarget > (in TILEmitter emitter, TSource source, TTarget target)
 Maps a value instance. More...
 
void Map< TILEmitter, TMappingHandler > (in TILEmitter emitter, in TMappingHandler mappingHandler, in ParameterCollection parameters)
 Creates code that maps the given parameter specification to a compatible representation. More...
 

Static Protected Member Functions

static void MapViews< TILEmitter, TMappingHandler > (in TILEmitter emitter, in TMappingHandler mappingHandler, SeparateViewEntryPoint entryPoint)
 Creates code that maps (potentially nested) views of kernel arguments separately. More...
 

Properties

Context Context [get]
 Returns the associated context. More...
 
TypeInformationManager TypeInformationManager [get]
 Returns the associated type-information manager. More...
 

Detailed Description

Maps kernel arguments to a compatible representation that can be accessed by the native kernel.

Members of this class are not thread safe.

Constructor & Destructor Documentation

ILGPU.Backends.EntryPoints.ArgumentMapper.ArgumentMapper ( Context  context)
protected

Constructs a new argument mapper.

Parameters
contextThe current context.

Member Function Documentation

void ILGPU.Backends.EntryPoints.ArgumentMapper.ClearCache ( ClearCacheMode  mode)

Clears internal caches.

Parameters
modeThe clear mode.

Implements ILGPU.ICache.

void ILGPU.Backends.EntryPoints.ArgumentMapper.Map< TILEmitter, TMappingHandler > ( in TILEmitter  emitter,
in TMappingHandler  mappingHandler,
in ParameterCollection  parameters 
)
protected

Creates code that maps the given parameter specification to a compatible representation.

Template Parameters
TILEmitterThe emitter type.
TMappingHandlerThe handler type.
Parameters
emitterThe target emitter to write to.
mappingHandlerThe target mapping handler to use.
parametersThe parameter collection to map.
Type Constraints
TILEmitter :IILEmitter 
TMappingHandler :IMappingHandler 
void ILGPU.Backends.EntryPoints.ArgumentMapper.MapInstance< TILEmitter, TSource, TTarget > ( in TILEmitter  emitter,
TSource  source,
TTarget  target 
)
protected

Maps a value instance.

Template Parameters
TILEmitterThe emitter type.
TSourceThe value source type.
TTargetThe value target type.
Parameters
emitterThe current emitter.
sourceThe value source.
targetThe value target.
Type Constraints
TILEmitter :IILEmitter 
TSource :ISource 
TTarget :ITarget 
void ILGPU.Backends.EntryPoints.ArgumentMapper.MapStructInstance< TILEmitter, TSource, TTarget > ( in TILEmitter  emitter,
TSource  source,
TTarget  target 
)
protected

Maps a specific structure instance.

Template Parameters
TILEmitterThe emitter type.
TSourceThe value source type.
TTargetThe value target type.
Parameters
emitterThe current emitter.
sourceThe value source.
targetThe value target.
Type Constraints
TILEmitter :IILEmitter 
TSource :ISource 
TTarget :ITarget 
Type ILGPU.Backends.EntryPoints.ArgumentMapper.MapStructType ( Type  structType)
protected

Maps the given structure type to a compatible structure type.

Parameters
structTypeThe structure type to map.
Returns
The mapped structure type.
Type ILGPU.Backends.EntryPoints.ArgumentMapper.MapType ( Type  type)
protected

Maps the given source type to a compatible target type.

Parameters
typeThe source type.
Returns
The compatible target type.
abstract void ILGPU.Backends.EntryPoints.ArgumentMapper.MapViewInstance< TILEmitter, TSource, TTarget > ( in TILEmitter  emitter,
Type  elementType,
TSource  source,
TTarget  target 
)
protectedpure virtual

Emits a set of commands that map an implementation view instance and stores the converted instance into the given target.

Template Parameters
TILEmitterThe emitter type.
TSourceThe value source type.
TTargetThe value target type.
Parameters
emitterThe current emitter.
elementTypeThe element type.
sourceThe value source.
targetThe value target.

Implemented in ILGPU.Backends.PointerViews.ViewArgumentMapper, and ILGPU.Backends.SeparateViews.ViewArgumentMapper.

Type Constraints
TILEmitter :IILEmitter 
TSource :ISource 
TTarget :ITarget 
static void ILGPU.Backends.EntryPoints.ArgumentMapper.MapViews< TILEmitter, TMappingHandler > ( in TILEmitter  emitter,
in TMappingHandler  mappingHandler,
SeparateViewEntryPoint  entryPoint 
)
staticprotected

Creates code that maps (potentially nested) views of kernel arguments separately.

Template Parameters
TILEmitterThe emitter type.
TMappingHandlerThe handler type.
Parameters
emitterThe target emitter to write to.
mappingHandlerThe target mapping handler to use.
entryPointThe entry point to use.
Type Constraints
TILEmitter :IILEmitter 
TMappingHandler :ISeparateViewMappingHandler 
abstract Type ILGPU.Backends.EntryPoints.ArgumentMapper.MapViewType ( Type  viewType,
Type  elementType 
)
protectedpure virtual

Maps a view type to its implementation specific type.

Parameters
viewTypeThe view type.
elementTypeThe element type.
Returns
The resulting implementation type.

Implemented in ILGPU.Backends.PointerViews.ViewArgumentMapper, and ILGPU.Backends.SeparateViews.ViewArgumentMapper.

Type ILGPU.Backends.EntryPoints.ArgumentMapper.RegisterTypeMapping ( Type  type,
Type  mappedType 
)
protected

Registers a type mapping entry and returns the mapped type.

Parameters
typeThe source type.
mappedTypeThe target type.
Returns
The mapped type.

Property Documentation

Context ILGPU.Backends.EntryPoints.ArgumentMapper.Context
get

Returns the associated context.

TypeInformationManager ILGPU.Backends.EntryPoints.ArgumentMapper.TypeInformationManager
get

Returns the associated type-information manager.


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