FUTHARK-MULTICORE(1) Futhark FUTHARK-MULTICORE(1)

futhark-multicore - compile Futhark to multithreaded C

futhark multicore [options...] <program.fut>

futhark multicore translates a Futhark program to multithreaded C code, and either compiles that C code with a C compiler to an executable binary program, or produces a .h and .c file that can be linked with other code. The standard Futhark optimisation pipeline is used.

The resulting program will read the arguments to the entry point (main by default) from standard input and print its return value on standard output. The arguments are read and printed in Futhark syntax.

Accepts the same options as futhark-c.

CC

The C compiler used to compile the program. Defaults to cc if unset.


CFLAGS

Space-separated list of options passed to the C compiler. Defaults to -O3 -std=c99 -pthread if unset.


Generated executables accept the same options as those generated by futhark-c. The following additional options are accepted.

Use this many physical threads.

Currently works only on Unix-like systems because of a dependency on pthreads. Adding support for Windows would likely not be difficult.

futhark-c, futhark-test

2013-2020, DIKU, University of Copenhagen

January 6, 2025 0.25.23