Safe Haskell | None |
---|---|

Language | Haskell2010 |

## Synopsis

- data Boxed
- data Unboxed
- data Stored
- data family BufferPure sort elem
- data family BufferMut sort st elem
- class (Vector (BufferPure mode) a, MVector (BufferMut mode) a) => Buffer mode a
- class MVector (BufferMut mode) a => MBuffer mode a
- unsafeBufferThaw :: (Buffer rep a, PrimMonad m) => BufferPure rep a -> m (BufferMut rep (PrimState m) a)
- unsafeBufferFreeze :: (Buffer rep a, PrimMonad m) => BufferMut rep (PrimState m) a -> m (BufferPure rep a)

# Documentation

`Boxed`

is the type index for `Buffer`

s that use the boxed data structure `Vector`

as the underlying storage representation.

## Instances

`Unboxed`

is the type index for `Buffer`

s that use the unboxed data structure
`Vector`

as the underlying storage representation.

## Instances

`Stored`

is the type index for `Buffer`

s that use the `Storable`

for values, in pinned byte array buffers, provided by `Storable`

## Instances

data family BufferPure sort elem Source #

## Instances

data family BufferMut sort st elem Source #

## Instances

class (Vector (BufferPure mode) a, MVector (BufferMut mode) a) => Buffer mode a Source #

The class instance

is a shorthand for saying that a given buffer representation `Buffer`

mode a`mode`

has a `Vector`

instance for both `BufferPure`

and `BufferMut`

.

## Instances

(Vector (BufferPure mode) a, MVector (BufferMut mode) a) => Buffer mode a Source # | |

Defined in Numerical.Array.Storage |

unsafeBufferThaw :: (Buffer rep a, PrimMonad m) => BufferPure rep a -> m (BufferMut rep (PrimState m) a) Source #

unsafeBufferFreeze :: (Buffer rep a, PrimMonad m) => BufferMut rep (PrimState m) a -> m (BufferPure rep a) Source #