summaryrefslogtreecommitdiff
path: root/packages/sundials/src/Arkode.hsc
diff options
context:
space:
mode:
authorDominic Steinitz <dominic@steinitz.org>2018-04-02 08:09:24 +0100
committerDominic Steinitz <dominic@steinitz.org>2018-04-02 08:09:24 +0100
commit2fc97b003f704d57ac7f798ed881f8c9ccab9918 (patch)
tree755825532090452a122d611d85d0cfdb50dea3a9 /packages/sundials/src/Arkode.hsc
parent3c4411e48cbcfaf8035e893ac63aa250fcc56d3e (diff)
Fix warnings
Diffstat (limited to 'packages/sundials/src/Arkode.hsc')
-rw-r--r--packages/sundials/src/Arkode.hsc4
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/sundials/src/Arkode.hsc b/packages/sundials/src/Arkode.hsc
index ae2b40f..83d1127 100644
--- a/packages/sundials/src/Arkode.hsc
+++ b/packages/sundials/src/Arkode.hsc
@@ -4,7 +4,6 @@ module Arkode where
4 4
5import Foreign 5import Foreign
6import Foreign.C.Types 6import Foreign.C.Types
7import Foreign.C.String
8 7
9 8
10#include <stdio.h> 9#include <stdio.h>
@@ -14,12 +13,14 @@ import Foreign.C.String
14#include <sunmatrix/sunmatrix_dense.h> 13#include <sunmatrix/sunmatrix_dense.h>
15#include <arkode/arkode.h> 14#include <arkode/arkode.h>
16 15
16
17#def typedef struct _generic_N_Vector SunVector; 17#def typedef struct _generic_N_Vector SunVector;
18#def typedef struct _N_VectorContent_Serial SunContent; 18#def typedef struct _N_VectorContent_Serial SunContent;
19 19
20#def typedef struct _generic_SUNMatrix SunMatrix; 20#def typedef struct _generic_SUNMatrix SunMatrix;
21#def typedef struct _SUNMatrixContent_Dense SunMatrixContent; 21#def typedef struct _SUNMatrixContent_Dense SunMatrixContent;
22 22
23getContentMatrixPtr :: Storable a => Ptr b -> IO a
23getContentMatrixPtr ptr = (#peek SunMatrix, content) ptr 24getContentMatrixPtr ptr = (#peek SunMatrix, content) ptr
24 25
25getNRows :: Ptr b -> IO CInt 26getNRows :: Ptr b -> IO CInt
@@ -32,6 +33,7 @@ getNCols ptr = (#peek SunMatrixContent, N) ptr
32putNCols :: CInt -> Ptr b -> IO () 33putNCols :: CInt -> Ptr b -> IO ()
33putNCols nc ptr = (#poke SunMatrixContent, N) ptr nc 34putNCols nc ptr = (#poke SunMatrixContent, N) ptr nc
34 35
36getMatrixData :: Storable a => Ptr b -> IO a
35getMatrixData ptr = (#peek SunMatrixContent, data) ptr 37getMatrixData ptr = (#peek SunMatrixContent, data) ptr
36 38
37getContentPtr :: Storable a => Ptr b -> IO a 39getContentPtr :: Storable a => Ptr b -> IO a