Safe Haskell | None |
---|---|
Language | Haskell2010 |
Our compilation strategy for SegGenRed
is based around avoiding
bin conflicts. We do this by splitting the input into chunks, and
for each chunk computing a single subhistogram. Then we combine
the subhistograms using an ordinary segmented reduction (SegRed
).
There are some branches around to efficiently handle the case where we use only a single subhistogram (because it's large), so that we respect the asymptotics, and do not copy the destination array.
Documentation
compileSegGenRed :: Pattern ExplicitMemory -> KernelSpace -> [GenReduceOp InKernel] -> Body InKernel -> CallKernelGen () Source #