-- GENERATED by C->Haskell Compiler, version 0.28.6 Switcheroo, 25 November 2017 (Haskell)
-- Edit the ORIGNAL .chs file instead!


{-# LINE 1 "./Foreign/CUDA/BLAS/Sparse/Reorder.chs" #-}
--
-- This module is auto-generated. Do not edit directly.
--

{-# LANGUAGE CPP #-}
{-# LANGUAGE ForeignFunctionInterface #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
-- |
-- Module      : Foreign.CUDA.BLAS.Sparse.Reorder
-- Copyright   : [2017] Trevor L. McDonell
-- License     : BSD3
--
-- Maintainer  : Trevor L. McDonell <tmcdonell@cse.unsw.edu.au>
-- Stability   : experimental
-- Portability : non-portable (GHC extensions)
--
-- For more information see the cuSPARSE function reference:
--
-- <http://docs.nvidia.com/cuda/cusparse/index.html#cusparse-reorderings-reference>
--

module Foreign.CUDA.BLAS.Sparse.Reorder (

  Info_color,
  scsrcolor,
  dcsrcolor,
  ccsrcolor,
  zcsrcolor,

) where
import qualified Foreign.C.Types as C2HSImp
import qualified Foreign.Ptr as C2HSImp



import Data.Complex
import Numeric.Half
import Foreign
import Foreign.C
import Foreign.Storable.Complex ()
import Foreign.CUDA.Ptr
import Foreign.CUDA.BLAS.Sparse.Analysis
import Foreign.CUDA.BLAS.Sparse.Context
import Foreign.CUDA.BLAS.Sparse.Error
import Foreign.CUDA.BLAS.Sparse.Internal.C2HS
import Foreign.CUDA.BLAS.Sparse.Internal.Types
import Foreign.CUDA.BLAS.Sparse.Matrix.Descriptor
import Foreign.CUDA.BLAS.Sparse.Matrix.Hybrid



{-# LINE 48 "./Foreign/CUDA/BLAS/Sparse/Reorder.chs" #-}


{-# INLINE useDevP #-}
useDevP :: DevicePtr a -> Ptr b
useDevP = useDevicePtr . castDevPtr

{-# INLINE useHostP #-}
useHostP :: HostPtr a -> Ptr b
useHostP = useHostPtr . castHostPtr


{-# INLINEABLE scsrcolor #-}
scsrcolor :: (Handle) -> (Int) -> (Int) -> (MatrixDescriptor) -> (DevicePtr Float) -> (DevicePtr Int32) -> (DevicePtr Int32) -> (DevicePtr Float) -> (DevicePtr Int32) -> (DevicePtr Int32) -> (DevicePtr Int32) -> (Info_color) -> IO ()
scsrcolor a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 =
  let {a1' = useHandle a1} in 
  let {a2' = fromIntegral a2} in 
  let {a3' = fromIntegral a3} in 
  let {a4' = useMatDescr a4} in 
  let {a5' = useDevP a5} in 
  let {a6' = useDevP a6} in 
  let {a7' = useDevP a7} in 
  let {a8' = useDevP a8} in 
  let {a9' = useDevP a9} in 
  let {a10' = useDevP a10} in 
  let {a11' = useDevP a11} in 
  let {a12' = useInfo_color a12} in 
  scsrcolor'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' a10' a11' a12' >>= \res ->
  checkStatus res >> 
  return ()

{-# LINE 61 "./Foreign/CUDA/BLAS/Sparse/Reorder.chs" #-}


{-# INLINEABLE dcsrcolor #-}
dcsrcolor :: (Handle) -> (Int) -> (Int) -> (MatrixDescriptor) -> (DevicePtr Double) -> (DevicePtr Int32) -> (DevicePtr Int32) -> (DevicePtr Double) -> (DevicePtr Int32) -> (DevicePtr Int32) -> (DevicePtr Int32) -> (Info_color) -> IO ()
dcsrcolor a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 =
  let {a1' = useHandle a1} in 
  let {a2' = fromIntegral a2} in 
  let {a3' = fromIntegral a3} in 
  let {a4' = useMatDescr a4} in 
  let {a5' = useDevP a5} in 
  let {a6' = useDevP a6} in 
  let {a7' = useDevP a7} in 
  let {a8' = useDevP a8} in 
  let {a9' = useDevP a9} in 
  let {a10' = useDevP a10} in 
  let {a11' = useDevP a11} in 
  let {a12' = useInfo_color a12} in 
  dcsrcolor'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' a10' a11' a12' >>= \res ->
  checkStatus res >> 
  return ()

{-# LINE 64 "./Foreign/CUDA/BLAS/Sparse/Reorder.chs" #-}


{-# INLINEABLE ccsrcolor #-}
ccsrcolor :: (Handle) -> (Int) -> (Int) -> (MatrixDescriptor) -> (DevicePtr (Complex Float)) -> (DevicePtr Int32) -> (DevicePtr Int32) -> (DevicePtr (Complex Float)) -> (DevicePtr Int32) -> (DevicePtr Int32) -> (DevicePtr Int32) -> (Info_color) -> IO ()
ccsrcolor a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 =
  let {a1' = useHandle a1} in 
  let {a2' = fromIntegral a2} in 
  let {a3' = fromIntegral a3} in 
  let {a4' = useMatDescr a4} in 
  let {a5' = useDevP a5} in 
  let {a6' = useDevP a6} in 
  let {a7' = useDevP a7} in 
  let {a8' = useDevP a8} in 
  let {a9' = useDevP a9} in 
  let {a10' = useDevP a10} in 
  let {a11' = useDevP a11} in 
  let {a12' = useInfo_color a12} in 
  ccsrcolor'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' a10' a11' a12' >>= \res ->
  checkStatus res >> 
  return ()

{-# LINE 67 "./Foreign/CUDA/BLAS/Sparse/Reorder.chs" #-}


{-# INLINEABLE zcsrcolor #-}
zcsrcolor :: (Handle) -> (Int) -> (Int) -> (MatrixDescriptor) -> (DevicePtr (Complex Double)) -> (DevicePtr Int32) -> (DevicePtr Int32) -> (DevicePtr (Complex Double)) -> (DevicePtr Int32) -> (DevicePtr Int32) -> (DevicePtr Int32) -> (Info_color) -> IO ()
zcsrcolor a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 =
  let {a1' = useHandle a1} in 
  let {a2' = fromIntegral a2} in 
  let {a3' = fromIntegral a3} in 
  let {a4' = useMatDescr a4} in 
  let {a5' = useDevP a5} in 
  let {a6' = useDevP a6} in 
  let {a7' = useDevP a7} in 
  let {a8' = useDevP a8} in 
  let {a9' = useDevP a9} in 
  let {a10' = useDevP a10} in 
  let {a11' = useDevP a11} in 
  let {a12' = useInfo_color a12} in 
  zcsrcolor'_ a1' a2' a3' a4' a5' a6' a7' a8' a9' a10' a11' a12' >>= \res ->
  checkStatus res >> 
  return ()

{-# LINE 84 "./Foreign/CUDA/BLAS/Sparse/Reorder.chs" #-}


foreign import ccall unsafe "Foreign/CUDA/BLAS/Sparse/Reorder.chs.h cusparseScsrcolor"
  scsrcolor'_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CFloat) -> ((C2HSImp.Ptr C2HSImp.CInt) -> ((C2HSImp.Ptr C2HSImp.CInt) -> ((C2HSImp.Ptr C2HSImp.CFloat) -> ((C2HSImp.Ptr C2HSImp.CInt) -> ((C2HSImp.Ptr C2HSImp.CInt) -> ((C2HSImp.Ptr C2HSImp.CInt) -> ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt)))))))))))))

foreign import ccall unsafe "Foreign/CUDA/BLAS/Sparse/Reorder.chs.h cusparseDcsrcolor"
  dcsrcolor'_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CDouble) -> ((C2HSImp.Ptr C2HSImp.CInt) -> ((C2HSImp.Ptr C2HSImp.CInt) -> ((C2HSImp.Ptr C2HSImp.CDouble) -> ((C2HSImp.Ptr C2HSImp.CInt) -> ((C2HSImp.Ptr C2HSImp.CInt) -> ((C2HSImp.Ptr C2HSImp.CInt) -> ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt)))))))))))))

foreign import ccall unsafe "Foreign/CUDA/BLAS/Sparse/Reorder.chs.h cusparseCcsrcolor"
  ccsrcolor'_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CInt) -> ((C2HSImp.Ptr C2HSImp.CInt) -> ((C2HSImp.Ptr C2HSImp.CFloat) -> ((C2HSImp.Ptr C2HSImp.CInt) -> ((C2HSImp.Ptr C2HSImp.CInt) -> ((C2HSImp.Ptr C2HSImp.CInt) -> ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt)))))))))))))

foreign import ccall unsafe "Foreign/CUDA/BLAS/Sparse/Reorder.chs.h cusparseZcsrcolor"
  zcsrcolor'_ :: ((C2HSImp.Ptr ()) -> (C2HSImp.CInt -> (C2HSImp.CInt -> ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CInt) -> ((C2HSImp.Ptr C2HSImp.CInt) -> ((C2HSImp.Ptr C2HSImp.CDouble) -> ((C2HSImp.Ptr C2HSImp.CInt) -> ((C2HSImp.Ptr C2HSImp.CInt) -> ((C2HSImp.Ptr C2HSImp.CInt) -> ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt)))))))))))))