 
     DevicePtr, newDevicePtr, withDevicePtr
   ) where
-
 
 import Foreign.CUDA.Internal.C2HS
 import Foreign.CUDA.Internal.Offsets

    alignment _ = alignment (undefined :: Ptr ())

    peek p      = do
        gm <- cIntConv `fmap` {#get cudaDeviceProp.totalGlobalMem#} p
        sm <- cIntConv `fmap` {#get cudaDeviceProp.sharedMemPerBlock#} p
        rb <- cIntConv `fmap` {#get cudaDeviceProp.regsPerBlock#} p
        ws <- cIntConv `fmap` {#get cudaDeviceProp.warpSize#} p
        mp <- cIntConv `fmap` {#get cudaDeviceProp.memPitch#} p
        tb <- cIntConv `fmap` {#get cudaDeviceProp.maxThreadsPerBlock#} p
        cl <- cIntConv `fmap` {#get cudaDeviceProp.clockRate#} p
        cm <- cIntConv `fmap` {#get cudaDeviceProp.totalConstMem#} p
        v1 <- cIntConv `fmap` {#get cudaDeviceProp.major#} p
        v2 <- cIntConv `fmap` {#get cudaDeviceProp.minor#} p
        ta <- cIntConv `fmap` {#get cudaDeviceProp.textureAlignment#} p
        ov <- cToBool  `fmap` {#get cudaDeviceProp.deviceOverlap#} p
        pc <- cIntConv `fmap` {#get cudaDeviceProp.multiProcessorCount#} p
        ke <- cToBool  `fmap` {#get cudaDeviceProp.kernelExecTimeoutEnabled#} p
        tg <- cToBool  `fmap` {#get cudaDeviceProp.integrated#} p
        hm <- cToBool  `fmap` {#get cudaDeviceProp.canMapHostMemory#} p
        md <- cToEnum  `fmap` {#get cudaDeviceProp.computeMode#} p

        --
        -- C->Haskell returns the wrong type when accessing static arrays in

data DeviceProperties = DeviceProperties
  {
    deviceName               :: String,
    computeCapability        :: Float,
    totalGlobalMem           :: Integer,
    totalConstMem            :: Integer,
    sharedMemPerBlock        :: Integer,
