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

Safe HaskellNone
LanguageHaskell98

Data.Repa.Scalar.Product

Contents

Synopsis

Product type

data a :*: b infixr 9 Source #

A strict product type, written infix.

Constructors

!a :*: !b infixr 9 
Instances
(Unbox a, Unbox b) => Vector Vector (a :*: b) Source # 
Instance details

Defined in Data.Repa.Scalar.Product

Methods

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

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

basicLength :: Vector (a :*: b) -> Int #

basicUnsafeSlice :: Int -> Int -> Vector (a :*: b) -> Vector (a :*: b) #

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

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

elemseq :: Vector (a :*: b) -> (a :*: b) -> b0 -> b0 #

(Unbox a, Unbox b) => MVector MVector (a :*: b) Source # 
Instance details

Defined in Data.Repa.Scalar.Product

Methods

basicLength :: MVector s (a :*: b) -> Int #

basicUnsafeSlice :: Int -> Int -> MVector s (a :*: b) -> MVector s (a :*: b) #

basicOverlaps :: MVector s (a :*: b) -> MVector s (a :*: b) -> Bool #

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

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

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

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

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

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

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

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

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

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

IsProdList ts => Discard Z (t1 :*: ts) Source # 
Instance details

Defined in Data.Repa.Scalar.Product

Associated Types

type Discard' Z (t1 :*: ts) :: Type Source #

Methods

discard :: Nat Z -> (t1 :*: ts) -> Discard' Z (t1 :*: ts) Source #

IsProdList ts => Select Z (t1 :*: ts) Source # 
Instance details

Defined in Data.Repa.Scalar.Product

Associated Types

type Select' Z (t1 :*: ts) :: Type Source #

Methods

select :: Nat Z -> (t1 :*: ts) -> Select' Z (t1 :*: ts) Source #

Functor ((:*:) a) Source # 
Instance details

Defined in Data.Repa.Scalar.Product

Methods

fmap :: (a0 -> b) -> (a :*: a0) -> a :*: b #

(<$) :: a0 -> (a :*: b) -> a :*: a0 #

Discard n ts => Discard (S n) (t1 :*: ts) Source # 
Instance details

Defined in Data.Repa.Scalar.Product

Associated Types

type Discard' (S n) (t1 :*: ts) :: Type Source #

Methods

discard :: Nat (S n) -> (t1 :*: ts) -> Discard' (S n) (t1 :*: ts) Source #

Select n ts => Select (S n) (t1 :*: ts) Source # 
Instance details

Defined in Data.Repa.Scalar.Product

Associated Types

type Select' (S n) (t1 :*: ts) :: Type Source #

Methods

select :: Nat (S n) -> (t1 :*: ts) -> Select' (S n) (t1 :*: ts) Source #

(Eq a, Eq b) => Eq (a :*: b) Source # 
Instance details

Defined in Data.Repa.Scalar.Product

Methods

(==) :: (a :*: b) -> (a :*: b) -> Bool #

(/=) :: (a :*: b) -> (a :*: b) -> Bool #

(Show a, Show b) => Show (a :*: b) Source # 
Instance details

Defined in Data.Repa.Scalar.Product

Methods

showsPrec :: Int -> (a :*: b) -> ShowS #

show :: (a :*: b) -> String #

showList :: [a :*: b] -> ShowS #

(Unbox a, Unbox b) => Unbox (a :*: b) Source # 
Instance details

Defined in Data.Repa.Scalar.Product

(IsKeyValues p, IsKeyValues ps, Keys p ~ Keys ps) => IsKeyValues (p :*: ps) Source # 
Instance details

Defined in Data.Repa.Scalar.Product

Associated Types

type Keys (p :*: ps) :: Type Source #

type Values (p :*: ps) :: Type Source #

Methods

keys :: (p :*: ps) -> [Keys (p :*: ps)] Source #

values :: (p :*: ps) -> Values (p :*: ps) Source #

IsProdList fs => IsProdList (f :*: fs) Source # 
Instance details

Defined in Data.Repa.Scalar.Product

Methods

isProdList :: (f :*: fs) -> Bool Source #

Mask ms ts => Mask (Keep :*: ms) (t1 :*: ts) Source # 
Instance details

Defined in Data.Repa.Scalar.Product

Associated Types

type Mask' (Keep :*: ms) (t1 :*: ts) :: Type Source #

Methods

