1 #ifndef HALIDE_CODEGEN_GPU_DEV_H
2 #define HALIDE_CODEGEN_GPU_DEV_H
24 const std::string &name,
25 const std::vector<DeviceArgument> &args) = 0;
Defines helpers for passing arguments to separate devices, such as GPUs.
Base classes for Halide expressions (Halide::Expr) and statements (Halide::Internal::Stmt)
This file defines the class FunctionDAG, which is our representation of a Halide pipeline,...
@ Internal
Not visible externally, similar to 'static' linkage in C.
A fragment of Halide syntax.
A code generator that emits GPU code from a given Halide stmt.
static bool is_gpu_thread_var(const std::string &name)
static bool is_gpu_var(const std::string &name)
virtual void init_module()=0
(Re)initialize the GPU kernel module.
static bool is_gpu_block_var(const std::string &name)
static bool is_block_uniform(const Expr &expr)
Checks if expr is block uniform, i.e.
MemoryFenceType
An mask describing which type of memory fence to use for the gpu_thread_barrier() intrinsic.
virtual std::vector< char > compile_to_src()=0
virtual ~CodeGen_GPU_Dev()
virtual std::string get_current_kernel_name()=0
virtual std::string print_gpu_name(const std::string &name)=0
Returns the specified name transformed by the variable naming rules for the GPU language backend.
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 ro...
virtual std::string api_unique_name()=0
This routine returns the GPU API name that is combined into runtime routine names to ensure each GPU ...
static bool is_buffer_constant(const Stmt &kernel, const std::string &buffer)
Checks if the buffer is a candidate for constant storage.
virtual void add_kernel(Stmt stmt, const std::string &name, const std::vector< DeviceArgument > &args)=0
Compile a GPU kernel into the module.
A reference-counted handle to a statement node.