Closed timmeinhardt closed 3 years ago
Solving a problem with the least_squares prox function in Halide implementation modus throws the following errors during compilation:
least_squares
`../ProxImaL/build/lib/proximal/halide/src/fft2_r2c.cpp:52:71: error: use of undeclared identifier 'WTARGET'
paddedInput = repeat_image( constant_exterior(input, 0.f), 0, WTARGET, 0, HTARGET); ^
../ProxImaL/build/lib/proximal/halide/src/fft2_r2c.cpp:52:83: error: use of undeclared identifier 'HTARGET'
../ProxImaL/build/lib/proximal/halide/src/fft2_r2c.cpp:56:43: error: use of undeclared identifier 'WTARGET'
Func fftIn = fft2_r2c(input_func, WTARGET, HTARGET); ^
../ProxImaL/build/lib/proximal/halide/src/fft2_r2c.cpp:56:52: error: use of undeclared identifier 'HTARGET'
Func fftIn = fft2_r2c(input_func, WTARGET, HTARGET);`
I resolved the error by adding the necessary flags to the compilation in sum_squares.py:
sum_squares.py
hflags = ['-DWTARGET={0} -DHTARGET={1}'.format(self.freq_shape[1], self.freq_shape[0])]
and
Halide('fft2_r2c.cpp', compile_flags=hflags).
Halide('fft2_r2c.cpp', compile_flags=hflags)
If this is a new and unknown error and my solution is correct I am happy to send a PR.
Solving a problem with the
least_squares
prox function in Halide implementation modus throws the following errors during compilation:`../ProxImaL/build/lib/proximal/halide/src/fft2_r2c.cpp:52:71: error: use of undeclared identifier 'WTARGET'
../ProxImaL/build/lib/proximal/halide/src/fft2_r2c.cpp:52:83: error: use of undeclared identifier 'HTARGET'
../ProxImaL/build/lib/proximal/halide/src/fft2_r2c.cpp:56:43: error: use of undeclared identifier 'WTARGET'
../ProxImaL/build/lib/proximal/halide/src/fft2_r2c.cpp:56:52: error: use of undeclared identifier 'HTARGET'
I resolved the error by adding the necessary flags to the compilation in
sum_squares.py
:hflags = ['-DWTARGET={0} -DHTARGET={1}'.format(self.freq_shape[1], self.freq_shape[0])]
and
Halide('fft2_r2c.cpp', compile_flags=hflags)
.If this is a new and unknown error and my solution is correct I am happy to send a PR.