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

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

CHG: added Archive/23185-23389

File size: 3.3 KB
  • ../trunk-jpl/src/c/toolkits/mumps/MumpsSolve.cpp

     
    479479#endif
    480480
    481481#ifdef _HAVE_CODIPACK_
    482 void MumpsSolve_codi_b(codi::DataStore* data) {/*{{{*/
     482void MumpsSolve_codi_b(void* tape_in,void* data_in,void* ra) {/*{{{*/
     483
     484        /*recast data_in and tape*/
     485  codi::DataStore* data = (codi::DataStore*)data_in;
     486  //IssmDouble::TapeType& tape = (IssmDouble::TapeType&)tape_in;
    483487  IssmDouble::TapeType& tape = IssmDouble::getGlobalTape();
    484488
     489
    485490  IssmDouble::Real* valueATrans;
    486491  IssmDouble::GradientData* indexATrans;
    487492  int* irnATrans;
     
    523528  xDelete(adjX);
    524529}
    525530/*}}}*/
    526 void MumpsSolve_codi_delete(codi::DataStore* data) {/*{{{*/
     531void MumpsSolve_codi_delete(void* tape_in,void* data_in) {/*{{{*/
     532
     533        /*recast data_in*/
     534        codi::DataStore* data = (codi::DataStore*)data_in;
     535
    527536  IssmDouble::Real* valueATrans;
    528537  IssmDouble::GradientData* indexATrans;
    529538  int* irnATrans;
     
    615624    dataHandler->addData(local_nnz);
    616625    dataHandler->addData(parameters); // we assume here that parameters is still intact when the reverse run is called
    617626
    618          tape.pushExternalFunction(&MumpsSolve_codi_b, dataHandler, &MumpsSolve_codi_delete);
    619     //tape.pushExternalFunctionHandle(&MumpsSolve_codi_b, dataHandler, &MumpsSolve_codi_delete);
     627         //tape.pushExternalFunction(&MumpsSolve_codi_b, dataHandler, &MumpsSolve_codi_delete);
     628    tape.pushExternalFunctionHandle(&MumpsSolve_codi_b,(void*)dataHandler, &MumpsSolve_codi_delete);
    620629  } else {
    621630    // if the tape is active valueB is stored in the dataHandler and deleted in the reverse sweep
    622631    xDelete(valueB);
  • ../trunk-jpl/src/c/toolkits/gsl/DenseGslSolve.cpp

     
    253253#endif
    254254
    255255#ifdef _HAVE_CODIPACK_
    256 void SolverxSeq_codi_b(codi::DataStore* data) {/*{{{*/
    257   IssmDouble::TapeType& tape = IssmDouble::getGlobalTape();
     256void SolverxSeq_codi_b(void* tape_in,void* data_in,void* ra) {/*{{{*/
    258257
     258        /*recast data_in and tape*/
     259        codi::DataStore* data = (codi::DataStore*)data_in;
     260        //IssmDouble::TapeType& tape = (IssmDouble::TapeType&)tape_in;
     261        IssmDouble::TapeType& tape = IssmDouble::getGlobalTape();
     262
    259263  IssmDouble::Real* valueATrans;
    260264  IssmDouble::GradientData* indexATrans;
    261265  IssmDouble::GradientData* indexB;
     
    290294  xDelete(adjX);
    291295}
    292296/*}}}*/
    293 void SolverxSeq_codi_delete(codi::DataStore* data) {/*{{{*/
     297void SolverxSeq_codi_delete(void* tape_in,void* data_in) {/*{{{*/
     298
     299        /*recast data_in*/
     300        codi::DataStore* data = (codi::DataStore*)data_in;
     301
    294302  IssmDouble::Real* valueATrans;
    295303  IssmDouble::GradientData* indexATrans;
    296304  IssmDouble::GradientData* indexB;
     
    364372    // store other arguments
    365373    dataHandler->addData(n);
    366374
    367     tape.pushExternalFunction(&SolverxSeq_codi_b, dataHandler, &SolverxSeq_codi_delete);
     375    tape.pushExternalFunctionHandle(&SolverxSeq_codi_b, dataHandler, &SolverxSeq_codi_delete);
    368376  } else {
    369377    // if the tape is active valueX is stored in the dataHandler and deleted in the reverse sweep
    370378    xDelete(valueX);
Note: See TracBrowser for help on using the repository browser.