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.Module.Base

Contents

Description

Module loading for low-level driver interface

Synopsis

Module Management

newtype Module Source #

A reference to a Module object, containing collections of device functions

Constructors

Module 

Fields

Instances

data JITOption Source #

Just-in-time compilation and linking options

Constructors

MaxRegisters !Int

maximum number of registers per thread

ThreadsPerBlock !Int

number of threads per block to target for

OptimisationLevel !Int

level of optimisation to apply (1-4, default 4)

Target !Compute

compilation target, otherwise determined from context

FallbackStrategy !JITFallback

fallback strategy if matching cubin not found

GenerateDebugInfo

generate debug info (-g) (requires cuda >= 5.5)

GenerateLineInfo

generate line number information (-lineinfo) (requires cuda >= 5.5)

Verbose

verbose log messages (requires cuda >= 5.5)

data JITResult Source #

Results of online compilation

Constructors

JITResult 

Fields

Loading and unloading modules

loadFile :: FilePath -> IO Module Source #

Load the contents of the specified file (either a ptx or cubin file) to create a new module, and load that module into the current context.

http://docs.nvidia.com/cuda/cuda-driver-api/group__CUDA__MODULE.html#group__CUDA__MODULE_1g366093bd269dafd0af21f1c7d18115d3

loadData :: ByteString -> IO Module Source #

Load the contents of the given image into a new module, and load that module into the current context. The image is (typically) the contents of a cubin or PTX file.

Note that the ByteString will be copied into a temporary staging area so that it can be passed to C.

http://docs.nvidia.com/cuda/cuda-driver-api/group__CUDA__MODULE.html#group__CUDA__MODULE_1g04ce266ce03720f479eab76136b90c0b

loadDataFromPtr :: Ptr Word8 -> IO Module Source #

As loadData, but read the image data from the given pointer. The image is a NULL-terminated sequence of bytes.

loadDataEx :: ByteString -> [JITOption] -> IO JITResult Source #

Load the contents of the given image into a module with online compiler options, and load the module into the current context. The image is (typically) the contents of a cubin or PTX file. The actual attributes of the compiled kernel can be probed using requires.

Note that the ByteString will be copied into a temporary staging area so that it can be passed to C.

http://docs.nvidia.com/cuda/cuda-driver-api/group__CUDA__MODULE.html#group__CUDA__MODULE_1g9e8047e9dbf725f0cd7cafd18bfd4d12

loadDataFromPtrEx :: Ptr Word8 -> [JITOption] -> IO JITResult Source #

As loadDataEx, but read the image data from the given pointer. The image is a NULL-terminated sequence of bytes.