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

Public Member Functions

const std::vector< binding * > input_bindings (bool fuse_prelu)
 GLScale (const int _channels, const float *_scale, const float *_bias, const float *_prelu_scale=nullptr, const int _prelu_size=0)
template<typename T >
void scale_and_shift (const GLImage< T > *input_image, const GLImage< T > *avg_image, const GLImage< T > *norm_image, const GLImage< T > *output_image)
- 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

binding * outputSize
binding * inputData
binding * averageData
binding * normData
binding * scale_factor
binding * bias_factor
binding * prelu_scale_factor
const int channels
const float * scale
const float * bias
const float * prelu_scale
const int prelu_size

Static Public Attributes

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

Additional Inherited Members

- Public Types inherited from GLFilter
typedef std::vector< std::pair< std::string, std::string > > replacements_t
- 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 181 of file

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