ldc.dcompute

Contains compiler-recognized special symbols for dcompute.

Members

Aliases

Constant
alias Constant(T) = Variable!(AddrSpace.Constant, T)
Undocumented in source.
ConstantPointer
alias ConstantPointer(T) = Pointer!(AddrSpace.Constant, immutable(T))
Undocumented in source.
GenericPointer
alias GenericPointer(T) = Pointer!(AddrSpace.Generic, T)
Undocumented in source.
Global
alias Global(T) = Variable!(AddrSpace.Global, T)
Undocumented in source.
GlobalPointer
alias GlobalPointer(T) = Pointer!(AddrSpace.Global, T)
Undocumented in source.
PrivatePointer
alias PrivatePointer(T) = Pointer!(AddrSpace.Private, T)
Undocumented in source.
Shared
alias Shared(T) = Variable!(AddrSpace.Shared, T)
Undocumented in source.
SharedPointer
alias SharedPointer(T) = Pointer!(AddrSpace.Shared, T)
Undocumented in source.

Enums

AddrSpace
enum AddrSpace
Undocumented in source.
CompileFor
enum CompileFor

Readability aliases for compute

ReflectTarget
enum ReflectTarget
Undocumented in source.

Functions

__dcompute_reflect
bool __dcompute_reflect(ReflectTarget t, uint _version)

The pseudo conditional compilation function. returns true if t and _version match the target and it's version. think __ctfe but per target, codegen time conditional compilation. as oppsed to compiletime/runtime. arguments MUST be compiletime constants valid values of _version are for OpenCL 100 110 120 200 210 and for CUDA are x*100 + y*10 for x any valid values of sm x.y use 0 as a wildcard to match any version.

Manifest constants

kernel
enum kernel;
Undocumented in source.

Structs

Pointer
struct Pointer(AddrSpace as, T)

DCompute has the notion of adress spaces, provide by the magic structs below. The numbers are for the DCompute virtual addess space and are translated into the correct address space for each DCompute backend (SPIRV, NVPTX). The table below shows the equivalent annotation between DCompute OpenCL and CUDA

Variable
struct Variable(AddrSpace as, T)
Undocumented in source.
compute
struct compute

When applied to a module, specifies that the module should be compiled for dcompute (-mdcompute-targets=<...>) using the NVPTX and/or SPIRV backends of LLVM.

Meta

Authors

Nicholas Wilson