* `dph-prim-seq`[[br]] Flat arrays, and sequential operators on them. Most sequential operators that we used are supplied by `Data.Vector`, but `dph-prim-seq` adds segmented operators that are only useful in the context of nested data parallelism. This package also defines the segment descriptor types, that are also used to implement nested arrays. Flat arrays are also referred to as "unlifted arrays", so this library is also called the "unlifted primitive library".

* The flags `-fdph-seq` and `-fdph-par` add `-package dph-seq` and `-package-dph-par`, respectively, so that the user can `import Data.Array.Parallel` and friends. And so that the right package gets linked in the link step.

33

* The flags `-fdph-seq` and `-fdph-par` add `-package dph-seq` and `-package dph-par`. These packages contain the types and functions that vectorised code uses. They are produced by compiling `dph-common` against either the `dph-prim-seq` or `dph-prim-par` packages respectively. They also contain the array functions visible to used code via `import Data.Array.Parallel`.

34

34

35

* The flag `-fvectorise` runs a special pass called the '''vectoriser'''.

36

* The vectoriser generates code that mentions (by Original Name) various functions defined in `dph-prim-seq` or `dph-prim-par` (depending on the compiler flag used). So if you change where a function is defined in `dph-prim-*`, or the name of the function, you have to make a corresponding change in GHC.

37

* The vectoriser knows quite a lot about the internal working of the library. For instance, it knows about the array representation.

38

* Parts of the library are vectorised and since these are low-level parts, they rely on being vectorised in particular ways. This means that a particular version of the library will only work correctly with a particular version of the vectoriser and vice versa. '''SLPJ: can you be more precise here? Which packages are vectorised? What do you meean by "particular ways"?'''

35

* The vectoriser only generates names exported by dph-common (via either dph-par or dph-seq). It does not use the `dph-prim-interface` API directly.

39

36

40

41

'''SLPJ: is it correct that GHC only generates Names in dph-prim? If not, could it be made true?'''