summaryrefslogtreecommitdiff
path: root/Foreign/CUDA/Cublas/Types.chs
diff options
context:
space:
mode:
authorbmsherman <>2014-07-11 04:13:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2014-07-11 04:13:00 (GMT)
commit64a7cbd4fd9a29dc735f62ac461feccfe9d06701 (patch)
treeee99bdf1c286454019c9c2a6014bd9d1df20ffde /Foreign/CUDA/Cublas/Types.chs
version 0.2.0.00.2.0.0
Diffstat (limited to 'Foreign/CUDA/Cublas/Types.chs')
-rw-r--r--Foreign/CUDA/Cublas/Types.chs49
1 files changed, 49 insertions, 0 deletions
diff --git a/Foreign/CUDA/Cublas/Types.chs b/Foreign/CUDA/Cublas/Types.chs
new file mode 100644
index 0000000..14ab7ce
--- /dev/null
+++ b/Foreign/CUDA/Cublas/Types.chs
@@ -0,0 +1,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) #}