Halide::Internal::CodeGen_D3D12Compute_Dev Class Reference

#include <CodeGen_D3D12Compute_Dev.h>

Inherits Halide::Internal::CodeGen_GPU_Dev.


class  CodeGen_D3D12Compute_C

Public Member Functions

 CodeGen_D3D12Compute_Dev (Target target)
void add_kernel (Stmt stmt, const std::string &name, const std::vector< DeviceArgument > &args) override
 Compile a GPU kernel into the module. More...
void init_module () override
 (Re)initialize the GPU kernel module. More...
std::vector< char > compile_to_src () override
std::string get_current_kernel_name () override
void dump () override
std::string print_gpu_name (const std::string &name) override
 Returns the specified name transformed by the variable naming rules for the GPU language backend. More...
std::string api_unique_name () override
 This routine returns the GPU API name that is combined into runtime routine names to ensure each GPU API has a unique name. More...
- Public Member Functions inherited from Halide::Internal::CodeGen_GPU_Dev
virtual ~CodeGen_GPU_Dev ()
virtual bool kernel_run_takes_types () const
 Allows the GPU device specific code to request halide_type_t values to be passed to the kernel_run routine rather than just argument type sizes. More...

Protected Attributes

std::ostringstream src_stream
std::string cur_kernel_name
CodeGen_D3D12Compute_C d3d12compute_c

Additional Inherited Members

- Public Types inherited from Halide::Internal::CodeGen_GPU_Dev
enum  MemoryFenceType { None = 0, Device = 1, Shared = 2 }
 An mask describing which type of memory fence to use for the gpu_thread_barrier() intrinsic. More...
- Static Public Member Functions inherited from Halide::Internal::CodeGen_GPU_Dev
static bool is_gpu_var (const std::string &name)
static bool is_gpu_block_var (const std::string &name)
static bool is_gpu_thread_var (const std::string &name)
static bool is_block_uniform (const Expr &expr)
 Checks if expr is block uniform, i.e. More...
static bool is_buffer_constant (const Stmt &kernel, const std::string &buffer)
 Checks if the buffer is a candidate for constant storage. More...

Detailed Description

Definition at line 17 of file CodeGen_D3D12Compute_Dev.h.

Constructor & Destructor Documentation

◆ CodeGen_D3D12Compute_Dev()

Halide::Internal::CodeGen_D3D12Compute_Dev::CodeGen_D3D12Compute_Dev ( Target  target)

Member Function Documentation

◆ add_kernel()

void Halide::Internal::CodeGen_D3D12Compute_Dev::add_kernel ( Stmt  stmt,
const std::string &  name,
const std::vector< DeviceArgument > &  args 

Compile a GPU kernel into the module.

This may be called many times with different kernels, which will all be accumulated into a single source module shared by a given Halide pipeline.

Implements Halide::Internal::CodeGen_GPU_Dev.

◆ init_module()

void Halide::Internal::CodeGen_D3D12Compute_Dev::init_module ( )

(Re)initialize the GPU kernel module.

This is separate from compile, since a GPU device module will often have many kernels compiled into it for a single pipeline.

Implements Halide::Internal::CodeGen_GPU_Dev.

◆ compile_to_src()

std::vector<char> Halide::Internal::CodeGen_D3D12Compute_Dev::compile_to_src ( )

◆ get_current_kernel_name()

std::string Halide::Internal::CodeGen_D3D12Compute_Dev::get_current_kernel_name ( )

◆ dump()

void Halide::Internal::CodeGen_D3D12Compute_Dev::dump ( )

◆ print_gpu_name()

std::string Halide::Internal::CodeGen_D3D12Compute_Dev::print_gpu_name ( const std::string &  name)

Returns the specified name transformed by the variable naming rules for the GPU language backend.

Used to determine the name of a parameter during host codegen.

Implements Halide::Internal::CodeGen_GPU_Dev.

◆ api_unique_name()

std::string Halide::Internal::CodeGen_D3D12Compute_Dev::api_unique_name ( )

This routine returns the GPU API name that is combined into runtime routine names to ensure each GPU API has a unique name.

Implements Halide::Internal::CodeGen_GPU_Dev.

Definition at line 41 of file CodeGen_D3D12Compute_Dev.h.

Member Data Documentation

◆ src_stream

std::ostringstream Halide::Internal::CodeGen_D3D12Compute_Dev::src_stream

Definition at line 95 of file CodeGen_D3D12Compute_Dev.h.

◆ cur_kernel_name

std::string Halide::Internal::CodeGen_D3D12Compute_Dev::cur_kernel_name

Definition at line 96 of file CodeGen_D3D12Compute_Dev.h.

◆ d3d12compute_c

CodeGen_D3D12Compute_C Halide::Internal::CodeGen_D3D12Compute_Dev::d3d12compute_c

Definition at line 97 of file CodeGen_D3D12Compute_Dev.h.

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