Copyright | [2017] Trevor L. McDonell |
---|---|
License | BSD3 |
Maintainer | Trevor L. McDonell <tmcdonell@cse.unsw.edu.au> |
Stability | experimental |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
- newtype Handle = Handle {}
- create :: IO Handle
- destroy :: Handle -> IO ()
- data PointerMode
- setPointerMode :: Handle -> PointerMode -> IO ()
- getPointerMode :: Handle -> IO PointerMode
Context management
An opaque handle to the cuSPARSE library context, which is passed to all library function calls.
http://docs.nvidia.com/cuda/cusparse/index.html#cusparsehandlet
This function initializes the cuSPARSE library and creates a handle on the cuSPARSE context. It must be called before any other cuSPARSE API function is invoked. It allocates hardware resources necessary for accessing the GPU.
http://docs.nvidia.com/cuda/cusparse/index.html#cusparsecreate
destroy :: Handle -> IO () Source #
This function releases CPU-side resources used by the cuSPARSE library. The release of GPU-side resources may be deferred until the application shuts down.
http://docs.nvidia.com/cuda/cusparse/index.html#cusparsedestroy
Utilities
data PointerMode Source #
For functions which take scalar value arguments, determines whether those values are passed by reference on the host or device.
http://docs.nvidia.com/cuda/cusparse/index.html#cusparsepointermode_t
setPointerMode :: Handle -> PointerMode -> IO () Source #
Set the pointer mode used by cuSPARSE library functions.
The default mode is for values to be passed by reference from the host.
http://docs.nvidia.com/cuda/cusparse/index.html#cusparsesetpointermode
getPointerMode :: Handle -> IO PointerMode Source #
Get the pointer mode used by cuSPARSE library functions to pass scalar arguments.
http://docs.nvidia.com/cuda/cusparse/index.html#cusparsegetpointermode