 -- |
 -- Initialise device memory to a given value
 --
-memset                  :: DevicePtr a -> Int64 -> Int -> IO (Maybe String)
-memset ptr bytes symbol =  nothingIfOk `fmap` cudaMemset ptr symbol bytes
+memset :: DevicePtr a                   -- ^ The device memory
+       -> Int64                         -- ^ Number of bytes
+       -> Int                           -- ^ Value to set for each byte
+       -> IO (Maybe String)
+memset ptr bytes symbol =
+    nothingIfOk `fmap` cudaMemset ptr symbol bytes
 
 {# fun unsafe cudaMemset
     { withDevicePtr* `DevicePtr a' ,

    with,
    newArray,
    withArray,

    -- ** Copying
  )
  where

import Data.Int

import Foreign.C
import Foreign.Ptr

         -> Int64                       -- ^ The allocation pitch, as returned by 'malloc2D'
         -> Int                         -- ^ Value to set for each byte
         -> IO (Maybe String)
memset2D ptr (width,height) pitch symbol =
    nothingIfOk `fmap` cudaMemset2D ptr pitch symbol width height

{# fun unsafe cudaMemset2D
    { withDevicePtr* `DevicePtr a' ,
