primitive-unaligned-0.1.1.2: Unaligned access to primitive arrays
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Primitive.ByteArray.Unaligned

Synopsis

Class

class PrimUnaligned a where Source #

Class of types supporting primitive array operations that are not necessarily aligned. The offsets for all of the typeclass methods are interpreted as bytes, not elements.

Instances

Instances details
PrimUnaligned CChar Source # 
Instance details

Defined in Data.Primitive.ByteArray.Unaligned

PrimUnaligned CDouble Source # 
Instance details

Defined in Data.Primitive.ByteArray.Unaligned

PrimUnaligned CInt Source # 
Instance details

Defined in Data.Primitive.ByteArray.Unaligned

PrimUnaligned CLLong Source # 
Instance details

Defined in Data.Primitive.ByteArray.Unaligned

PrimUnaligned CLong Source # 
Instance details

Defined in Data.Primitive.ByteArray.Unaligned

PrimUnaligned CSChar Source # 
Instance details

Defined in Data.Primitive.ByteArray.Unaligned

PrimUnaligned CShort Source # 
Instance details

Defined in Data.Primitive.ByteArray.Unaligned

PrimUnaligned CUInt Source # 
Instance details

Defined in Data.Primitive.ByteArray.Unaligned

PrimUnaligned CULLong Source # 
Instance details

Defined in Data.Primitive.ByteArray.Unaligned

PrimUnaligned CULong Source # 
Instance details

Defined in Data.Primitive.ByteArray.Unaligned

PrimUnaligned Int16 Source # 
Instance details

Defined in Data.Primitive.ByteArray.Unaligned

PrimUnaligned Int32 Source # 
Instance details

Defined in Data.Primitive.ByteArray.Unaligned

PrimUnaligned Int64 Source # 
Instance details

Defined in Data.Primitive.ByteArray.Unaligned

PrimUnaligned Int8 Source # 
Instance details

Defined in Data.Primitive.ByteArray.Unaligned

PrimUnaligned Word16 Source # 
Instance details

Defined in Data.Primitive.ByteArray.Unaligned

PrimUnaligned Word32 Source # 
Instance details

Defined in Data.Primitive.ByteArray.Unaligned

PrimUnaligned Word64 Source # 
Instance details

Defined in Data.Primitive.ByteArray.Unaligned

PrimUnaligned Word8 Source # 
Instance details

Defined in Data.Primitive.ByteArray.Unaligned

PrimUnaligned CDev Source # 
Instance details

Defined in Data.Primitive.ByteArray.Unaligned

PrimUnaligned CIno Source # 
Instance details

Defined in Data.Primitive.ByteArray.Unaligned

PrimUnaligned CMode Source # 
Instance details

Defined in Data.Primitive.ByteArray.Unaligned

PrimUnaligned COff Source # 
Instance details

Defined in Data.Primitive.ByteArray.Unaligned

PrimUnaligned CPid Source # 
Instance details

Defined in Data.Primitive.ByteArray.Unaligned

PrimUnaligned CSsize Source # 
Instance details

Defined in Data.Primitive.ByteArray.Unaligned

PrimUnaligned Fd Source # 
Instance details

Defined in Data.Primitive.ByteArray.Unaligned

PrimUnaligned Char Source # 
Instance details

Defined in Data.Primitive.ByteArray.Unaligned

PrimUnaligned Double Source # 
Instance details

Defined in Data.Primitive.ByteArray.Unaligned

PrimUnaligned Float Source # 
Instance details

Defined in Data.Primitive.ByteArray.Unaligned

PrimUnaligned Int Source # 
Instance details

Defined in Data.Primitive.ByteArray.Unaligned

PrimUnaligned Word Source # 
Instance details

Defined in Data.Primitive.ByteArray.Unaligned

PrimUnaligned (Ptr a) Source # 
Instance details

Defined in Data.Primitive.ByteArray.Unaligned

Array access

indexUnalignedByteArray Source #

Arguments

:: PrimUnaligned a 
=> ByteArray

Immutable array

-> Int

Offset in bytes

-> a 

Read a primitive value from the byte array. The offset is given in bytes rather than in elements of type a.

readUnalignedByteArray Source #

Arguments

:: (PrimMonad m, PrimUnaligned a) 
=> MutableByteArray (PrimState m)

Mutable array

-> Int

Offset in bytes

-> m a 

Read a primitive value from the byte array. The offset is given in bytes rather than in elements of type a.

writeUnalignedByteArray Source #

Arguments

:: (PrimMonad m, PrimUnaligned a) 
=> MutableByteArray (PrimState m)

Mutable array

-> Int

Offset in bytes

-> a

Element

-> m () 

Write a primitive value to the byte array. The offset is given in bytes rather than in elements of type a.