repa-scalar-4.2.3.3: Scalar data types and conversions.

Safe HaskellNone
LanguageHaskell98

Data.Repa.Scalar.Box

Synopsis

Documentation

newtype Box a Source #

Strict, boxed wrapper for a value.

Useful as a default case when defining instances for polytypic data types.

Constructors

Box a 
Instances
Functor Box Source # 
Instance details

Defined in Data.Repa.Scalar.Box

Methods

fmap :: (a -> b) -> Box a -> Box b #

(<$) :: a -> Box b -> Box a #

Vector Vector (Box a) Source # 
Instance details

Defined in Data.Repa.Scalar.Box

Methods

basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) (Box a) -> m (Vector (Box a)) #

basicUnsafeThaw :: PrimMonad m => Vector (Box a) -> m (Mutable Vector (PrimState m) (Box a)) #

basicLength :: Vector (Box a) -> Int #

basicUnsafeSlice :: Int -> Int -> Vector (Box a) -> Vector (Box a) #

basicUnsafeIndexM :: Monad m => Vector (Box a) -> Int -> m (Box a) #

basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) (Box a) -> Vector (Box a) -> m () #

elemseq :: Vector (Box a) -> Box a -> b -> b #

MVector MVector (Box a) Source # 
Instance details

Defined in Data.Repa.Scalar.Box

Methods

basicLength :: MVector s (Box a) -> Int #

basicUnsafeSlice :: Int -> Int -> MVector s (Box a) -> MVector s (Box a) #

basicOverlaps :: MVector s (Box a) -> MVector s (Box a) -> Bool #

basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) (Box a)) #

basicInitialize :: PrimMonad m => MVector (PrimState m) (Box a) -> m () #

basicUnsafeReplicate :: PrimMonad m => Int -> Box a -> m (MVector (PrimState m) (Box a)) #

basicUnsafeRead :: PrimMonad m => MVector (PrimState m) (Box a) -> Int -> m (Box a) #

basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) (Box a) -> Int -> Box a -> m () #

basicClear :: PrimMonad m => MVector (PrimState m) (Box a) -> m () #

basicSet :: PrimMonad m => MVector (PrimState m) (Box a) -> Box a -> m () #

basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) (Box a) -> MVector (PrimState m) (Box a) -> m () #

basicUnsafeMove :: PrimMonad m => MVector (PrimState m) (Box a) -> MVector (PrimState m) (Box a) -> m () #

basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) (Box a) -> Int -> m (MVector (PrimState m) (Box a)) #

Eq a => Eq (Box a) Source # 
Instance details

Defined in Data.Repa.Scalar.Box

Methods

(==) :: Box a -> Box a -> Bool #

(/=) :: Box a -> Box a -> Bool #

Show a => Show (Box a) Source # 
Instance details

Defined in Data.Repa.Scalar.Box

Methods

showsPrec :: Int -> Box a -> ShowS #

show :: Box a -> String #

showList :: [Box a] -> ShowS #

data MVector s (Box a) Source # 
Instance details

Defined in Data.Repa.Scalar.Box

data MVector s (Box a) = MV_Box !Int !(MVector s a)
data Vector (Box a) Source # 
Instance details

Defined in Data.Repa.Scalar.Box

data Vector (Box a) = V_Box !Int !(Vector a)

box :: a -> Box a Source #

Put a value in a box.

unbox :: Box a -> a Source #

Take the value from the box.