ILGPU  0.9.0
ILGPU.Backends.PTX.PTXBackend Class Reference

Represents a PTX (Cuda) backend. More...

Inheritance diagram for ILGPU.Backends.PTX.PTXBackend:
ILGPU.Backends.CodeGeneratorBackend< PTXIntrinsic.Handler, PTXCodeGenerator.GeneratorArgs, PTXCodeGenerator, StringBuilder >

Public Member Functions

 PTXBackend (Context context, PTXArchitecture architecture, PTXInstructionSet instructionSet)
 Constructs a new Cuda backend. More...
 

Public Attributes

const int WarpSize = 32
 Returns the warp size. More...
 
const int DefaultGlobalMemoryAlignment = 256
 Returns the default global memory alignment in bytes. More...
 
new PTXArgumentMapper ArgumentMapper
 Returns the associated Backend.ArgumentMapper. More...
 

Protected Member Functions

override StringBuilder CreateKernelBuilder (EntryPoint entryPoint, in BackendContext backendContext, in KernelSpecialization specialization, out PTXCodeGenerator.GeneratorArgs data)
 Creates a new PTX-compatible kernel builder and initializes a PTXCodeGenerator.GeneratorArgs instance. More...
 
override PTXCodeGenerator CreateFunctionCodeGenerator (Method method, Allocas allocas, PTXCodeGenerator.GeneratorArgs data)
 Creates a new PTXFunctionGenerator. More...
 
override PTXCodeGenerator CreateKernelCodeGenerator (in AllocaKindInformation sharedAllocations, Method method, Allocas allocas, PTXCodeGenerator.GeneratorArgs data)
 Creates a new PTXFunctionGenerator. More...
 
override CompiledKernel CreateKernel (EntryPoint entryPoint, CompiledKernel.KernelInfo kernelInfo, StringBuilder builder, PTXCodeGenerator.GeneratorArgs data)
 Creates a new PTXCompiledKernel and initializes all debug information sections. More...
 
- Protected Member Functions inherited from ILGPU.Backends.CodeGeneratorBackend< PTXIntrinsic.Handler, PTXCodeGenerator.GeneratorArgs, PTXCodeGenerator, StringBuilder >
 CodeGeneratorBackend (Context context, BackendType backendType, BackendFlags backendFlags, ArgumentMapper argumentMapper)
 Constructs a new generic backend. More...
 
sealed override CompiledKernel Compile (EntryPoint entryPoint, in BackendContext backendContext, in KernelSpecialization specialization)
 Compiles a new kernel using parallel processing. More...
 
abstract TKernelBuilder CreateKernelBuilder (EntryPoint entryPoint, in BackendContext backendContext, in KernelSpecialization specialization, out T data)
 Creates the main kernel builder and initializes all required information. More...
 
abstract TCodeGenerator CreateFunctionCodeGenerator (Method method, Allocas allocas, T data)
 Creates a new function-code generator. More...
 
abstract TCodeGenerator CreateKernelCodeGenerator (in AllocaKindInformation sharedAllocations, Method method, Allocas allocas, T data)
 Creates a new kernel-code generator. More...
 
abstract CompiledKernel CreateKernel (EntryPoint entryPoint, CompiledKernel.KernelInfo kernelInfo, TKernelBuilder builder, T data)
 Creates the final compiled kernel instance. More...
 

Properties

PTXArchitecture Architecture [get]
 Returns the current architecture. More...
 
PTXInstructionSet InstructionSet [get]
 Returns the current instruction set. More...
 

Detailed Description

Represents a PTX (Cuda) backend.

Constructor & Destructor Documentation

ILGPU.Backends.PTX.PTXBackend.PTXBackend ( Context  context,
PTXArchitecture  architecture,
PTXInstructionSet  instructionSet 
)

Constructs a new Cuda backend.

Parameters
contextThe context to use.
architectureThe target GPU architecture.
instructionSetThe target GPU instruction set.

Member Function Documentation

override PTXCodeGenerator ILGPU.Backends.PTX.PTXBackend.CreateFunctionCodeGenerator ( Method  method,
Allocas  allocas,
PTXCodeGenerator.GeneratorArgs  data 
)
protected

Creates a new PTXFunctionGenerator.

override CompiledKernel ILGPU.Backends.PTX.PTXBackend.CreateKernel ( EntryPoint  entryPoint,
CompiledKernel.KernelInfo  kernelInfo,
StringBuilder  builder,
PTXCodeGenerator.GeneratorArgs  data 
)
protected

Creates a new PTXCompiledKernel and initializes all debug information sections.

override StringBuilder ILGPU.Backends.PTX.PTXBackend.CreateKernelBuilder ( EntryPoint  entryPoint,
in BackendContext  backendContext,
in KernelSpecialization  specialization,
out PTXCodeGenerator.GeneratorArgs  data 
)
protected

Creates a new PTX-compatible kernel builder and initializes a PTXCodeGenerator.GeneratorArgs instance.

override PTXCodeGenerator ILGPU.Backends.PTX.PTXBackend.CreateKernelCodeGenerator ( in AllocaKindInformation  sharedAllocations,
Method  method,
Allocas  allocas,
PTXCodeGenerator.GeneratorArgs  data 
)
protected

Creates a new PTXFunctionGenerator.

Member Data Documentation

new PTXArgumentMapper ILGPU.Backends.PTX.PTXBackend.ArgumentMapper
Initial value:
=>
base.ArgumentMapper as PTXArgumentMapper

Returns the associated Backend.ArgumentMapper.

const int ILGPU.Backends.PTX.PTXBackend.DefaultGlobalMemoryAlignment = 256

Returns the default global memory alignment in bytes.

See Cuda documentation section 5.3.2.

const int ILGPU.Backends.PTX.PTXBackend.WarpSize = 32

Returns the warp size.

Property Documentation

PTXArchitecture ILGPU.Backends.PTX.PTXBackend.Architecture
get

Returns the current architecture.

PTXInstructionSet ILGPU.Backends.PTX.PTXBackend.InstructionSet
get

Returns the current instruction set.


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