Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data SizeHeuristic = SizeHeuristic {}
- data DeviceType
- data WhichSize
- data HeuristicValue
- sizeHeuristicsTable :: [SizeHeuristic]
- mapTranspose :: ToIdent a => a -> Type -> TransposeType -> Func
- data TransposeType
Documentation
data SizeHeuristic Source #
A heuristic for setting the default value for something.
data DeviceType Source #
The type of OpenCL device that this heuristic applies to.
A size that can be assigned a default.
data HeuristicValue Source #
The value supplies by a heuristic can be a constant, or inferred from some device information.
sizeHeuristicsTable :: [SizeHeuristic] Source #
All of our heuristics.
mapTranspose :: ToIdent a => a -> Type -> TransposeType -> Func Source #
mapTranspose name elem_type transpose_type
Generate a transpose kernel
with requested name
for elements of type elem_type
. There are special
support to handle input arrays with low width or low height, which can be
indicated by transpose_type
.
Normally when transposing a [2][n]
array we would use a FUT_BLOCK_DIM x
FUT_BLOCK_DIM
group to process a [2][FUT_BLOCK_DIM]
slice of the input
array. This would mean that many of the threads in a group would be inactive.
We try to remedy this by using a special kernel that will process a larger
part of the input, by using more complex indexing. In our example, we could
use all threads in a group if we are processing (2/FUT_BLOCK_DIM)
as large
a slice of each rows per group. The variable mulx
contains this factor for
the kernel to handle input arrays with low height.
See issue #308 on GitHub for more details.
data TransposeType Source #
Which form of transposition to generate code for.
TransposeNormal | |
TransposeLowWidth | |
TransposeLowHeight | |
TransposeSmall | For small arrays that do not benefit from coalescing. |
Instances
Eq TransposeType Source # | |
Defined in Futhark.CodeGen.OpenCL.Kernels (==) :: TransposeType -> TransposeType -> Bool # (/=) :: TransposeType -> TransposeType -> Bool # | |
Ord TransposeType Source # | |
Defined in Futhark.CodeGen.OpenCL.Kernels compare :: TransposeType -> TransposeType -> Ordering # (<) :: TransposeType -> TransposeType -> Bool # (<=) :: TransposeType -> TransposeType -> Bool # (>) :: TransposeType -> TransposeType -> Bool # (>=) :: TransposeType -> TransposeType -> Bool # max :: TransposeType -> TransposeType -> TransposeType # min :: TransposeType -> TransposeType -> TransposeType # | |
Show TransposeType Source # | |
Defined in Futhark.CodeGen.OpenCL.Kernels showsPrec :: Int -> TransposeType -> ShowS # show :: TransposeType -> String # showList :: [TransposeType] -> ShowS # |