@@ -48,7 +48,7 @@ The current ARTIQ compiler only allocates on the stack as explained in [this iss
...
@@ -48,7 +48,7 @@ The current ARTIQ compiler only allocates on the stack as explained in [this iss
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. 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. 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. 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.
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. It is possible to return locally created `range()` objects and list objects that are on the heap.