fft_height(height),
convolve_width(width),
convolve_height(height),
- pixel_data(NULL)
+ pixel_data(nullptr)
{
register_int("fft_width", &fft_width);
register_int("fft_height", &fft_height);
check_error();
if (texture_num == 0) {
- assert(pixel_data != NULL);
+ assert(pixel_data != nullptr);
// Do the FFT. Our FFTs should typically be small enough and
// the data changed often enough that FFTW_ESTIMATE should be
// Convert to fp16.
fp16_int_t *kernel = new fp16_int_t[fft_width * fft_height * 2];
for (int i = 0; i < fft_width * fft_height; ++i) {
- kernel[i * 2 + 0] = fp64_to_fp16(out[i][0]);
- kernel[i * 2 + 1] = fp64_to_fp16(out[i][1]);
+ kernel[i * 2 + 0] = fp32_to_fp16(out[i][0]);
+ kernel[i * 2 + 1] = fp32_to_fp16(out[i][1]);
}
// (Re-)upload the texture.