 
 module Foreign.CUDA.Driver.Marshal
   (
-    DevicePtr, HostPtr, AllocFlag(..), withHostPtr,
-    malloc, free, mallocHost, freeHost,
-    peekArray, peekArrayAsync, pokeArray, pokeArrayAsync, memset,
-    getDevicePtr
+    -- * Host Allocation
+    HostPtr, AllocFlag(..),
+    withHostPtr, mallocHostArray, freeHost,
+
+    -- * Device Allocation
+    DevicePtr,
+    mallocArray, allocaArray, free,
+
+    -- * Marshalling
+    peekArray, peekArrayAsync, peekListArray,
+    pokeArray, pokeArrayAsync, pokeListArray,
+
+    -- * Combined Allocation and Marshalling
+    newListArray, withListArray,
+
+    -- * Utility
+    memset, getDevicePtr
   )
   where
 


-- |
-- Copy memory onto the device asynchronously, possibly associated with a
-- particular stream. The source host memory must be page-locked (allocated by
-- mallocHost)
--
pokeArrayAsync :: Storable a => Int -> Ptr a -> DevicePtr a -> Maybe Stream -> IO ()
pokeArrayAsync n hptr dptr mst = dopoke undefined dptr
  where
    dopoke :: Storable a' => a' -> DevicePtr a' -> IO ()

import Foreign.CUDA.Driver.Stream               (Stream(..))

-- System
import Unsafe.Coerce
import Control.Monad                            (liftM)
import Control.Exception.Extensible

import Foreign.C
import Foreign.Ptr
import Foreign.Storable
import qualified Foreign.Marshal as F

#c
typedef enum CUmemhostalloc_option_enum {
