Revision a34d00d3fc0cffa8c80548051f5bbd901d0260a5 authored by Alex Reinking on 02 December 2020, 22:44:43 UTC, committed by GitHub on 02 December 2020, 22:44:43 UTC
* Add fft build * Fix properties * Fix generator argument * Add "Success!" message to fft aot test. * Formatting. * Fix target directory for bench_fft
1 parent f47c5c9
broken_promise.cpp
#include "Halide.h"
using namespace Halide;
int main(int argc, char **argv) {
Buffer<uint16_t> ten_bit_data(100);
for (int i = 0; i < 100; i++) {
ten_bit_data(i) = i * 20;
}
Buffer<float> ten_bit_lut(1024);
for (int i = 0; i < 1024; i++) {
ten_bit_lut(i) = sin(2 * 3.1415f * i / 1024.0f);
}
Var x;
Func f;
ImageParam in(UInt(16), 1);
ImageParam lut(Float(32), 1);
f(x) = lut(unsafe_promise_clamped(in(x), 0, 1023));
lut.dim(0).set_bounds(0, 1024);
in.set(ten_bit_data);
lut.set(ten_bit_lut);
auto result = f.realize(100, get_jit_target_from_environment().with_feature(Target::CheckUnsafePromises));
printf("Success!\n");
return 0;
}
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...