File: futhark-ispc.rst

package info (click to toggle)
haskell-futhark 0.25.32-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 18,236 kB
  • sloc: haskell: 100,484; ansic: 12,100; python: 3,440; yacc: 785; sh: 561; javascript: 558; lisp: 399; makefile: 277
file content (70 lines) | stat: -rw-r--r-- 1,503 bytes parent folder | download | duplicates (2)
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
66
67
68
69
70
.. role:: ref(emphasis)

.. _futhark-ispc(1):

============
futhark-ispc
============

SYNOPSIS
========

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

DESCRIPTION
===========

``futhark ispc`` translates a Futhark program to a combination of C
and ISPC code, with ISPC used for parallel loops.  It otherwise
operates similarly to :ref:`futhark-multicore(1)`.  You need to have
``ispc`` on your ``PATH``.

OPTIONS
=======

Accepts the same options as :ref:`futhark-multicore(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.

``ISPCFLAGS``

  Space-separated list of options passed to ``ispc``.  Defaults to
  ``-O3 --woff`` if unset.

EXECUTABLE OPTIONS
==================

Generated executables accept the same options as those generated by
:ref:`futhark-multicore(1)`.

LIBRARY USAGE
=============

When compiling a program ``foo.fut`` with ``futhark ispc --library``,
a ``foo.kernels.ispc`` file is produced that must be compiled with
``ispc`` and linked with the final program. For example::

  $ ispc -o foo.kernels.o foo.kernels.ispc --addressing=64 --pic --woff -O3

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-multicore(1)`, :ref:`futhark-test(1)`