mask :: (Keep :*: ms) -> (t1 :*: ts) -> Mask' (Keep :*: ms) (t1 :*: ts) Source #

Mask ms ts => Mask (Drop :*: ms) (t1 :*: ts) Source # 
Instance details

Defined in Data.Repa.Scalar.Product

Associated Types

type Mask' (Drop :*: ms) (t1 :*: ts) :: Type Source #

Methods

mask :: (Drop :*: ms) -> (t1 :*: ts) -> Mask' (Drop :*: ms) (t1 :*: ts) Source #

data MVector s (a :*: b) Source # 
Instance details

Defined in Data.Repa.Scalar.Product

data MVector s (a :*: b) = MV_Prod !Int !(MVector s a) !(MVector s b)
type Discard' Z (t1 :*: ts) Source # 
Instance details

Defined in Data.Repa.Scalar.Product

type Discard' Z (t1 :*: ts) = ts
type Select' Z (t1 :*: ts) Source # 
Instance details

Defined in Data.Repa.Scalar.Product

type Select' Z (t1 :*: ts) = t1
type Discard' (S n) (t1 :*: ts) Source # 
Instance details

Defined in Data.Repa.Scalar.Product

type Discard' (S n) (t1 :*: ts) = t1 :*: Discard' n ts
type Select' (S n) (t1 :*: ts) Source # 
Instance details

Defined in Data.Repa.Scalar.Product

type Select' (S n) (t1 :*: ts) = Select' n ts
data Vector (a :*: b) Source # 
Instance details

Defined in Data.Repa.Scalar.Product

data Vector (a :*: b) = V_Prod !Int !(Vector a) !(Vector b)
type Keys (p :*: ps) Source # 
Instance details

Defined in Data.Repa.Scalar.Product

type Keys (p :*: ps) = Keys p
type Values (p :*: ps) Source # 
Instance details

Defined in Data.Repa.Scalar.Product

type Values (p :*: ps) = Values p :*: Values ps
type Mask' (Keep :*: ms) (t1 :*: ts) Source # 
Instance details

Defined in Data.Repa.Scalar.Product

type Mask' (Keep :*: ms) (t1 :*: ts) = t1 :*: Mask' ms ts
type Mask' (Drop :*: ms) (t1 :*: ts) Source # 
Instance details

Defined in Data.Repa.Scalar.Product

type Mask' (Drop :*: ms) (t1 :*: ts) = Mask' ms ts

class IsProdList p where Source #

Sequences of products that form a valid list, using () for the nil value.

Methods

isProdList :: p -> Bool Source #

Instances
IsProdList () Source # 
Instance details

Defined in Data.Repa.Scalar.Product

Methods

isProdList :: () -> Bool Source #

IsProdList fs => IsProdList (f :*: fs) Source # 
Instance details

Defined in Data.Repa.Scalar.Product

Methods

isProdList :: (f :*: fs) -> Bool Source #

class IsKeyValues p where Source #

Sequences of products and tuples that form hetrogeneous key-value pairs.

Associated Types

type Keys p Source #

type Values p Source #

Methods

keys :: p -> [Keys p] Source #

Get a cons-list of all the keys.

values :: p -> Values p Source #

Get a heterogeneous product-list of all the values.

Instances
IsKeyValues (k, v) Source # 
Instance details

Defined in Data.Repa.Scalar.Product

Associated Types

type Keys (k, v) :: Type Source #

type Values (k, v) :: Type Source #

Methods

keys :: (k, v) -> [Keys (k, v)] Source #

values :: (k, v) -> Values (k, v) Source #

(IsKeyValues p, IsKeyValues ps, Keys p ~ Keys ps) => IsKeyValues (p :*: ps) Source # 
Instance details

Defined in Data.Repa.Scalar.Product

Associated Types

type Keys (p :*: ps) :: Type Source #

type Values (p :*: ps) :: Type Source #

Methods

keys :: (p :*: ps) -> [Keys (p :*: ps)] Source #

values :: (p :*: ps) -> Values (p :*: ps) Source #

Selecting

class IsProdList t => Select (n :: N) t where Source #

Associated Types

type Select' n t Source #

Methods

select :: Nat n -> t -> Select' n t Source #

Return the element with this index from a product list.

Instances
IsProdList ts => Select Z (t1 :*: ts) Source # 
Instance details

Defined in Data.Repa.Scalar.Product

Associated Types

type Select' Z (t1 :*: ts) :: Type Source #

