cuda-0.6.6.0: FFI binding to the CUDA interface for programming NVIDIA GPUs

Copyright[2009..2014] Trevor L. McDonell
LicenseBSD
Safe HaskellSafe-Inferred
LanguageHaskell98

Foreign.CUDA.Types

Contents

Description

Data types that are equivalent and can be shared freely between the CUDA Runtime and Driver APIs.

Synopsis

Pointers

newtype DevicePtr a Source

A reference to data stored on the device.

Constructors

DevicePtr 

Fields

useDevicePtr :: Ptr a
 

Instances

newtype HostPtr a Source

A reference to page-locked host memory.

A HostPtr is just a plain Ptr, but the memory has been allocated by CUDA into page locked memory. This means that the data can be copied to the GPU via DMA (direct memory access). Note that the use of the system function mlock is not sufficient here --- the CUDA version ensures that the physical address stays this same, not just the virtual address.

To copy data into a HostPtr array, you may use for example withHostPtr together with copyArray or moveArray.

Constructors

HostPtr 

Fields

useHostPtr :: Ptr a
 

Instances

Events

newtype Event Source

Events are markers that can be inserted into the CUDA execution stream and later queried.

Constructors

Event 

Fields

useEvent :: Ptr ()
 

Instances

data EventFlag Source

Event creation flags

Instances

Enum EventFlag

Possible option flags for waiting for events

Eq EventFlag 
Show EventFlag 

data WaitFlag Source

Instances

Streams

newtype Stream Source

A processing stream. All operations in a stream are synchronous and executed in sequence, but operations in different non-default streams may happen out-of-order or concurrently with one another.

Use Events to synchronise operations between streams.

Constructors

Stream 

Fields

useStream :: Ptr ()
 

Instances

data StreamFlag Source

Possible option flags for stream initialisation. Dummy instance until the API exports actual option values.

Instances

defaultStream :: Stream Source

The main execution stream. No operations overlap with operations in the default stream.