{-# OPTIONS_GHC -Wall #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-orphans #-} {-# Language ForeignFunctionInterface #-} {-# Language FlexibleInstances #-} {-# Language MultiParamTypeClasses #-} module Casadi.Core.Classes.KernelSum2D ( KernelSum2D, KernelSum2DClass(..), kernelSum2D__0, kernelSum2D__1, kernelSum2D__2, ) where import Prelude hiding ( Functor ) import Data.Vector ( Vector ) import qualified Data.Map as M import Foreign.C.Types import Foreign.Marshal ( new, free ) import Foreign.Storable ( peek ) import Foreign.Ptr ( Ptr, nullPtr ) import Foreign.ForeignPtr ( newForeignPtr ) import System.IO.Unsafe ( unsafePerformIO ) -- for show instances import Casadi.Internal.FormatException ( formatException ) import Casadi.Internal.MarshalTypes ( StdVec, StdString, StdMap, StdPair ) -- StdPair StdOstream' import Casadi.Internal.Marshal ( Marshal(..), withMarshal ) import Casadi.Internal.WrapReturn ( WrapReturn(..) ) import Casadi.Core.Data import Casadi.Core.Enums -- direct wrapper foreign import ccall unsafe "casadi__KernelSum2D__CONSTRUCTOR__0" c_casadi__KernelSum2D__CONSTRUCTOR__0 :: Ptr (Ptr StdString) -> Ptr StdString -> Ptr Function' -> Ptr (StdPair CInt CInt) -> CDouble -> CInt -> IO (Ptr KernelSum2D') casadi__KernelSum2D__CONSTRUCTOR__0 :: String -> Function -> (Int, Int) -> Double -> Int -> IO KernelSum2D casadi__KernelSum2D__CONSTRUCTOR__0 x0 x1 x2 x3 x4 = withMarshal x0 $ \x0' -> withMarshal x1 $ \x1' -> withMarshal x2 $ \x2' -> withMarshal x3 $ \x3' -> withMarshal x4 $ \x4' -> do errStrPtrP <- new nullPtr ret <- c_casadi__KernelSum2D__CONSTRUCTOR__0 errStrPtrP x0' x1' x2' x3' x4' errStrPtr <- peek errStrPtrP free errStrPtrP if errStrPtr == nullPtr then wrapReturn ret else wrapReturn errStrPtr >>= (error . formatException) -- classy wrapper kernelSum2D__0 :: String -> Function -> (Int, Int) -> Double -> Int -> IO KernelSum2D kernelSum2D__0 = casadi__KernelSum2D__CONSTRUCTOR__0 -- direct wrapper foreign import ccall unsafe "casadi__KernelSum2D__CONSTRUCTOR__1" c_casadi__KernelSum2D__CONSTRUCTOR__1 :: Ptr (Ptr StdString) -> Ptr StdString -> Ptr Function' -> Ptr (StdPair CInt CInt) -> CDouble -> CInt -> Ptr (StdMap StdString (Ptr GenericType')) -> IO (Ptr KernelSum2D') casadi__KernelSum2D__CONSTRUCTOR__1 :: String -> Function -> (Int, Int) -> Double -> Int -> M.Map String GenericType -> IO KernelSum2D casadi__KernelSum2D__CONSTRUCTOR__1 x0 x1 x2 x3 x4 x5 = withMarshal x0 $ \x0' -> withMarshal x1 $ \x1' -> withMarshal x2 $ \x2' -> withMarshal x3 $ \x3' -> withMarshal x4 $ \x4' -> withMarshal x5 $ \x5' -> do errStrPtrP <- new nullPtr ret <- c_casadi__KernelSum2D__CONSTRUCTOR__1 errStrPtrP x0' x1' x2' x3' x4' x5' errStrPtr <- peek errStrPtrP free errStrPtrP if errStrPtr == nullPtr then wrapReturn ret else wrapReturn errStrPtr >>= (error . formatException) -- classy wrapper kernelSum2D__1 :: String -> Function -> (Int, Int) -> Double -> Int -> M.Map String GenericType -> IO KernelSum2D kernelSum2D__1 = casadi__KernelSum2D__CONSTRUCTOR__1 -- direct wrapper foreign import ccall unsafe "casadi__KernelSum2D__CONSTRUCTOR__2" c_casadi__KernelSum2D__CONSTRUCTOR__2 :: Ptr (Ptr StdString) -> IO (Ptr KernelSum2D') casadi__KernelSum2D__CONSTRUCTOR__2 :: IO KernelSum2D casadi__KernelSum2D__CONSTRUCTOR__2 = do errStrPtrP <- new nullPtr ret <- c_casadi__KernelSum2D__CONSTRUCTOR__2 errStrPtrP errStrPtr <- peek errStrPtrP free errStrPtrP if errStrPtr == nullPtr then wrapReturn ret else wrapReturn errStrPtr >>= (error . formatException) -- classy wrapper kernelSum2D__2 :: IO KernelSum2D kernelSum2D__2 = casadi__KernelSum2D__CONSTRUCTOR__2