Safe Haskell | None |
---|
- class (C sh, C (Index sh)) => C sh where
- type Index sh :: *
- intersectCode :: T sh -> T sh -> CodeGenFunction r (T sh)
- sizeCode :: T sh -> CodeGenFunction r (Value Size)
- size :: sh -> Int
- flattenIndexRec :: T sh -> T (Index sh) -> CodeGenFunction r (Value Size, Value Size)
- iterator :: Index sh ~ ix => T sh -> T r (T ix)
- loop :: (Index sh ~ ix, C ix, Phi state) => (T ix -> state -> CodeGenFunction r state) -> T sh -> state -> CodeGenFunction r state
- type Size = Word64
- value :: (C sh, Value val) => sh -> val sh
- paramWith :: (Storable b, C b, Value val) => T p b -> (forall parameters. (Storable parameters, C parameters) => (p -> parameters) -> (T parameters -> val b) -> a) -> a
- load :: C sh => f sh -> Value (Ptr (Struct sh)) -> CodeGenFunction r (T sh)
- intersect :: C sh => Exp sh -> Exp sh -> Exp sh
- flattenIndex :: C sh => T sh -> T (Index sh) -> CodeGenFunction r (Value Size)
- data Range n = Range n n
- data Shifted n = Shifted {
- shiftedOffset :: n
- shiftedSize :: n
- class C sh => Scalar sh where
- class (C sh, IntegerConstant (Index sh), Additive (Index sh)) => Sequence sh where
- sequenceShapeFromIndex :: T (Index sh) -> CodeGenFunction r (T sh)
Documentation
class (C sh, C (Index sh)) => C sh whereSource
intersectCode :: T sh -> T sh -> CodeGenFunction r (T sh)Source
sizeCode :: T sh -> CodeGenFunction r (Value Size)Source
flattenIndexRec :: T sh -> T (Index sh) -> CodeGenFunction r (Value Size, Value Size)Source
Result is (size, flattenedIndex)
.
size
must equal the result of sizeCode
.
We use this for sharing intermediate results.
iterator :: Index sh ~ ix => T sh -> T r (T ix)Source
loop :: (Index sh ~ ix, C ix, Phi state) => (T ix -> state -> CodeGenFunction r state) -> T sh -> state -> CodeGenFunction r stateSource
paramWith :: (Storable b, C b, Value val) => T p b -> (forall parameters. (Storable parameters, C parameters) => (p -> parameters) -> (T parameters -> val b) -> a) -> aSource
flattenIndex :: C sh => T sh -> T (Index sh) -> CodeGenFunction r (Value Size)Source
Range
denotes an inclusive range like
those of the Haskell 98 standard Array
type from the array
package.
E.g. the shape type (Range Int32, Range Int64)
is equivalent to the ix type (Int32, Int64)
for Array
s.
Range n n |
Shifted
denotes a range defined by the start index and the length.
Shifted | |
|