|
| GLSigmoid (OpType opType) |
|
template<typename T > |
void | sigmoid (const GLImageVector< T > &input_images, const GLImageVector< T > &output_images) |
|
| 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 () |
|
|
static const char * | fragment_shader |
|
static const char * | vertex_shader |
|
|
typedef std::vector< std::pair< std::string, std::string > > | replacements_t |
|
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 constexpr int | kMaxUniformBlocks = 12 |
|
static constexpr bool | check_opengl_errors = true |
|
Definition at line 13 of file GLSigmoid.cc.
const char * GLSigmoid::fragment_shader |
|
static |
Initial value:= R"GLSL(#version 300 es
#define SIGMOID $(SIGMOID)
#define TANH $(TANH)
precision mediump float;
precision mediump int;
in highp vec2 v_texCoord;
uniform ivec2 outputSize;
TEXTURE_INPUT(inputData);
TEXTURE_OUTPUT(0, outputData);
void main() {
ivec2 texelCoord = ivec2(v_texCoord * vec2(outputSize));
vec4 value = TEXTURE_LOAD(inputData, ivec2(texelCoord));
#if SIGMOID
value = vec4(1.0) / (vec4(1.0) + exp(-value));
outputData = TEXTURE_STORE(value);
#elif TANH
value = tanh(value);
outputData = TEXTURE_STORE(value);
#endif
}
)GLSL"
Definition at line 31 of file GLSigmoid.cc.
The documentation for this class was generated from the following file: