source: issm/oecreview/Archive/23185-23389/ISSM-23265-23266.diff@ 23390

Last change on this file since 23390 was 23390, checked in by Mathieu Morlighem, 6 years ago

CHG: added Archive/23185-23389

File size: 3.3 KB
RevLine 
[23390]1Index: ../trunk-jpl/src/c/toolkits/mumps/MumpsSolve.cpp
2===================================================================
3--- ../trunk-jpl/src/c/toolkits/mumps/MumpsSolve.cpp (revision 23265)
4+++ ../trunk-jpl/src/c/toolkits/mumps/MumpsSolve.cpp (revision 23266)
5@@ -479,9 +479,14 @@
6 #endif
7
8 #ifdef _HAVE_CODIPACK_
9-void MumpsSolve_codi_b(codi::DataStore* data) {/*{{{*/
10+void MumpsSolve_codi_b(void* tape_in,void* data_in,void* ra) {/*{{{*/
11+
12+ /*recast data_in and tape*/
13+ codi::DataStore* data = (codi::DataStore*)data_in;
14+ //IssmDouble::TapeType& tape = (IssmDouble::TapeType&)tape_in;
15 IssmDouble::TapeType& tape = IssmDouble::getGlobalTape();
16
17+
18 IssmDouble::Real* valueATrans;
19 IssmDouble::GradientData* indexATrans;
20 int* irnATrans;
21@@ -523,7 +528,11 @@
22 xDelete(adjX);
23 }
24 /*}}}*/
25-void MumpsSolve_codi_delete(codi::DataStore* data) {/*{{{*/
26+void MumpsSolve_codi_delete(void* tape_in,void* data_in) {/*{{{*/
27+
28+ /*recast data_in*/
29+ codi::DataStore* data = (codi::DataStore*)data_in;
30+
31 IssmDouble::Real* valueATrans;
32 IssmDouble::GradientData* indexATrans;
33 int* irnATrans;
34@@ -615,8 +624,8 @@
35 dataHandler->addData(local_nnz);
36 dataHandler->addData(parameters); // we assume here that parameters is still intact when the reverse run is called
37
38- tape.pushExternalFunction(&MumpsSolve_codi_b, dataHandler, &MumpsSolve_codi_delete);
39- //tape.pushExternalFunctionHandle(&MumpsSolve_codi_b, dataHandler, &MumpsSolve_codi_delete);
40+ //tape.pushExternalFunction(&MumpsSolve_codi_b, dataHandler, &MumpsSolve_codi_delete);
41+ tape.pushExternalFunctionHandle(&MumpsSolve_codi_b,(void*)dataHandler, &MumpsSolve_codi_delete);
42 } else {
43 // if the tape is active valueB is stored in the dataHandler and deleted in the reverse sweep
44 xDelete(valueB);
45Index: ../trunk-jpl/src/c/toolkits/gsl/DenseGslSolve.cpp
46===================================================================
47--- ../trunk-jpl/src/c/toolkits/gsl/DenseGslSolve.cpp (revision 23265)
48+++ ../trunk-jpl/src/c/toolkits/gsl/DenseGslSolve.cpp (revision 23266)
49@@ -253,9 +253,13 @@
50 #endif
51
52 #ifdef _HAVE_CODIPACK_
53-void SolverxSeq_codi_b(codi::DataStore* data) {/*{{{*/
54- IssmDouble::TapeType& tape = IssmDouble::getGlobalTape();
55+void SolverxSeq_codi_b(void* tape_in,void* data_in,void* ra) {/*{{{*/
56
57+ /*recast data_in and tape*/
58+ codi::DataStore* data = (codi::DataStore*)data_in;
59+ //IssmDouble::TapeType& tape = (IssmDouble::TapeType&)tape_in;
60+ IssmDouble::TapeType& tape = IssmDouble::getGlobalTape();
61+
62 IssmDouble::Real* valueATrans;
63 IssmDouble::GradientData* indexATrans;
64 IssmDouble::GradientData* indexB;
65@@ -290,7 +294,11 @@
66 xDelete(adjX);
67 }
68 /*}}}*/
69-void SolverxSeq_codi_delete(codi::DataStore* data) {/*{{{*/
70+void SolverxSeq_codi_delete(void* tape_in,void* data_in) {/*{{{*/
71+
72+ /*recast data_in*/
73+ codi::DataStore* data = (codi::DataStore*)data_in;
74+
75 IssmDouble::Real* valueATrans;
76 IssmDouble::GradientData* indexATrans;
77 IssmDouble::GradientData* indexB;
78@@ -364,7 +372,7 @@
79 // store other arguments
80 dataHandler->addData(n);
81
82- tape.pushExternalFunction(&SolverxSeq_codi_b, dataHandler, &SolverxSeq_codi_delete);
83+ tape.pushExternalFunctionHandle(&SolverxSeq_codi_b, dataHandler, &SolverxSeq_codi_delete);
84 } else {
85 // if the tape is active valueX is stored in the dataHandler and deleted in the reverse sweep
86 xDelete(valueX);
Note: See TracBrowser for help on using the repository browser.