README.md 1.24 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

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

Mozul Rémy's avatar
Mozul Rémy committed
8
fortran\_copied\_db : extend previous example with complex data structure
Mozul Rémy's avatar
Mozul Rémy committed
9
                    to illustrate technical principle. It also presents
10
                    the first pitfall by doing copy without wanting it
Mozul Rémy's avatar
Mozul Rémy committed
11 12
                    on data which are not explicitely pointers on C side.

Mozul Rémy's avatar
Mozul Rémy committed
13
fortran\_shared\_db : a modification of previous example to really share
Mozul Rémy's avatar
Mozul Rémy committed
14
                    memory of every field of the data structure.
Mozul Rémy's avatar
Mozul Rémy committed
15

16 17 18
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
19

20

21 22 23
Use and tests
-------------

frozar's avatar
frozar committed
24
Currently there is a makefile in each directory.
25 26 27 28 29
There should be an example in each directory !

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

Mozul Rémy's avatar
Mozul Rémy committed
30
A Fortran compiler implementing the iso\_c\_binding standard.
Mozul Rémy's avatar
Mozul Rémy committed
31
Cython, Python and NumPy. Tested with:
32 33 34 35 36 37 38 39 40 41 42
- 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
Mozul Rémy's avatar
Mozul Rémy committed
43
- Extensively test references count management
44