Safe Haskell | None |
---|
- class C sh => C sh where
- type Index sh :: *
- intersectCode :: T sh -> T sh -> CodeGenFunction r (T sh)
- sizeCode :: T sh -> CodeGenFunction r (Value Word32)
- size :: sh -> Int
- flattenIndexRec :: T sh -> T (Index sh) -> CodeGenFunction r (Value Word32, Value Word32)
- loop :: (Index sh ~ ix, Phi state) => (T ix -> state -> CodeGenFunction r state) -> T sh -> state -> CodeGenFunction r state
- 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 Word32)
- data Range n = Range n n
- data Shifted n = Shifted {
- shiftedOffset :: n
- shiftedSize :: n
- class C sh => Scalar sh where
Documentation
class C sh => C sh whereSource
intersectCode :: T sh -> T sh -> CodeGenFunction r (T sh)Source
sizeCode :: T sh -> CodeGenFunction r (Value Word32)Source
flattenIndexRec :: T sh -> T (Index sh) -> CodeGenFunction r (Value Word32, Value Word32)Source
Result is (size, flattenedIndex)
.
size
must equal the result of sizeCode
.
We use this for sharing intermediate results.
loop :: (Index sh ~ 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
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 | |
|