Update Python subset for kernels authored by Leon Riesebos's avatar Leon Riesebos
......@@ -34,7 +34,7 @@ More information about kernel performance optimizations can be found at the [RTI
List types are supported but there is *limited support for dynamic memory handling*.
The current ARTIQ compiler only allocates on the stack as explained in [this issue](https://github.com/m-labs/artiq/issues/1298).
1. Numpy array types, simple list comprehensions, and the `list()` function are supported in kernels.
1. Numpy array types, simple list comprehensions, and the `list()` function are supported in kernels. Numpy arrays are often preferred since the compiler does not have to perform type checking on every element.
1. All lists/arrays have a *fixed type* at kernel runtime. The size of lists can be determined at runtime.
1. Iterating over lists with complex types (e.g. device drivers) is possible.
1. Returning dynamically created lists in kernel functions is not possible because of limited support of dynamic memory. E.g. `return [i for i in range(10)]` is not possible in a kernel function because the list is allocated on the stack and will be deallocated when leaving the function scope.
......
......