     where
       bytes = fromIntegral (len_spec * sizeOf (undefined::Int))
 #endif
-
-
-{# fun unsafe addIons
-    { cIntConv          `Int'                  ,
-      withDevicePtr*    `CUDA.DevicePtr Float' ,
-      withDevicePtr*    `CUDA.DevicePtr Float' ,
-      withDevicePtr*    `CUDA.DevicePtr Int'   ,
-      cIntConv          `Int'                  ,
-      cIntConv          `Int'                  } -> `()' #}
-  where
-    withDevicePtr = CUDA.withDevicePtr
-
-
 #if 0
 --
 -- Sequential version

                   -> Peptide                   -- ^ peptide to build spectrum for
                   -> (XCorrSpecThry -> IO b)   -- ^ action to perform
                   -> IO b
buildThrySpecXCorr _cp (m,n) chrg pep fun =
    CUDA.allocaBytes bytes $ \spec ->
    CUDA.memset spec bytes 0 >>= \rv -> case rv of
      Just e  -> error e
      Nothing -> CUDA.withArrayLen (bIonLadder pep) $ \n b_ions -> do
                 CUDA.withArray    (yIonLadder pep) $ \y_ions   -> do
                 addIons chrg b_ions y_ions spec n len >> do

                 fun (XCorrSpecThry (m,n) spec)
    where
      len   = n - m + 1
      bytes = fromIntegral len * fromIntegral (sizeOf (undefined::Int))


#if 0
buildThrySpecXCorr :: ConfigParams -> Int -> Int -> Peptide -> IO XCorrSpecThry

import Protein

import C2HS
import Foreign.CUDA (DevicePtr, withDevicePtr)
import qualified Foreign.CUDA as CUDA


