Changeset 26534
- Timestamp:
- 11/04/21 08:29:26 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/shared/io/Marshalling/Marshalling.cpp
r26432 r26534 10 10 11 11 #include "./Marshalling.h" 12 #include "../../Numerics/isnan.h" 12 13 13 14 WriteCheckpointFunctor::WriteCheckpointFunctor(char** pmarshalled_data_in) : MarshallHandle(MARSHALLING_WRITE){/*{{{*/ … … 83 84 void RegisterInputFunctor::call(IssmDouble & value){/*{{{*/ 84 85 _assert_(this->double_count<size_max); 86 _assert_(!xIsNan<IssmDouble>(value)); 85 87 this->tape_codi->registerInput(value); 86 88 this->identifiers[this->double_count] = value.getIdentifier(); … … 91 93 for(int i=0;i<size;i++){ 92 94 _assert_(this->double_count<size_max); 95 _assert_(!xIsNan<IssmDouble>(value[i])); 93 96 this->tape_codi->registerInput(value[i]); 94 97 this->identifiers[this->double_count] = value[i].getIdentifier(); … … 107 110 }/*}}}*/ 108 111 void RegisterOutputFunctor::call(IssmDouble & value){/*{{{*/ 112 _assert_(!xIsNan<IssmDouble>(value)); 109 113 this->tape_codi->registerOutput(value); 110 114 this->double_count++; … … 113 117 if(value){ 114 118 for(int i=0;i<size;i++){ 119 _assert_(!xIsNan<IssmDouble>(value[i])); 115 120 this->tape_codi->registerOutput(value[i]); 116 121 this->double_count++; … … 131 136 void SetAdjointFunctor::call(IssmDouble & value){/*{{{*/ 132 137 _assert_(this->double_count<size_max); 138 _assert_(!xIsNan<IssmDouble>(this->adjoint[this->double_count])); 133 139 value.gradient() = this->adjoint[this->double_count]; 134 140 this->double_count++; … … 138 144 for(int i=0;i<size;i++){ 139 145 _assert_(this->double_count<size_max); 146 _assert_(!xIsNan<IssmDouble>(this->adjoint[this->double_count])); 140 147 value[i].gradient() = this->adjoint[this->double_count]; 141 148 this->double_count++;
Note:
See TracChangeset
for help on using the changeset viewer.