futhark-0.25.4: An optimising compiler for a functional, array-oriented language.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Futhark.IR.GPU.Sizes

Description

In the context of this module, a "size" is any kind of tunable (run-time) constant.

Synopsis

Documentation

data SizeClass Source #

The class of some kind of configurable size. Each class may impose constraints on the valid values.

Constructors

SizeThreshold KernelPath (Maybe Int64)

A threshold with an optional default.

SizeGroup 
SizeNumGroups 
SizeTile 
SizeRegTile 
SizeLocalMemory

Likely not useful on its own, but querying the maximum can be handy.

SizeBespoke Name Int64

A bespoke size with a default.

Instances

Instances details
Show SizeClass Source # 
Instance details

Defined in Futhark.IR.GPU.Sizes

Eq SizeClass Source # 
Instance details

Defined in Futhark.IR.GPU.Sizes

Ord SizeClass Source # 
Instance details

Defined in Futhark.IR.GPU.Sizes

Pretty SizeClass Source # 
Instance details

Defined in Futhark.IR.GPU.Sizes

Methods

pretty :: SizeClass -> Doc ann #

prettyList :: [SizeClass] -> Doc ann #

sizeDefault :: SizeClass -> Maybe Int64 Source #

The default value for the size. If Nothing, that means the backend gets to decide.

type KernelPath = [(Name, Bool)] Source #

An indication of which comparisons have been performed to get to this point, as well as the result of each comparison.

newtype Count u e Source #

A wrapper supporting a phantom type for indicating what we are counting.

Constructors

Count 

Fields

Instances

Instances details
Foldable (Count u) Source # 
Instance details

Defined in Futhark.IR.GPU.Sizes

Methods

fold :: Monoid m => Count u m -> m #

foldMap :: Monoid m => (a -> m) -> Count u a -> m #

foldMap' :: Monoid m => (a -> m) -> Count u a -> m #

foldr :: (a -> b -> b) -> b -> Count u a -> b #

foldr' :: (a -> b -> b) -> b -> Count u a -> b #

foldl :: (b -> a -> b) -> b -> Count u a -> b #

foldl' :: (b -> a -> b) -> b -> Count u a -> b #

foldr1 :: (a -> a -> a) -> Count u a -> a #

foldl1 :: (a -> a -> a) -> Count u a -> a #

toList :: Count u a -> [a] #

null :: Count u a -> Bool #

length :: Count u a -> Int #

elem :: Eq a => a -> Count u a -> Bool #

maximum :: Ord a => Count u a -> a #

minimum :: Ord a => Count u a -> a #

sum :: Num a => Count u a -> a #

product :: Num a => Count u a -> a #

Traversable (Count u) Source # 
Instance details

Defined in Futhark.IR.GPU.Sizes

Methods

traverse :: Applicative f => (a -> f b) -> Count u a -> f (Count u b) #

sequenceA :: Applicative f => Count u (f a) -> f (Count u a) #

mapM :: Monad m => (a -> m b) -> Count u a -> m (Count u b) #

sequence :: Monad m => Count u (m a) -> m (Count u a) #

Functor (Count u) Source # 
Instance details

Defined in Futhark.IR.GPU.Sizes

Methods

fmap :: (a -> b) -> Count u a -> Count u b #

(<$) :: a -> Count u b -> Count u a #

Num e => Num (Count u e) Source # 
Instance details

Defined in Futhark.IR.GPU.Sizes

Methods

(+) :: Count u e -> Count u e -> Count u e #

(-) :: Count u e -> Count u e -> Count u e #

(*) :: Count u e -> Count u e -> Count u e #

negate :: Count u e -> Count u e #

abs :: Count u e -> Count u e #

signum :: Count u e -> Count u e #

fromInteger :: Integer -> Count u e #

Show e => Show (Count u e) Source # 
Instance details

Defined in Futhark.IR.GPU.Sizes

Methods

showsPrec :: Int -> Count u e -> ShowS #

show :: Count u e -> String #

showList :: [Count u e] -> ShowS #

FreeIn e => FreeIn (Count u e) Source # 
Instance details

Defined in Futhark.IR.GPU.Sizes

Methods

freeIn' :: Count u e -> FV Source #

Substitute e => Substitute (Count u e) Source # 
Instance details

Defined in Futhark.IR.GPU.Sizes

Methods

substituteNames :: Map VName VName -> Count u e -> Count u e Source #

IntegralExp e => IntegralExp (Count u e) Source # 
Instance details

Defined in Futhark.IR.GPU.Sizes

Methods

quot :: Count u e -> Count u e -> Count u e Source #

rem :: Count u e -> Count u e -> Count u e Source #

div :: Count u e -> Count u e -> Count u e Source #

mod :: Count u e -> Count u e -> Count u e Source #

sgn :: Count u e -> Maybe Int Source #

pow :: Count u e -> Count u e -> Count u e Source #

divUp :: Count u e -> Count u e -> Count u e Source #

Eq e => Eq (Count u e) Source # 
Instance details

Defined in Futhark.IR.GPU.Sizes

Methods

(==) :: Count u e -> Count u e -> Bool #

(/=) :: Count u e -> Count u e -> Bool #

Ord e => Ord (Count u e) Source # 
Instance details

Defined in Futhark.IR.GPU.Sizes

Methods

compare :: Count u e -> Count u e -> Ordering #

(<) :: Count u e -> Count u e -> Bool #

(<=) :: Count u e -> Count u e -> Bool #

(>) :: Count u e -> Count u e -> Bool #

(>=) :: Count u e -> Count u e -> Bool #

max :: Count u e -> Count u e -> Count u e #

min :: Count u e -> Count u e -> Count u e #

Pretty e => Pretty (Count u e) Source # 
Instance details

Defined in Futhark.IR.GPU.Sizes

Methods

pretty :: Count u e -> Doc ann #

prettyList :: [Count u e] -> Doc ann #

data NumGroups Source #

Phantom type for the number of groups of some kernel.

data GroupSize Source #

Phantom type for the group size of some kernel.

data NumThreads Source #

Phantom type for number of threads.