Methods

select :: Nat Z -> (t1 :*: ts) -> Select' Z (t1 :*: ts) Source #

Select n ts => Select (S n) (t1 :*: ts) Source # 
Instance details

Defined in Data.Repa.Scalar.Product

Associated Types

type Select' (S n) (t1 :*: ts) :: Type Source #

Methods

select :: Nat (S n) -> (t1 :*: ts) -> Select' (S n) (t1 :*: ts) Source #

Discarding

class IsProdList t => Discard (n :: N) t where Source #

Associated Types

type Discard' n t Source #

Methods

discard :: Nat n -> t -> Discard' n t Source #

Discard the element with this index from a product list.

Instances
IsProdList ts => Discard Z (t1 :*: ts) Source # 
Instance details

Defined in Data.Repa.Scalar.Product

Associated Types

type Discard' Z (t1 :*: ts) :: Type Source #

Methods

discard :: Nat Z -> (t1 :*: ts) -> Discard' Z (t1 :*: ts) Source #

Discard n ts => Discard (S n) (t1 :*: ts) Source # 
Instance details

Defined in Data.Repa.Scalar.Product

Associated Types

type Discard' (S n) (t1 :*: ts) :: Type Source #

Methods

discard :: Nat (S n) -> (t1 :*: ts) -> Discard' (S n) (t1 :*: ts) Source #

Masking

class (IsProdList m, IsProdList t) => Mask m t where Source #

Class of data types that can have parts masked out.

Associated Types

type Mask' m t Source #

Methods

mask :: m -> t -> Mask' m t Source #

Mask out some component of a type.

mask (Keep :*: Drop  :*: Keep :*: ()) 
     (1    :*: "foo" :*: 'a'  :*: ())   =   (1 :*: 'a' :*: ())

mask (Drop :*: Drop  :*: Drop :*: ()) 
     (1    :*: "foo" :*: 'a'  :*: ())   =   ()
Instances
Mask () () Source # 
Instance details

Defined in Data.Repa.Scalar.Product

Associated Types

type Mask' () () :: Type Source #

Methods

mask :: () -> () -> Mask' () () Source #

Mask ms ts => Mask (Keep :*: ms) (t1 :*: ts) Source # 
Instance details

Defined in Data.Repa.Scalar.Product

Associated Types

type Mask' (Keep :*: ms) (t1 :*: ts) :: Type Source #

Methods

mask :: (Keep :*: ms) -> (t1 :*: ts) -> Mask' (Keep :*: ms) (t1 :*: ts) Source #

Mask ms ts => Mask (Drop :*: ms) (t1 :*: ts) Source # 
Instance details

Defined in Data.Repa.Scalar.Product

Associated Types

type Mask' (Drop :*: ms) (t1 :*: ts) :: Type Source #

Methods

mask :: (Drop :*: ms) -> (t1 :*: ts) -> Mask' (Drop :*: ms) (t1 :*: ts) Source #

data Keep Source #

Singleton to indicate a field that should be kept.

Constructors

Keep 
Instances
Mask ms ts => Mask (Keep :*: ms) (t1 :*: ts) Source # 
Instance details

Defined in Data.Repa.Scalar.Product

Associated Types

type Mask' (Keep :*: ms) (t1 :*: ts) :: Type Source #

Methods

mask :: (Keep :*: ms) -> (t1 :*: ts) -> Mask' (Keep :*: ms) (t1 :*: ts) Source #

type Mask' (Keep :*: ms) (t1 :*: ts) Source # 
Instance details

Defined in Data.Repa.Scalar.Product

type Mask' (Keep :*: ms) (t1 :*: ts) = t1 :*: Mask' ms ts

data Drop Source #

Singleton to indicate a field that should be dropped.

Constructors

Drop 
Instances
Mask ms ts => Mask (Drop :*: ms) (t1 :*: ts) Source # 
Instance details

Defined in Data.Repa.Scalar.Product

Associated Types

type Mask' (Drop :*: ms) (t1 :*: ts) :: Type Source #

Methods

mask :: (Drop :*: ms) -> (t1 :*: ts) -> Mask' (Drop :*: ms) (t1 :*: ts) Source #

type Mask' (Drop :*: ms) (t1 :*: ts) Source # 
Instance details

Defined in Data.Repa.Scalar.Product

type Mask' (Drop :*: ms) (t1 :*: ts) = Mask' ms ts