Changeset 498


Ignore:
Timestamp:
Apr 24, 2014 6:32:03 AM (6 years ago)
Author:
kulshres
Message:

add adubp_from_adub as friend function

From: Sebastian Walter <sebastian.walter@…>
Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

Location:
trunk/ADOL-C
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ADOL-C/include/adolc/adouble.h

    r433 r498  
    246246    friend ADOLC_DLL_EXPORT class advector;
    247247    friend ADOLC_DLL_EXPORT class adubref;
     248    friend ADOLC_DLL_EXPORT adub* adubp_from_adub(const adub&);
    248249    adub( adub const &) {}
    249250protected:
  • trunk/ADOL-C/src/adouble.cpp

    r495 r498  
    185185#endif
    186186}
     187
     188
     189/****************************************************************************/
     190/*                                                                  HELPERS */
     191
     192adub* adubp_from_adub(const adub& a) {
     193    locint locat = next_loc();
     194    adub *retp = new adub(locat);
     195    (*retp).badouble::operator=(a);
     196    return retp;
     197}
     198
    187199
    188200/****************************************************************************/
Note: See TracChangeset for help on using the changeset viewer.