Caffe2 - C++ API
A deep learning, cross platform ML framework
Data Structures | Public Types | Public Member Functions | Data Fields
GLPool Class Reference

Copyright (c) 2016-present, Facebook, Inc. More...

Inheritance diagram for GLPool:
GLFilter

Data Structures

struct  descriptor
 
struct  point
 

Public Types

enum  PoolType { AveragePool, MaxPool }
 
- Public Types inherited from GLFilter
typedef std::vector< std::pair< std::string, std::string > > replacements_t
 

Public Member Functions

 GLPool (const descriptor &_geometry, PoolType poolType, bool _tiling)
 
void pool (const GLImageVector< float16_t > &input_images, const GLImageVector< float16_t > &output_images)
 
- 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={})
 Copyright (c) 2016-present, Facebook, Inc. More...
 
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

bindinginputData
 
bindingkernelSize
 
bindingoutputSize
 
const descriptor geometry
 

Additional Inherited Members

- Static Public Attributes inherited from GLFilter
static const char * vertex_shader
 
- 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

Copyright (c) 2016-present, Facebook, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Definition at line 25 of file GLPool.cc.


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