forked from M-Labs/artiq
doc: fix table formatting problem, add 'string constant' as supported compiler type
This commit is contained in:
parent
043780d603
commit
b4f3be7e1b
@ -13,6 +13,7 @@ A number of Python features can be used inside a kernel for compilation and exec
|
|||||||
* 64-bit signed integers (use ``numpy.int64`` to convert)
|
* 64-bit signed integers (use ``numpy.int64`` to convert)
|
||||||
* Double-precision floating point numbers
|
* Double-precision floating point numbers
|
||||||
* Lists of any supported types
|
* Lists of any supported types
|
||||||
|
* String constants
|
||||||
* User-defined classes, with attributes of any supported types (attributes that are not used anywhere in the kernel are ignored)
|
* User-defined classes, with attributes of any supported types (attributes that are not used anywhere in the kernel are ignored)
|
||||||
|
|
||||||
For a demonstration of some of these features, see the ``mandelbrot.py`` example.
|
For a demonstration of some of these features, see the ``mandelbrot.py`` example.
|
||||||
@ -29,29 +30,29 @@ Kernel code can call host functions without any additional ceremony. However, su
|
|||||||
|
|
||||||
The Python types correspond to ARTIQ type annotations as follows:
|
The Python types correspond to ARTIQ type annotations as follows:
|
||||||
|
|
||||||
+-------------+-------------------------+
|
+---------------+-------------------------+
|
||||||
| Python | ARTIQ |
|
| Python | ARTIQ |
|
||||||
+=============+=========================+
|
+===============+=========================+
|
||||||
| NoneType | TNone |
|
| NoneType | TNone |
|
||||||
+-------------+-------------------------+
|
+-------------+---------------------------+
|
||||||
| bool | TBool |
|
| bool | TBool |
|
||||||
+-------------+-------------------------+
|
+-------------+---------------------------+
|
||||||
| int | TInt32 or TInt64 |
|
| int | TInt32 or TInt64 |
|
||||||
+-------------+-------------------------+
|
+-------------+---------------------------+
|
||||||
| float | TFloat |
|
| float | TFloat |
|
||||||
+-------------+-------------------------+
|
+-------------+---------------------------+
|
||||||
| str | TStr |
|
| str | TStr |
|
||||||
+-------------+-------------------------+
|
+-------------+---------------------------+
|
||||||
| list of T | TList(T) |
|
| list of T | TList(T) |
|
||||||
+-------------+-------------------------+
|
+-------------+---------------------------+
|
||||||
| range | TRange32, TRange64 |
|
| range | TRange32, TRange64 |
|
||||||
+-------------+-------------------------+
|
+-------------+---------------------------+
|
||||||
| numpy.int32 | TInt32 |
|
| numpy.int32 | TInt32 |
|
||||||
+-------------+-------------------------+
|
+-------------+---------------------------+
|
||||||
| numpy.int64 | TInt64 |
|
| numpy.int64 | TInt64 |
|
||||||
+-------------+-------------------------+
|
+-------------+---------------------------+
|
||||||
| numpy.float64 | TFloat |
|
| numpy.float64 | TFloat |
|
||||||
+-------------+-------------------------+
|
+-------------+---------------------------+
|
||||||
|
|
||||||
Pitfalls
|
Pitfalls
|
||||||
--------
|
--------
|
||||||
|
Loading…
Reference in New Issue
Block a user