| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Data.PrimitiveArray.Dense
Description
Dense primitive arrays where the lower index is zero (or the equivalent of zero for newtypes and enumerations).
Actual writes to data structures use a more safe write instead of
the unsafe unsafeWrite. Writes also tend to occur much less in DP
algorithms (say, N^2 writes for an N^3 time algorithm -- mostly reads
are being executed).
TODO consider if we want to force the lower index to be zero, or allow
non-zero lower indices. Will have to be considered together with the
Index.Class module!
Unboxed, multidimensional arrays.
Instances
| (Index sh, Unbox elm) => PrimArrayOps Unboxed sh elm | |
| (Index sh, Unbox elm) => MPrimArrayOps Unboxed sh elm | |
| (Index sh, Unbox e, Unbox e') => PrimArrayMap Unboxed sh e e' | |
| (Eq sh, Eq e, Unbox e) => Eq (Unboxed sh e) | |
| (Read sh, Read e, Unbox e) => Read (Unboxed sh e) | |
| (Show sh, Show e, Unbox e) => Show (Unboxed sh e) | |
| Generic (Unboxed sh e) | |
| (ToJSON sh, ToJSON e, Unbox e) => ToJSON (Unboxed sh e) | |
| (FromJSON sh, FromJSON e, Unbox e) => FromJSON (Unboxed sh e) | |
| (Binary sh, Binary e, Unbox e) => Binary (Unboxed sh e) | |
| (Serialize sh, Serialize e, Unbox e) => Serialize (Unboxed sh e) | |
| NFData sh => NFData (MutArr m (Unboxed sh e)) | |
| NFData sh => NFData (Unboxed sh e) | |
| data MutArr m (Unboxed sh e) = MUnboxed !sh !sh !(MVector (PrimState m) e) | |
| type Rep (Unboxed sh e) |
Boxed, multidimensional arrays.
Instances
| (Index sh, Unbox elm) => PrimArrayOps Boxed sh elm | |
| Index sh => MPrimArrayOps Boxed sh elm | |
| Index sh => PrimArrayMap Boxed sh e e' | |
| (Eq sh, Eq e) => Eq (Boxed sh e) | |
| (Read sh, Read e) => Read (Boxed sh e) | |
| (Show sh, Show e) => Show (Boxed sh e) | |
| Generic (Boxed sh e) | |
| (ToJSON sh, ToJSON e) => ToJSON (Boxed sh e) | |
| (FromJSON sh, FromJSON e) => FromJSON (Boxed sh e) | |
| (Binary sh, Binary e) => Binary (Boxed sh e) | |
| (Serialize sh, Serialize e) => Serialize (Boxed sh e) | |
| NFData sh => NFData (MutArr m (Boxed sh e)) | |
| (NFData sh, NFData e) => NFData (Boxed sh e) | |
| data MutArr m (Boxed sh e) = MBoxed !sh !sh !(MVector (PrimState m) e) | |
| type Rep (Boxed sh e) |