The OpenD Programming Language

ldc.dcompute

Contains compiler-recognized special symbols for dcompute.

Members

Enums

CompileFor
enum CompileFor

Readability aliases for compute

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.

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

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