Portability | non-portable (GHC extensions) |
---|---|
Stability | experimental |
Maintainer | Manuel M T Chakravarty <chak@cse.unsw.edu.au> |
Safe Haskell | None |
The Accelerate AST does not explicitly store much type information. Most of
it is only indirectly through type class constraints -especially, Elt
constraints- available. This module provides functions that reify that
type information in the form of a TupleType
value. This is, for example,
needed to emit type information in a backend.
- type AccType acc = forall aenv sh e. acc aenv (Array sh e) -> TupleType (EltRepr e)
- type AccType2 acc = forall aenv sh1 e1 sh2 e2. acc aenv (Array sh1 e1, Array sh2 e2) -> (TupleType (EltRepr e1), TupleType (EltRepr e2))
- arrayType :: forall sh e. Array sh e -> TupleType (EltRepr e)
- accType :: AccType OpenAcc
- accType2 :: AccType2 OpenAcc
- expType :: OpenExp aenv env t -> TupleType (EltRepr t)
- sizeOf :: TupleType a -> Int
- preAccType :: forall acc aenv sh e. AccType acc -> PreOpenAcc acc aenv (Array sh e) -> TupleType (EltRepr e)
- preAccType2 :: forall acc aenv sh1 e1 sh2 e2. AccType acc -> AccType2 acc -> PreOpenAcc acc aenv (Array sh1 e1, Array sh2 e2) -> (TupleType (EltRepr e1), TupleType (EltRepr e2))
- preExpType :: forall acc aenv env t. AccType acc -> PreOpenExp acc aenv env t -> TupleType (EltRepr t)
Query AST types
type AccType acc = forall aenv sh e. acc aenv (Array sh e) -> TupleType (EltRepr e)Source
Determine the type of an expressions -------------------------------------
type AccType2 acc = forall aenv sh1 e1 sh2 e2. acc aenv (Array sh1 e1, Array sh2 e2) -> (TupleType (EltRepr e1), TupleType (EltRepr e2))Source
arrayType :: forall sh e. Array sh e -> TupleType (EltRepr e)Source
Determine an array type ------------------------
Reify the element type of an array.
accType2 :: AccType2 OpenAccSource
Reify the element types of the results of an array computation that yields two arrays.
expType :: OpenExp aenv env t -> TupleType (EltRepr t)Source
Reify the result type of a scalar expression.
preAccType :: forall acc aenv sh e. AccType acc -> PreOpenAcc acc aenv (Array sh e) -> TupleType (EltRepr e)Source
Reify the element type of the result of an array computation using the array computation AST before tying the knot.
preAccType2 :: forall acc aenv sh1 e1 sh2 e2. AccType acc -> AccType2 acc -> PreOpenAcc acc aenv (Array sh1 e1, Array sh2 e2) -> (TupleType (EltRepr e1), TupleType (EltRepr e2))Source
Reify the element types of the results of an array computation that yields two arrays using the array computation AST before tying the knot.
preExpType :: forall acc aenv env t. AccType acc -> PreOpenExp acc aenv env t -> TupleType (EltRepr t)Source
Reify the result types of of a scalar expression using the expression AST before tying the knot.