Halide::Internal::CodeGen_OpenGL_Dev Class Reference

#include <CodeGen_OpenGL_Dev.h>

Inherits Halide::Internal::CodeGen_GPU_Dev.

Public Member Functions

 CodeGen_OpenGL_Dev (const Target &target)
 ~CodeGen_OpenGL_Dev () override
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 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...

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 20 of file CodeGen_OpenGL_Dev.h.

Constructor & Destructor Documentation

◆ CodeGen_OpenGL_Dev()

Halide::Internal::CodeGen_OpenGL_Dev::CodeGen_OpenGL_Dev ( const Target target)

◆ ~CodeGen_OpenGL_Dev()

Halide::Internal::CodeGen_OpenGL_Dev::~CodeGen_OpenGL_Dev ( )

Member Function Documentation

◆ add_kernel()

void Halide::Internal::CodeGen_OpenGL_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_OpenGL_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_OpenGL_Dev::compile_to_src ( )

◆ get_current_kernel_name()

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

◆ dump()

void Halide::Internal::CodeGen_OpenGL_Dev::dump ( )

◆ api_unique_name()

std::string Halide::Internal::CodeGen_OpenGL_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 37 of file CodeGen_OpenGL_Dev.h.

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