knead-0.2.3: Repa array processing using LLVM JIT

Safe HaskellNone

Data.Array.Knead.Index.Nested.Shape

Synopsis

Documentation

class C sh => C sh whereSource

Associated Types

type Index sh :: *Source

Methods

intersectCode :: T sh -> T sh -> CodeGenFunction r (T sh)Source

sizeCode :: T sh -> CodeGenFunction r (Value Word32)Source

size :: sh -> IntSource

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

Instances

C Int8 
C Int16 
C Int32 
C Int64 
C Word32 
C Word64 
C () 
(Integral n, ToSize n) => C (Shifted n) 
(Integral n, ToSize n) => C (Range n) 
(C n, C m) => C (n, m) 
(~ * tag ShapeTag, C sh) => C (T tag sh) 
(C n, C m, C l) => C (n, m, l) 

value :: (C sh, Value val) => sh -> val shSource

paramWith :: (Storable b, C b, Value val) => T p b -> (forall parameters. (Storable parameters, C parameters) => (p -> parameters) -> (T parameters -> val b) -> a) -> aSource

load :: C sh => f sh -> Value (Ptr (Struct sh)) -> CodeGenFunction r (T sh)Source

intersect :: C sh => Exp sh -> Exp sh -> Exp shSource

flattenIndex :: C sh => T sh -> T (Index sh) -> CodeGenFunction r (Value Word32)Source

data Range n 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 Arrays.

Constructors

Range n n 

Instances

Storable n => Storable (Range n) 
C n => C (Range n) 
C n => C (Range n) 
Compose n => Compose (Range n) 
Decompose pn => Decompose (Range pn) 
(Integral n, ToSize n) => C (Range n) 

data Shifted n Source

Shifted denotes a range defined by the start index and the length.

Constructors

Shifted 

Fields

shiftedOffset :: n
 
shiftedSize :: n
 

Instances

Storable n => Storable (Shifted n) 
C n => C (Shifted n) 
C n => C (Shifted n) 
Compose n => Compose (Shifted n) 
Decompose pn => Decompose (Shifted pn) 
(Integral n, ToSize n) => C (Shifted n) 

class C sh => Scalar sh whereSource

Methods

scalar :: Value val => val shSource

zeroIndex :: Value val => f sh -> val (Index sh)Source

Instances

Scalar () 
(~ * tag ShapeTag, ~ * sh Z) => Scalar (T tag sh)