21 #ifndef GLFFT_COMMON_HPP__
22 #define GLFFT_COMMON_HPP__
31 #include <unordered_map>
103 return std::memcmp(
this, &other,
sizeof(
Parameters)) == 0;
146 struct hash<GLFFT::Parameters>
151 hash<uint8_t> hasher;
154 h ^= hasher(reinterpret_cast<const uint8_t*>(¶ms)[i]);
195 GLenum min_filter = GL_NEAREST,
GLenum mag_filter = GL_NEAREST);
197 unsigned x_off,
unsigned y_off,
unsigned width,
unsigned height);
Buffer & operator=(Buffer &&buffer)
GLint GLsizei GLsizei height
void upload(const void *data, GLenum format, GLenum type, unsigned x_off, unsigned y_off, unsigned width, unsigned height)
bool normalize
Whether to apply 1 / N normalization factor.
std::size_t operator()(const GLFFT::Parameters ¶ms) const
Complex-to-real transform. N / 2 + 1 complex values are used per row with a stride of N complex sampl...
void init(unsigned width, unsigned height, unsigned levels, GLenum internal_format, GLenum wrap_s=GL_REPEAT, GLenum wrap_t=GL_REPEAT, GLenum min_filter=GL_NEAREST, GLenum mag_filter=GL_NEAREST)
GLint GLsizei GLsizei GLenum format
bool input_fp16
Whether input SSBO is a packed 2xfp16 format. Otherwise, regular FP32.
GLuint find_program(const Parameters ¶meters) const
Texture & operator=(Texture &&texture)
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
bool fp16
Whether internal shader should be mediump float.
bool operator==(const Parameters &other) const
unsigned workgroup_size_y
unsigned workgroup_size_z
Real-to-complex transform. N / 2 + 1 complex output samples are created per row with a stride of N co...
unsigned workgroup_size_x
Options for FFT implementation. Defaults for performance as conservative.
Program & operator=(Program &&prog)
bool output_fp16
Whether output SSBO is a packed 2xfp16 format. Otherwise, regular FP32.
void init(const void *data, size_t size, GLenum access)
GLfloat GLfloat GLfloat GLfloat h
GL_SHADER_STORAGE_BUFFER.
Regular complex-to-complex transform.
GLenum GLuint GLintptr GLsizeiptr size
size_t cache_size() const
typedef GLenum(GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSKHRPROC)(void)
void insert_program(const Parameters ¶meters, GLuint program)
struct GLFFT::FFTOptions::Type type
typedef GLuint(GL_APIENTRYP PFNGLGETDEBUGMESSAGELOGKHRPROC)(GLuint count
struct GLFFT::FFTOptions::Performance performance
std::unordered_map< Parameters, Program > programs