Copyright | [2009..2017] Trevor L. McDonell |
---|---|
License | BSD |
Safe Haskell | None |
Language | Haskell98 |
Context configuration for the low-level driver interface
- getFlags :: IO [ContextFlag]
- data Limit
- getLimit :: Limit -> IO Int
- setLimit :: Limit -> Int -> IO ()
- data Cache
- getCache :: IO Cache
- setCache :: Cache -> IO ()
- data SharedMem
- getSharedMem :: IO SharedMem
- setSharedMem :: SharedMem -> IO ()
- type StreamPriority = Int
- getStreamPriorityRange :: IO (StreamPriority, StreamPriority)
Context configuration
getFlags :: IO [ContextFlag] Source #
Return the flags that were used to create the current context.
Requires CUDA-7.0
Resource limits
Device limits flags
setLimit :: Limit -> Int -> IO () Source #
Specify the size of the call stack, for compute 2.0 devices.
Requires CUDA-3.1.
Cache
Device cache configuration preference
On devices where the L1 cache and shared memory use the same hardware resources, this function returns the preferred cache configuration for the current context.
Requires CUDA-3.2.
setCache :: Cache -> IO () Source #
On devices where the L1 cache and shared memory use the same hardware resources, this sets the preferred cache configuration for the current context. This is only a preference.
Any function configuration set via
setCacheConfigFun
will be preferred over this
context-wide setting.
Requires CUDA-3.2.
Shared memory
Device shared memory configuration preference
getSharedMem :: IO SharedMem Source #
Return the current size of the shared memory banks in the current
context. On devices with configurable shared memory banks,
setSharedMem
can be used to change the configuration, so that
subsequent kernel launches will by default us the new bank size. On
devices without configurable shared memory, this function returns the
fixed bank size of the hardware.
Requires CUDA-4.2
setSharedMem :: SharedMem -> IO () Source #
On devices with configurable shared memory banks, this function will set the context's shared memory bank size that will be used by default for subsequent kernel launches.
Changing the shared memory configuration between launches may insert a device synchronisation.
Shared memory bank size does not affect shared memory usage or kernel occupancy, but may have major effects on performance. Larger bank sizes allow for greater potential bandwidth to shared memory, but change the kinds of accesses which result in bank conflicts.
Requires CUDA-4.2
Streams
type StreamPriority = Int Source #
Priority of an execution stream. Work submitted to a higher priority stream may preempt execution of work already executing in a lower priority stream. Lower numbers represent higher priorities.
getStreamPriorityRange :: IO (StreamPriority, StreamPriority) Source #
Returns the numerical values that correspond to the greatest and least priority execution streams in the current context respectively. Stream priorities follow the convention that lower numerical numbers correspond to higher priorities. The range of meaningful stream priorities is given by the inclusive range [greatestPriority,leastPriority].
Requires CUDA-5.5.