1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
|
.. role:: ref(emphasis)
.. _futhark-multicore(1):
=================
futhark-multicore
=================
SYNOPSIS
========
futhark multicore [options...] <program.fut>
DESCRIPTION
===========
``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.
OPTIONS
=======
Accepts the same options as :ref:`futhark-c(1)`.
ENVIRONMENT VARIABLES
=====================
``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.
EXECUTABLE OPTIONS
==================
Generated executables accept the same options as those generated by
:ref:`futhark-c(1)`. The following additional options are accepted.
--num-threads=INT
Use this many physical threads.
BUGS
====
Currently works only on Unix-like systems because of a dependency on
pthreads. Adding support for Windows would likely not be difficult.
SEE ALSO
========
:ref:`futhark-c(1)`, :ref:`futhark-test(1)`
|