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

Copyright[2009..2017] Trevor L. McDonell
LicenseBSD
Safe HaskellNone
LanguageHaskell98

Foreign.CUDA.Driver.Stream

Contents

Description

Stream management for low-level driver interface

Synopsis

Stream Management

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

Instances

data StreamFlag Source #

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

createWithPriority :: StreamPriority -> [StreamFlag] -> IO Stream Source #

Create a stream with the given priority. Work submitted to a higher-priority stream may preempt work already executing in a lower priority stream.

The convention is that lower numbers represent higher priorities. The default priority is zero. The range of meaningful numeric priorities can be queried using getStreamPriorityRange. If the specified priority is outside the supported numerical range, it will automatically be clamped to the highest or lowest number in the range

Requires CUDA-5.5.

http://docs.nvidia.com/cuda/cuda-driver-api/group__CUDA__STREAM.html#group__CUDA__STREAM_1g95c1a8c7c3dacb13091692dd9c7f7471

destroy :: Stream -> IO () Source #

Destroy a stream. If the device is still doing work in the stream when destroy is called, the function returns immediately and the resources associated with the stream will be released automatically once the device has completed all work.

http://docs.nvidia.com/cuda/cuda-driver-api/group__CUDA__STREAM.html#group__CUDA__STREAM_1g244c8833de4596bcd31a06cdf21ee758

write :: DevicePtr Int32 -> Int32 -> Stream -> [StreamWriteFlag] -> IO () Source #

Write a value to memory, (presumably) after all preceding work in the stream has completed. Unless the option WriteValueNoMemoryBarrier is supplied, the write is preceded by a system-wide memory fence.

http://docs.nvidia.com/cuda/cuda-driver-api/group__CUDA__EVENT.html#group__CUDA__EVENT_1g091455366d56dc2f1f69726aafa369b0

Requires CUDA-8.0.

wait :: DevicePtr Int32 -> Int32 -> Stream -> [StreamWaitFlag] -> IO () Source #

Wait on a memory location. Work ordered after the operation will block until the given condition on the memory is satisfied.

http://docs.nvidia.com/cuda/cuda-driver-api/group__CUDA__EVENT.html#group__CUDA__EVENT_1g629856339de7bc6606047385addbb398

Requires CUDA-8.0.

defaultStream :: Stream Source #

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