AccelerateHS / AccelerateHS/accelerate
Clean up the internal AST
- Lenguaje dominante
- Haskell
- Estrellas
- 1k
- Forks
- 135
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
Accelerate's internal AST has accrued some redundant terms in the AST over its lifetime, which might be good to consolidate.
- `Replicate` and `Slice` are effectively moved to the scalar language via `IndexFull` and `IndexSlice` respectively. There may be an argument for leaving these forms in if we can optimise them into a `memcpy`, say, but typically we want them to be fused into other operations, hence the scalar varieties.
- `Transform` is the combination of `Map` and `Backpermute`. It could probably do with a better name as well. `Map` is probably good to keep as it is simpler to implement, and does not require multidimensional indices. Also `unzip*` is expressed in terms of `map` which makes it relatively easy for a backend to execute `unzipN` in constant time (although this is not currently done).
- `ZipWith` could be expressed in terms of `Generate`, which is what the fusion transform does, but maybe there are advantages to keeping it separate? Because of intersection semantics we can't do the same linear-indexing tricks as `Map`, and doesn't allow us to do `zipN` in constant time. Having a pathway to support constant time `zipN` might be good.
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.