diff options
Diffstat (limited to 'fractal-gen.c')
-rw-r--r-- | fractal-gen.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/fractal-gen.c b/fractal-gen.c new file mode 100644 index 0000000..117e2ca --- /dev/null +++ b/fractal-gen.c @@ -0,0 +1,31 @@ +#include <stdio.h> + +#include "trampoline.h" + +int main() { + fprintf(stderr, "Building CL trampoline... "); + if (tramp_init()) { + fprintf(stderr, "Failed.\n"); + return 1; + } + fprintf(stderr, "Done.\n"); + + fprintf(stderr, "Loading kernel source from file... "); + if (tramp_load_kernel("test.cl")) { + fprintf(stderr, "Failed.\n"); + return 1; + } + fprintf(stderr, "Loaded.\n"); + + fprintf(stderr, "Compiling kernel source... "); + if (tramp_compile_kernel()) { + fprintf(stderr, "Failed:\n%s\n", tramp_get_build_log()); + return 1; + } + fprintf(stderr, "Compiled.\n"); + + fprintf(stderr, "Destroying CL trampoline... "); + tramp_destroy(); + fprintf(stderr, "Blown to smitherines.\n"); + return 0; +} |