| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
I'd still prefer if a native english speaker would check them.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
- (->), [::], & PArray are now vectorised via pragmas (and related clean up)
- Repeatedly vectorising a variable or type constructor now raises an error
|
| |
|
|
|
|
| |
Also give a civilised error message when the data type to vectorised contains no data.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* if -XParallelArrays is given, the symbols for the desugarer are
taken from 'Data.Array.Parallel' (from whichever package is
exposed and has the module — the home package is fine, too)
* if -fvectorise is given, the symbols for the vectoriser are
taken from 'Data.Array.Parallel.Prim' (as above)
(There is one wired in symbol left, namely the data constructor
'base:GHC.PArr.[::]. It'll die another day.)
|
|
|
|
| |
Kudos to Ben Lippmeier for suggesting this change
|
|
|
|
|
|
| |
* No more use of hardcoded original names
* Initialisation of the desugarer monad loads 'Data.Array.Parallel.Prim' if -fdph-* given
* Initialisation of the vectoriser gets all built-in names from there
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Basically as documented in http://hackage.haskell.org/trac/ghc/wiki/KindFact,
this patch adds a new kind Constraint such that:
Show :: * -> Constraint
(?x::Int) :: Constraint
(Int ~ a) :: Constraint
And you can write *any* type with kind Constraint to the left of (=>):
even if that type is a type synonym, type variable, indexed type or so on.
The following (somewhat related) changes are also made:
1. We now box equality evidence. This is required because we want
to give (Int ~ a) the *lifted* kind Constraint
2. For similar reasons, implicit parameters can now only be of
a lifted kind. (?x::Int#) => ty is now ruled out
3. Implicit parameter constraints are now allowed in superclasses
and instance contexts (this just falls out as OK with the new
constraint solver)
Internally the following major changes were made:
1. There is now no PredTy in the Type data type. Instead
GHC checks the kind of a type to figure out if it is a predicate
2. There is now no AClass TyThing: we represent classes as TyThings
just as a ATyCon (classes had TyCons anyway)
3. What used to be (~) is now pretty-printed as (~#). The box
constructor EqBox :: (a ~# b) -> (a ~ b)
4. The type LCoercion is used internally in the constraint solver
and type checker to represent coercions with free variables
of type (a ~ b) rather than (a ~# b)
|
| |
|
|
|
|
|
|
|
|
|
| |
- Pragma to determine how a given type is vectorised
- At this stage only the VECTORISE SCALAR variant is used by the vectoriser.
- '{-# VECTORISE SCALAR type t #-}' implies that 't' cannot contain parallel arrays and may be used in vectorised code. However, its constructors can only be used in scalar code. We use this, e.g., for 'Int'.
- May be used on imported types
See also http://hackage.haskell.org/trac/ghc/wiki/DataParallel/VectPragma
|
| |
|
| |
|
| |
|
|
|
|
| |
toplevel variable 'f'.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
See the paper "Practical aspects of evidence based compilation in System FC"
* Coercion becomes a data type, distinct from Type
* Coercions become value-level things, rather than type-level things,
(although the value is zero bits wide, like the State token)
A consequence is that a coerion abstraction increases the arity by 1
(just like a dictionary abstraction)
* There is a new constructor in CoreExpr, namely Coercion, to inject
coercions into terms
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Added a pragma {-# VECTORISE var = exp #-} that prevents
the vectoriser from vectorising the definition of 'var'.
Instead it uses the binding '$v_var = exp' to vectorise
'var'. The vectoriser checks that the Core type of 'exp'
matches the vectorised Core type of 'var'. (It would be
quite complicated to perform that check in the type checker
as the vectorisation of a type needs the state of the VM
monad.)
- Added parts of a related VECTORISE SCALAR pragma
- Documented -ddump-vect
- Added -ddump-vt-trace
- Some clean up
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It now says:
ghc-stage2: sorry! (this is work in progress)
(GHC version 7.1.20101028 for i386-apple-darwin):
Vectorise.Builtins.indexBuiltin
DPH builtin function 'sumTyCon' of size '11' is not yet implemented.
This function does not appear in your source program, but it is needed
to compile your code in the backend. This is a known, current limitation
of DPH. If you want it to to work you should send mail to cvs-ghc@haskell.org
and ask what you can do to help (it might involve some GHC hacking).
I added 'pprSorry' that behaves like 'pprPanic' except it say sorry! instead
of panic!, and doesn't ask the user to report a bug.
|
| |
|
| |
|
|
|