source:
issm/oecreview/Archive/23185-23389/ISSM-23265-23266.diff
Last change on this file was 23390, checked in by , 6 years ago | |
---|---|
File size: 3.3 KB |
-
../trunk-jpl/src/c/toolkits/mumps/MumpsSolve.cpp
479 479 #endif 480 480 481 481 #ifdef _HAVE_CODIPACK_ 482 void MumpsSolve_codi_b(codi::DataStore* data) {/*{{{*/ 482 void 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; 483 487 IssmDouble::TapeType& tape = IssmDouble::getGlobalTape(); 484 488 489 485 490 IssmDouble::Real* valueATrans; 486 491 IssmDouble::GradientData* indexATrans; 487 492 int* irnATrans; … … 523 528 xDelete(adjX); 524 529 } 525 530 /*}}}*/ 526 void MumpsSolve_codi_delete(codi::DataStore* data) {/*{{{*/ 531 void MumpsSolve_codi_delete(void* tape_in,void* data_in) {/*{{{*/ 532 533 /*recast data_in*/ 534 codi::DataStore* data = (codi::DataStore*)data_in; 535 527 536 IssmDouble::Real* valueATrans; 528 537 IssmDouble::GradientData* indexATrans; 529 538 int* irnATrans; … … 615 624 dataHandler->addData(local_nnz); 616 625 dataHandler->addData(parameters); // we assume here that parameters is still intact when the reverse run is called 617 626 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); 620 629 } else { 621 630 // if the tape is active valueB is stored in the dataHandler and deleted in the reverse sweep 622 631 xDelete(valueB); -
../trunk-jpl/src/c/toolkits/gsl/DenseGslSolve.cpp
253 253 #endif 254 254 255 255 #ifdef _HAVE_CODIPACK_ 256 void SolverxSeq_codi_b(codi::DataStore* data) {/*{{{*/ 257 IssmDouble::TapeType& tape = IssmDouble::getGlobalTape(); 256 void SolverxSeq_codi_b(void* tape_in,void* data_in,void* ra) {/*{{{*/ 258 257 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 259 263 IssmDouble::Real* valueATrans; 260 264 IssmDouble::GradientData* indexATrans; 261 265 IssmDouble::GradientData* indexB; … … 290 294 xDelete(adjX); 291 295 } 292 296 /*}}}*/ 293 void SolverxSeq_codi_delete(codi::DataStore* data) {/*{{{*/ 297 void SolverxSeq_codi_delete(void* tape_in,void* data_in) {/*{{{*/ 298 299 /*recast data_in*/ 300 codi::DataStore* data = (codi::DataStore*)data_in; 301 294 302 IssmDouble::Real* valueATrans; 295 303 IssmDouble::GradientData* indexATrans; 296 304 IssmDouble::GradientData* indexB; … … 364 372 // store other arguments 365 373 dataHandler->addData(n); 366 374 367 tape.pushExternalFunction (&SolverxSeq_codi_b, dataHandler, &SolverxSeq_codi_delete);375 tape.pushExternalFunctionHandle(&SolverxSeq_codi_b, dataHandler, &SolverxSeq_codi_delete); 368 376 } else { 369 377 // if the tape is active valueX is stored in the dataHandler and deleted in the reverse sweep 370 378 xDelete(valueX);
Note:
See TracBrowser
for help on using the repository browser.