Caffe2 - C++ API
A deep learning, cross platform ML framework
Public Types | Public Member Functions | Data Fields | Static Public Attributes
GLPRelu Class Reference
Inheritance diagram for GLPRelu:
GLFilter

Public Types

enum  ReluType { PRelu = 0, Relu = 1 }
 
- Public Types inherited from GLFilter
typedef std::vector< std::pair< std::string, std::string > > replacements_t
 

Public Member Functions

 GLPRelu (const float *_scale, const int _scale_size, const int _channels, int _output_tile_x, int _output_tile_y, int _output_tile_width, int _output_tile_height)
 
 GLPRelu (const int _channels)
 
template<typename T >
void prelu (const GLImageVector< T > &input_images, const GLImageVector< T > &output_images, GLPRelu::ReluType reluType)
 
- Public Member Functions inherited from GLFilter
 GLFilter (const std::string kernel_name, const std::string vertex_shader, const std::string fragment_shader, const std::vector< binding * > uniforms, const std::vector< binding * > uniform_blocks={}, const std::vector< binding * > attributes={}, const replacements_t &replacements={})
 
void throwRuntimeError (std::function< void(std::stringstream &errmsg)> error_formatter) const
 
void checkGLError (std::function< void(std::stringstream &errmsg)> error_formatter) const
 
template<typename T >
void attach_uniform_buffer (const binding *block, GLuint bindingPoint, std::function< void(T *, size_t)> loader)
 
void run (const std::vector< texture_attachment > &input, const std::vector< const GLTexture * > &output, std::function< void(void)> uniforms_initializer, int width, int height)
 
void releaseBuffers ()
 
void deleteProgram ()
 
void deleteBindings ()
 

Data Fields

const float * scale
 
bindinginputData
 
bindingscale_block
 
const int scale_size
 
const int channels
 
const int output_tile_x
 
const int output_tile_y
 
const int output_tile_width
 
const int output_tile_height
 

Static Public Attributes

static const char * fragment_shader
 
- Static Public Attributes inherited from GLFilter
static const char * vertex_shader
 

Additional Inherited Members

- Protected Attributes inherited from GLFilter
const std::string kernel_name
 
GLuint program = 0
 
GLuint frameBuffer = 0
 
GLuint uniformBlock [kMaxUniformBlocks] = {0}
 
GLint blockSize [kMaxUniformBlocks] = {0}
 
bool frame_buffer_initialized = false
 
- Static Protected Attributes inherited from GLFilter
static constexpr int kMaxUniformBlocks = 12
 
static constexpr bool check_opengl_errors = true
 

Detailed Description

Definition at line 11 of file GLPRelu.cc.


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