summaryrefslogtreecommitdiff
path: root/Foreign/CUDA/Cublas/Types.chs
blob: 14ab7ce04f5e3303a97502e90ddadb037a150dac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{-# LANGUAGE CPP                      #-}
{-# LANGUAGE ForeignFunctionInterface #-}

module Foreign.CUDA.Cublas.Types (

  -- * Types
  Handle(..), Status(..),
  Operation(..),
  SideMode(..),FillMode(..), DiagType(..), PointerMode(..), AtomicsMode(..),

) where

import Foreign (Ptr)

#include <cublas_v2.h>
{# context lib="cublas" #}


-- | Types

newtype Handle = Handle { useHandle :: {# type cublasHandle_t #}}

{# enum cublasStatus_t as Status
  { underscoreToCase }
  with prefix="CUBLAS_STATUS" deriving (Eq, Show) #}

{# enum cublasOperation_t as Operation
  { underscoreToCase }
  with prefix="CUBLAS_OP" deriving (Eq, Show) #}

{# enum cublasSideMode_t as SideMode
  { underscoreToCase }
  with prefix="CUBLAS" deriving (Eq, Show) #}

{# enum cublasFillMode_t as FillMode
  { underscoreToCase }
  with prefix="CUBLAS_FILL_MODE" deriving (Eq, Show) #}

{# enum cublasDiagType_t as DiagType
  { underscoreToCase }
  with prefix="CUBLAS_DIAG" deriving (Eq, Show) #}

{# enum cublasPointerMode_t as PointerMode
  { underscoreToCase }
  with prefix="CUBLAS_POINTER_MODE" deriving (Eq, Show) #}

{# enum cublasAtomicsMode_t as AtomicsMode
  { underscoreToCase }
  with prefix="CUBLAS_ATOMICS" deriving (Eq, Show) #}