 
 -- |
 -- Return the amount of free and total memory respectively available to the
--- current context (bytes)
+-- current context (bytes).
+--
+-- <http://docs.nvidia.com/cuda/cuda-driver-api/group__CUDA__MEM.html#group__CUDA__MEM_1g808f555540d0143a331cc42aa98835c0>
 --
 {-# INLINEABLE getMemInfo #-}
 getMemInfo :: IO (Int64, Int64)

-- Set a number of data elements to the specified value, which may be either 8-,
-- 16-, or 32-bits wide.
--
{-# INLINEABLE memset #-}
memset :: Storable a => DevicePtr a -> Int -> a -> IO ()
memset !dptr !n !val = case sizeOf val of

-- system performance may suffer. This is best used sparingly to allocate
-- staging areas for data exchange.
--
-- Host memory allocated in this way is automatically and immediately
-- accessible to all contexts on all devices which support unified
-- addressing.
--
-- <http://docs.nvidia.com/cuda/cuda-driver-api/group__CUDA__MEM.html#group__CUDA__MEM_1gdd8311286d2c2691605362c689bc64e0>
--
{-# INLINEABLE mallocHostArray #-}
mallocHostArray :: Storable a => [AllocFlag] -> Int -> IO (HostPtr a)
mallocHostArray !flags = doMalloc undefined
