Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
In the context of this module, a "size" is any kind of tunable (run-time) constant.
Synopsis
- data SizeClass
- sizeDefault :: SizeClass -> Maybe Int64
- type KernelPath = [(Name, Bool)]
- newtype Count u e = Count {
- unCount :: e
- data NumBlocks
- data BlockSize
- data NumThreads
Documentation
The class of some kind of configurable size. Each class may impose constraints on the valid values.
SizeThreshold KernelPath (Maybe Int64) | A threshold with an optional default. |
SizeThreadBlock | |
SizeGrid | The number of thread blocks. |
SizeTile | |
SizeRegTile | |
SizeSharedMemory | Likely not useful on its own, but querying the maximum can be handy. |
SizeBespoke Name Int64 | A bespoke size with a default. |
SizeRegisters | Amount of registers available per threadblock. Mostly meaningful for querying the maximum. |
SizeCache | Amount of L2 cache memory, in bytes. Mostly meaningful for querying the maximum. |
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.
A wrapper supporting a phantom type for indicating what we are counting.
Instances
Foldable (Count u) Source # | |
Defined in Futhark.IR.GPU.Sizes 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 # elem :: Eq a => a -> Count u a -> Bool # maximum :: Ord a => Count u a -> a # minimum :: Ord a => Count u a -> a # | |
Traversable (Count u) Source # | |
Functor (Count u) Source # | |
Num e => Num (Count u e) Source # | |
Defined in Futhark.IR.GPU.Sizes | |
Show e => Show (Count u e) Source # | |
FreeIn e => FreeIn (Count u e) Source # | |
Substitute e => Substitute (Count u e) Source # | |
Defined in Futhark.IR.GPU.Sizes | |
IntegralExp e => IntegralExp (Count u e) Source # | |
Defined in Futhark.IR.GPU.Sizes 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 # | |
Eq e => Eq (Count u e) Source # | |
Ord e => Ord (Count u e) Source # | |
Defined in Futhark.IR.GPU.Sizes | |
Pretty e => Pretty (Count u e) Source # | |
Defined in Futhark.IR.GPU.Sizes |
data NumThreads Source #
Phantom type for number of threads.