README 1.5 KB
Newer Older
Mozul Rémy's avatar
Mozul Rémy committed
1

2 3
Directory organisation
----------------------
Mozul Rémy's avatar
Mozul Rémy committed
4

5 6
logilab_sprint : directory contains the source of the first test written
                 during a sprint with logilab.
Mozul Rémy's avatar
Mozul Rémy committed
7

8 9 10 11 12 13
fortran_copied_db : extend previous example with complex data structure
                    to illustrate technical principal. It also presents
                    the first pitfall by doing copy without wanting it
                    on data which are not explicitely pointers on C side
fortran_shared_db : a modification of previous example to really share
                    memory of every field of the data structure
Mozul Rémy's avatar
Mozul Rémy committed
14

15 16 17
The following link has been used to instanciate a numpy array referencing
a fortran allocated array :
https://gist.github.com/1249305/bd8a6922507b7e5da0f1417fdba77d5115dd12d4
Mozul Rémy's avatar
Mozul Rémy committed
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 50 51 52
Use and tests
-------------

Currently there is makefile in each directory.
There should be an example in each directory !

Dependencies
------------

A Fortran compiler implementing the iso_c_binding standard.
Cython and Python. Tested with:
- gfortran 4.8.2
- python 2.7
- numpy 1.8.0
- cython 0.20

To do
-----

- Use cmake in one of the directories
- Try with python3
- Sort how to reference properly the content of "weird" arrays

.. mod_type.f90 : description du type bind(c)
.. type.h : header associé a mod_type.f90
.. 
.. ctest.pxd : equivalent d'un header pour cython
..            (voir si on peut faire une génération auto)
.. test.pyx : module p/cython implémentant la classe python
..            wrappant le contenu du .pxd
.. 
.. pytest.py : le test