Copyright | [2009..2023] Trevor L. McDonell |
---|---|
License | BSD |
Safe Haskell | Safe-Inferred |
Language | Haskell98 |
Direct peer context access functions for the low-level driver interface.
Since: CUDA-4.0
Synopsis
- data PeerFlag
- data PeerAttribute
- accessible :: Device -> Device -> IO Bool
- add :: Context -> [PeerFlag] -> IO ()
- remove :: Context -> IO ()
- getAttribute :: PeerAttribute -> Device -> Device -> IO Int
Peer Access
Possible option values for direct peer memory access
Instances
Enum PeerFlag Source # | |
Defined in Foreign.CUDA.Driver.Context.Peer |
data PeerAttribute Source #
Peer-to-peer attributes
PerformanceRank | |
AccessSupported | |
NativeAtomicSupported | |
AccessAccessSupported | |
CudaArrayAccessSupported |
Instances
Enum PeerAttribute Source # | |
Defined in Foreign.CUDA.Driver.Context.Peer succ :: PeerAttribute -> PeerAttribute # pred :: PeerAttribute -> PeerAttribute # toEnum :: Int -> PeerAttribute # fromEnum :: PeerAttribute -> Int # enumFrom :: PeerAttribute -> [PeerAttribute] # enumFromThen :: PeerAttribute -> PeerAttribute -> [PeerAttribute] # enumFromTo :: PeerAttribute -> PeerAttribute -> [PeerAttribute] # enumFromThenTo :: PeerAttribute -> PeerAttribute -> PeerAttribute -> [PeerAttribute] # | |
Show PeerAttribute Source # | |
Defined in Foreign.CUDA.Driver.Context.Peer showsPrec :: Int -> PeerAttribute -> ShowS # show :: PeerAttribute -> String # showList :: [PeerAttribute] -> ShowS # | |
Eq PeerAttribute Source # | |
Defined in Foreign.CUDA.Driver.Context.Peer (==) :: PeerAttribute -> PeerAttribute -> Bool # (/=) :: PeerAttribute -> PeerAttribute -> Bool # |
accessible :: Device -> Device -> IO Bool Source #
Queries if the first device can directly access the memory of the second. If
direct access is possible, it can then be enabled with add
.
Requires CUDA-4.0.
add :: Context -> [PeerFlag] -> IO () Source #
If the devices of both the current and supplied contexts support unified addressing, then enable allocations in the supplied context to be accessible by the current context.
Note that access is unidirectional, and in order to access memory in the
current context from the peer context, a separate symmetric call to
add
is required.
Requires CUDA-4.0.
remove :: Context -> IO () Source #
Disable direct memory access from the current context to the supplied peer context, and unregisters any registered allocations.
Requires CUDA-4.0.
getAttribute :: PeerAttribute -> Device -> Device -> IO Int Source #
Queries attributes of the link between two devices
Requires CUDA-8.0
since 0.9.0.0