Changeset 13242
- Timestamp:
- 09/04/12 14:57:50 (13 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/matlab/io/WriteMatlabData.cpp
r13227 r13242 9 9 #endif 10 10 11 #include <mex.h> 11 12 #include "../../include/include.h" 12 13 #include "../../shared/shared.h" 13 14 #include "./matlabio.h" 14 15 #include <mex.h>16 17 15 18 16 /*Primitive data types*/ -
issm/trunk-jpl/src/c/matlab/io/matlabio.h
r13227 r13242 12 12 #endif 13 13 14 #include <mex.h> 14 15 #include "../../classes/classes.h" 15 16 #include "../../Container/Container.h" 16 17 #include "../../include/include.h" 17 18 #include <mex.h>19 18 20 19 void WriteData(mxArray** pdataref,SeqMat<double>* matrix); -
issm/trunk-jpl/src/c/python/io/WritePythonData.cpp
r13226 r13242 20 20 #include "../../EnumDefinitions/EnumDefinitions.h" 21 21 22 22 /*Primitive data types*/ 23 23 /*FUNCTION WriteData(PyObject* py_tuple,int index,int integer){{{*/ 24 24 void WriteData(PyObject* py_tuple, int index, int integer){ … … 33 33 34 34 }/*}}}*/ 35 /*FUNCTION WriteData(PyObject* tuple,int index,SeqMat<double>* matrix){{{*/ 36 void WriteData(PyObject* tuple,int index,SeqMat<double>* matrix){ 35 /*FUNCTION WriteData(PyObject* py_tuple,int index, double* matrix, int M, int N){{{*/ 36 void WriteData(PyObject* tuple, int index, double* matrix, int M,int N){ 37 38 npy_intp dims[2]={0,0}; 39 PyObject* array=NULL; 40 41 dims[0]=(npy_intp)M; 42 dims[1]=(npy_intp)N; 43 array=PyArray_SimpleNewFromData(2,dims,NPY_DOUBLE,matrix); 44 45 PyTuple_SetItem(tuple, index, array); 46 }/*}}}*/ 47 48 /*ISSM objects*/ 49 /*FUNCTION WriteData(PyObject* py_tuple,int index,BamgGeom* bamggeom){{{*/ 50 void WriteData(PyObject* py_tuple,int index,BamgGeom* bamggeom){ 51 52 _error_("not implemented yes, see ../../matlab/io/WriteMatlabData.cpp"); 53 } 54 /*}}}*/ 55 /*FUNCTION WriteData(PyObject* py_tuple,int index,BamgMesh* bamgmesh){{{*/ 56 void WriteData(PyObject* py_tuple,int index,BamgMesh* bamgmesh){ 57 58 _error_("not implemented yes, see ../../matlab/io/WriteMatlabData.cpp"); 59 } 60 /*}}}*/ 61 /*FUNCTION WriteData(PyObject* py_tuple,int index,SeqMat<double>* matrix){{{*/ 62 void WriteData(PyObject* py_tuple,int index,SeqMat<double>* matrix){ 37 63 38 64 int M,N; … … 47 73 array=PyArray_SimpleNewFromData(2,dims,NPY_DOUBLE,buffer); 48 74 49 PyTuple_SetItem( tuple, index, array);75 PyTuple_SetItem(py_tuple, index, array); 50 76 51 77 }/*}}}*/ … … 64 90 65 91 PyTuple_SetItem(tuple, index, array); 66 67 68 92 } 69 93 /*}}}*/ 70 /*FUNCTION WriteData(PyObject* py_tuple,int index, double* matrix, int M, int N){{{*/71 void WriteData(PyObject* tuple, int index, double* matrix, int M,int N){72 73 npy_intp dims[2]={0,0};74 PyObject* array=NULL;75 76 dims[0]=(npy_intp)M;77 dims[1]=(npy_intp)N;78 array=PyArray_SimpleNewFromData(2,dims,NPY_DOUBLE,matrix);79 80 PyTuple_SetItem(tuple, index, array);81 82 }/*}}}*/ -
issm/trunk-jpl/src/c/python/io/pythonio.h
r13226 r13242 12 12 #endif 13 13 14 15 14 #include "../../classes/classes.h" 16 15 #include "../../Container/Container.h" 17 16 #include "../../include/include.h" 18 17 19 class DataSet; 20 class Parameters; 18 void WriteData(PyObject* py_tuple,int index, double* matrix, int M,int N); 19 void WriteData(PyObject* py_tuple,int index, int integer); 20 void WriteData(PyObject* py_tuple,int index, char* string); 21 void WriteData(PyObject* py_tuple,int index, SeqMat<double>* matrix); 22 void WriteData(PyObject* py_tuple,int index, SeqVec<double>* vector); 23 void WriteData(PyObject* py_tuple,int index, BamgGeom* bamggeom); 24 void WriteData(PyObject* py_tuple,int index, BamgMesh* bamgmesh); 21 25 22 //void WriteData(PyObject* py_tuple,DataSet* dataset);23 //void WriteData(PyObject* py_tuple,int* matrix, int M,int N);24 //void WriteData(PyObject* py_tuple,double* vector, int M);25 //void WriteData(PyObject* py_tuple,int integer);26 //void WriteData(PyObject* py_tuple,bool boolean);27 //void WriteData(PyObject* py_tuple,double scalar);28 //void WriteData(DataHandle* py_tuple,Parameters* parameters);29 void WriteData(PyObject* py_tuple, int index, double* matrix, int M,int N);30 void WriteData(PyObject* py_tuple, int index, int integer);31 void WriteData(PyObject* py_tuple, int index, char* string);32 void WriteData(PyObject* py_tuple, int index, SeqMat<double>* matrix);33 void WriteData(PyObject* py_tuple, int index, SeqVec<double>* vector);34 35 //void FetchData(DataSet** pdataset,PyObject* py_ref);36 //void FetchData(double** pmatrix,int* pnumel,int* pndims,int** psize,PyObject* py_ref);37 //void FetchData(int** pmatrix,int* pM,int *pN,PyObject* py_ref);38 //void FetchData(bool** pmatrix,int* pM,int *pN,PyObject* py_ref);39 //void FetchData(bool** pmatrix,int* pnumel,int* pndims,int** psize,PyObject* py_ref);40 //void FetchData(Matrix** pmatrix,PyObject* py_ref);41 //void FetchData(int** pvector,int* pM,PyObject* py_ref);42 //void FetchData(float** pvector,int* pM,PyObject* py_ref);43 //void FetchData(bool** pvector,int* pM,PyObject* py_ref);44 //void FetchData(Vector** pvector,PyObject* py_ref);45 //void FetchData(char** pmatrix,int* pnumel,int* pndims,int** psize,PyObject* py_ref);46 //void FetchData(Parameters** pparameters, DataHandle py_ref);47 26 void FetchData(double** pvector,int* pM,PyObject* py_ref); 48 27 void FetchData(double** pmatrix,int* pM,int *pN,PyObject* py_array);
Note:
See TracChangeset
for help on using the changeset viewer.