Changeset 772


Ignore:
Timestamp:
Jan 24, 2020 7:09:41 PM (2 months ago)
Author:
kulshres
Message:

Squashed merge from git master into svn

at master commit 9d229164475f75c718d8ad13d744cc329c6607bd

all build files need to be regenerated

Location:
trunk
Files:
14 added
1 deleted
19 edited

Legend:

Unmodified
Added
Removed
  • trunk/ADOL-C/examples/tapeless_scalar.vcxproj

    r632 r772  
    7575    <ClCompile>
    7676      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    77       <AdditionalIncludeDirectories>$(ProjectDir)..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
     77      <AdditionalIncludeDirectories>$(ProjectDir)..\..\MSVisualStudio\v14\boost;$(ProjectDir)..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    7878      <WarningLevel>Level3</WarningLevel>
    7979      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     
    9191    <ClCompile>
    9292      <PreprocessorDefinitions>WIN64;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    93       <AdditionalIncludeDirectories>$(ProjectDir)..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
     93      <AdditionalIncludeDirectories>$(ProjectDir)..\..\MSVisualStudio\v14\boost;$(ProjectDir)..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    9494      <WarningLevel>Level3</WarningLevel>
    9595      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     
    107107    <ClCompile>
    108108      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    109       <AdditionalIncludeDirectories>$(ProjectDir)..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
     109      <AdditionalIncludeDirectories>$(ProjectDir)..\..\MSVisualStudio\v14\boost;$(ProjectDir)..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    110110      <WarningLevel>Level3</WarningLevel>
    111111      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     
    121121    <ClCompile>
    122122      <PreprocessorDefinitions>WIN64;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    123       <AdditionalIncludeDirectories>$(ProjectDir)..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
     123      <AdditionalIncludeDirectories>$(ProjectDir)..\..\MSVisualStudio\v14\boost;$(ProjectDir)..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    124124      <WarningLevel>Level3</WarningLevel>
    125125      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
  • trunk/ADOL-C/examples/tapeless_vector.vcxproj

    r632 r772  
    7575    <ClCompile>
    7676      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    77       <AdditionalIncludeDirectories>$(ProjectDir)..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
     77      <AdditionalIncludeDirectories>$(ProjectDir)..\..\MSVisualStudio\v14\boost;$(ProjectDir)..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    7878      <WarningLevel>Level3</WarningLevel>
    7979      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     
    9191    <ClCompile>
    9292      <PreprocessorDefinitions>WIN64;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    93       <AdditionalIncludeDirectories>$(ProjectDir)..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
     93      <AdditionalIncludeDirectories>$(ProjectDir)..\..\MSVisualStudio\v14\boost;$(ProjectDir)..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    9494      <WarningLevel>Level3</WarningLevel>
    9595      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     
    107107    <ClCompile>
    108108      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    109       <AdditionalIncludeDirectories>$(ProjectDir)..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
     109      <AdditionalIncludeDirectories>$(ProjectDir)..\..\MSVisualStudio\v14\boost;$(ProjectDir)..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    110110      <WarningLevel>Level3</WarningLevel>
    111111      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
     
    121121    <ClCompile>
    122122      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
    123       <AdditionalIncludeDirectories>$(ProjectDir)..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
     123      <AdditionalIncludeDirectories>$(ProjectDir)..\..\MSVisualStudio\v14\boost;$(ProjectDir)..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    124124      <WarningLevel>Level3</WarningLevel>
    125125      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
  • trunk/ADOL-C/include/adolc/adouble.h

    r764 r772  
    147147    /* Comparison (friends) */
    148148#if !defined(ADOLC_ADVANCED_BRANCHING)
    149     inline friend int operator != ( const badouble&, const badouble& );
    150     inline friend int operator == ( const badouble&, const badouble& );
    151     inline friend int operator <= ( const badouble&, const badouble& );
    152     inline friend int operator >= ( const badouble&, const badouble& );
    153     inline friend int operator >  ( const badouble&, const badouble& );
    154     inline friend int operator <  ( const badouble&, const badouble& );
    155 #endif
    156     inline friend int operator != ( double, const badouble& );
    157     friend ADOLC_DLL_EXPORT int operator != ( const badouble&, double );
    158     inline friend int operator == ( double, const badouble& );
    159     friend ADOLC_DLL_EXPORT int operator == ( const badouble&, double );
    160     inline friend int operator <= ( double, const badouble& );
    161     friend ADOLC_DLL_EXPORT int operator <= ( const badouble&, double );
    162     inline friend int operator >= ( double, const badouble& );
    163     friend ADOLC_DLL_EXPORT int operator >= ( const badouble&, double );
    164     inline friend int operator >  ( double, const badouble& );
    165     friend ADOLC_DLL_EXPORT int operator >  ( const badouble&, double );
    166     inline friend int operator <  ( double, const badouble& );
    167     friend ADOLC_DLL_EXPORT int operator <  ( const badouble&, double );
     149    inline friend bool operator != ( const badouble&, const badouble& );
     150    inline friend bool operator == ( const badouble&, const badouble& );
     151    inline friend bool operator <= ( const badouble&, const badouble& );
     152    inline friend bool operator >= ( const badouble&, const badouble& );
     153    inline friend bool operator >  ( const badouble&, const badouble& );
     154    inline friend bool operator <  ( const badouble&, const badouble& );
     155#endif
     156    inline friend bool operator != ( double, const badouble& );
     157    friend ADOLC_DLL_EXPORT bool operator != ( const badouble&, double );
     158    inline friend bool operator == ( double, const badouble& );
     159    friend ADOLC_DLL_EXPORT bool operator == ( const badouble&, double );
     160    inline friend bool operator <= ( double, const badouble& );
     161    friend ADOLC_DLL_EXPORT bool operator <= ( const badouble&, double );
     162    inline friend bool operator >= ( double, const badouble& );
     163    friend ADOLC_DLL_EXPORT bool operator >= ( const badouble&, double );
     164    inline friend bool operator >  ( double, const badouble& );
     165    friend ADOLC_DLL_EXPORT bool operator >  ( const badouble&, double );
     166    inline friend bool operator <  ( double, const badouble& );
     167    friend ADOLC_DLL_EXPORT bool operator <  ( const badouble&, double );
    168168
    169169
     
    363363
    364364#if !defined(ADOLC_ADVANCED_BRANCHING)
    365 inline int operator != ( const badouble& u, const badouble& v ) {
     365inline bool operator != ( const badouble& u, const badouble& v ) {
    366366    return (u-v != 0);
    367367}
    368368
    369 inline int operator == ( const badouble& u, const badouble& v ) {
     369inline bool operator == ( const badouble& u, const badouble& v ) {
    370370    return (u-v == 0);
    371371}
    372372
    373 inline int operator <= ( const badouble& u, const badouble& v ) {
     373inline bool operator <= ( const badouble& u, const badouble& v ) {
    374374    return (u-v <= 0);
    375375}
    376376
    377 inline int operator >= ( const badouble& u, const badouble& v ) {
     377inline bool operator >= ( const badouble& u, const badouble& v ) {
    378378    return (u-v >= 0);
    379379}
    380380
    381 inline int operator > ( const badouble& u, const badouble& v ) {
     381inline bool operator > ( const badouble& u, const badouble& v ) {
    382382    return (u-v > 0);
    383383}
    384384
    385 inline int operator < ( const badouble& u, const badouble& v ) {
     385inline bool operator < ( const badouble& u, const badouble& v ) {
    386386    return (u-v < 0);
    387387}
    388388#endif
    389389
    390 inline int operator != ( double coval, const badouble& v) {
     390inline bool operator != ( double coval, const badouble& v) {
    391391    if (coval)
    392392        return (-coval+v != 0);
     
    395395}
    396396
    397 inline int operator == ( double coval, const badouble& v) {
     397inline bool operator == ( double coval, const badouble& v) {
    398398    if (coval)
    399399        return (-coval+v == 0);
     
    402402}
    403403
    404 inline int operator <= ( double coval, const badouble& v ) {
     404inline bool operator <= ( double coval, const badouble& v ) {
    405405    if (coval)
    406406        return (-coval+v >= 0);
     
    409409}
    410410
    411 inline int operator >= ( double coval, const badouble& v ) {
     411inline bool operator >= ( double coval, const badouble& v ) {
    412412    if (coval)
    413413        return (-coval+v <= 0);
     
    416416}
    417417
    418 inline int operator > ( double coval, const badouble& v ) {
     418inline bool operator > ( double coval, const badouble& v ) {
    419419    if (coval)
    420420        return (-coval+v < 0);
     
    423423}
    424424
    425 inline int operator < ( double coval, const badouble& v ) {
     425inline bool operator < ( double coval, const badouble& v ) {
    426426    if (coval)
    427427        return (-coval+v > 0);
  • trunk/ADOL-C/include/adolc/adtl.h

    r746 r772  
    4343double makeInf();
    4444
    45 //class adouble;
     45#ifdef USE_ADTL_REFCOUNTING
     46class adouble;
     47
     48class refcounter {
     49private:
     50    ADOLC_DLL_EXPIMP static size_t refcnt;
     51    ADOLC_DLL_EXPORT friend void setNumDir(const size_t p);
     52    friend class adouble;
     53public:
     54    refcounter() { ++refcnt; }
     55    ~refcounter() { --refcnt; }
     56    inline static size_t getNumLiveVar() {return refcnt;}
     57};
     58#endif
     59
    4660
    4761//class func_ad {
     
    165179
    166180    // not
    167     inline int operator ! () const;
    168 
    169     // comparision
    170     inline int operator != (const adouble&) const;
    171     inline int operator != (const double) const;
    172     inline friend int operator != (const double, const adouble&);
    173 
    174     inline int operator == (const adouble&) const;
    175     inline int operator == (const double) const;
    176     inline friend int operator == (const double, const adouble&);
    177 
    178     inline int operator <= (const adouble&) const;
    179     inline int operator <= (const double) const;
    180     inline friend int operator <= (const double, const adouble&);
    181 
    182     inline int operator >= (const adouble&) const;
    183     inline int operator >= (const double) const;
    184     inline friend int operator >= (const double, const adouble&);
    185 
    186     inline int operator >  (const adouble&) const;
    187     inline int operator >  (const double) const;
    188     inline friend int operator >  (const double, const adouble&);
    189 
    190     inline int operator <  (const adouble&) const;
    191     inline int operator <  (const double) const;
    192     inline friend int operator <  (const double, const adouble&);
     181    inline bool operator ! () const;
     182
     183    // comparison
     184    inline bool operator != (const adouble&) const;
     185    inline bool operator != (const double) const;
     186    inline friend bool operator != (const double, const adouble&);
     187
     188    inline bool operator == (const adouble&) const;
     189    inline bool operator == (const double) const;
     190    inline friend bool operator == (const double, const adouble&);
     191
     192    inline bool operator <= (const adouble&) const;
     193    inline bool operator <= (const double) const;
     194    inline friend bool operator <= (const double, const adouble&);
     195
     196    inline bool operator >= (const adouble&) const;
     197    inline bool operator >= (const double) const;
     198    inline friend bool operator >= (const double, const adouble&);
     199
     200    inline bool operator >  (const adouble&) const;
     201    inline bool operator >  (const double) const;
     202    inline friend bool operator >  (const double, const adouble&);
     203
     204    inline bool operator <  (const adouble&) const;
     205    inline bool operator <  (const double) const;
     206    inline friend bool operator <  (const double, const adouble&);
    193207
    194208    /*******************  getter / setter  ********************************/
     
    211225private:
    212226#if USE_BOOST_POOL
    213     static boost::pool<boost::default_user_allocator_new_delete>* advalpool;
     227    ADOLC_DLL_EXPIMP static boost::pool<boost::default_user_allocator_new_delete>* advalpool;
    214228#endif
    215229    double *adval;
     230#ifdef USE_ADTL_REFCOUNTING
     231    refcounter __rcnt;
     232#endif
    216233    ADOLC_DLL_EXPIMP static size_t numDir;
    217234    inline friend void setNumDir(const size_t p);
     
    228245
    229246inline void setNumDir(const size_t p) {
    230         fprintf(DIAG_OUT, "ADOL-C Warning: Tapeless: Setting numDir could change memory allocation of\n derivatives in existing adoubles and may lead to erronious results\n or memory corruption\n");
     247#ifdef USE_ADTL_REFCOUNTING
     248  if (refcounter::refcnt > 0) {
     249    fprintf(DIAG_OUT, "ADOL-C Warning: Tapeless: Setting numDir will not change the number of\n directional derivative in existing adoubles and may lead to erronious results\n or memory corruption\n Number of currently existing adoubles = %zu\n", refcounter::refcnt);
     250  }
     251#else
     252  fprintf(DIAG_OUT, "ADOL-C Warning: Tapeless: Setting numDir could change memory allocation of\n derivatives in existing adoubles and may lead to erronious results\n or memory corruption\n");
     253#endif
     254
    231255    if (p < 1) {
    232256        fprintf(DIAG_OUT, "ADOL-C Error: Tapeless: You are being a moron now.\n");
     
    938962
    939963// not
    940 inline int adouble::operator ! () const {
     964inline bool adouble::operator ! () const {
    941965    return PRIMAL_VALUE==0.0;
    942966}
    943967
    944 // comparision
    945 inline int adouble::operator != (const adouble &a) const {
     968// comparison
     969inline bool adouble::operator != (const adouble &a) const {
    946970    return PRIMAL_VALUE!=a.PRIMAL_VALUE;
    947971}
    948972
    949 inline int adouble::operator != (const double v) const {
     973inline bool adouble::operator != (const double v) const {
    950974    return PRIMAL_VALUE!=v;
    951975}
    952976
    953 inline int operator != (const double v, const adouble &a) {
     977inline bool operator != (const double v, const adouble &a) {
    954978    return v!=a.PRIMAL_VALUE;
    955979}
    956980
    957 inline int adouble::operator == (const adouble &a) const {
     981inline bool adouble::operator == (const adouble &a) const {
    958982    return PRIMAL_VALUE==a.PRIMAL_VALUE;
    959983}
    960984
    961 inline int adouble::operator == (const double v) const {
     985inline bool adouble::operator == (const double v) const {
    962986    return PRIMAL_VALUE==v;
    963987}
    964988
    965 inline int operator == (const double v, const adouble &a) {
     989inline bool operator == (const double v, const adouble &a) {
    966990    return v==a.PRIMAL_VALUE;
    967991}
    968992
    969 inline int adouble::operator <= (const adouble &a) const {
     993inline bool adouble::operator <= (const adouble &a) const {
    970994    return PRIMAL_VALUE<=a.PRIMAL_VALUE;
    971995}
    972996
    973 inline int adouble::operator <= (const double v) const {
     997inline bool adouble::operator <= (const double v) const {
    974998    return PRIMAL_VALUE<=v;
    975999}
    9761000
    977 inline int operator <= (const double v, const adouble &a) {
     1001inline bool operator <= (const double v, const adouble &a) {
    9781002    return v<=a.PRIMAL_VALUE;
    9791003}
    9801004
    981 inline int adouble::operator >= (const adouble &a) const {
     1005inline bool adouble::operator >= (const adouble &a) const {
    9821006    return PRIMAL_VALUE>=a.PRIMAL_VALUE;
    9831007}
    9841008
    985 inline int adouble::operator >= (const double v) const {
     1009inline bool adouble::operator >= (const double v) const {
    9861010    return PRIMAL_VALUE>=v;
    9871011}
    9881012
    989 inline int operator >= (const double v, const adouble &a) {
     1013inline bool operator >= (const double v, const adouble &a) {
    9901014    return v>=a.PRIMAL_VALUE;
    9911015}
    9921016
    993 inline int adouble::operator >  (const adouble &a) const {
     1017inline bool adouble::operator >  (const adouble &a) const {
    9941018    return PRIMAL_VALUE>a.PRIMAL_VALUE;
    9951019}
    9961020
    997 inline int adouble::operator >  (const double v) const {
     1021inline bool adouble::operator >  (const double v) const {
    9981022    return PRIMAL_VALUE>v;
    9991023}
    10001024
    1001 inline int operator >  (const double v, const adouble &a) {
     1025inline bool operator >  (const double v, const adouble &a) {
    10021026    return v>a.PRIMAL_VALUE;
    10031027}
    10041028
    1005 inline int adouble::operator <  (const adouble &a) const {
     1029inline bool adouble::operator <  (const adouble &a) const {
    10061030    return PRIMAL_VALUE<a.PRIMAL_VALUE;
    10071031}
    10081032
    1009 inline int adouble::operator <  (const double v) const {
     1033inline bool adouble::operator <  (const double v) const {
    10101034    return PRIMAL_VALUE<v;
    10111035}
    10121036
    1013 inline int operator <  (const double v, const adouble &a) {
     1037inline bool operator <  (const double v, const adouble &a) {
    10141038    return v<a.PRIMAL_VALUE;
    10151039}
  • trunk/ADOL-C/include/adolc/adtl_hov.h

    r759 r772  
    5151class adouble;
    5252
     53#ifdef USE_ADTL_REFCOUNTING
     54
    5355class refcounter {
    5456private:
     
    5961    friend class adouble;
    6062public:
    61 //    refcounter() { ++refcnt; }
    62 //    ~refcounter() { --refcnt; }
     63    refcounter() { ++refcnt; }
     64    ~refcounter() { --refcnt; }
     65    inline static size_t getNumLiveVar() {return refcnt;}
    6366};
     67#endif
    6468
    6569class func_ad {
     
    251255    double **ho_deriv;
    252256    list<unsigned int> pattern;
     257#ifdef USE_ADTL_REFCOUNTING
    253258    refcounter __rcnt;
     259#endif
    254260    inline static bool _do_val();
    255261    inline static bool _do_adval();
     
    319325
    320326inline void setNumDir(const size_t p) {
     327#ifdef USE_ADTL_REFCOUNTING
    321328    if (refcounter::refcnt > 0) {
    322329        fprintf(DIAG_OUT, "ADOL-C Warning: Tapeless: Setting numDir will not change the number of\n directional derivative in existing adoubles and may lead to erronious results\n or memory corruption\n Number of currently existing adoubles = %zu\n", refcounter::refcnt);
    323330    }
     331#else
     332    fprintf(DIAG_OUT, "ADOL-C Warning: Tapeless: Setting numDir could change memory allocation of\n derivatives in existing adoubles and may lead to erronious results\n or memory corruption\n");
     333#endif
    324334    if (p < 1) {
    325335        fprintf(DIAG_OUT, "ADOL-C Error: Tapeless: You are being a moron now.\n");
     
    338348
    339349inline void setMode(enum Mode newmode) {
    340     if (refcounter::refcnt > 0) {
    341         fprintf(DIAG_OUT, "ADOL-C Warning: Tapeless: Setting mode will the change the mode of\n computation in previously computed variables and may lead to erronious results\n or memory corruption\n Number of currently exisiting adoubles = %zu\n", refcounter::refcnt);
    342     }
     350#ifdef USE_ADTL_REFCOUNTING
     351  if (refcounter::refcnt > 0) {
     352    fprintf(DIAG_OUT, "ADOL-C Warning: Tapeless: Setting mode will the change the mode of\n computation in previously computed variables and may lead to erronious results\n or memory corruption\n Number of currently exisiting adoubles = %zu\n", refcounter::refcnt);
     353  }
     354#else
     355  fprintf(DIAG_OUT, "ADOL-C Warning: Tapeless: Setting mode will the change the mode of\n computation in previously computed variables and may lead to erronious results\n or memory corruption\n");
     356#endif
    343357    adouble::forward_mode = newmode;
    344358}
  • trunk/ADOL-C/include/adolc/internal/adolc_settings.h

    r765 r772  
    3535/*--------------------------------------------------------------------------*/
    3636/* Use reference counting for tapeless numbers */
    37 @ADTL_REFCNT@
     37#undef USE_ADTL_REFCOUNTING
    3838
    3939/*--------------------------------------------------------------------------*/
    4040/* Sparse drivers have been compiled */
    41 #undef SPARSE_DRIVERS
     41#define SPARSE_DRIVERS 1
    4242
    4343/*--------------------------------------------------------------------------*/
  • trunk/ADOL-C/src/adouble.cpp

    r762 r772  
    13031303/*--------------------------------------------------------------------------*/
    13041304/*   The Not Equal Operator (!=) */
    1305 int operator != ( const badouble& v, double coval ) {
     1305bool operator != ( const badouble& v, double coval ) {
    13061306    ADOLC_OPENMP_THREAD_NUMBER;
    13071307    ADOLC_OPENMP_GET_THREAD_NUMBER;
     
    13251325/*--------------------------------------------------------------------------*/
    13261326/*   The Equal Operator (==) */
    1327 int operator == ( const badouble& v, double coval) {
     1327bool operator == ( const badouble& v, double coval) {
    13281328    ADOLC_OPENMP_THREAD_NUMBER;
    13291329    ADOLC_OPENMP_GET_THREAD_NUMBER;
     
    13471347/*--------------------------------------------------------------------------*/
    13481348/*   The Less than or Equal Operator (<=)      */
    1349 int operator <= ( const badouble& v, double coval ) {
     1349bool operator <= ( const badouble& v, double coval ) {
    13501350    ADOLC_OPENMP_THREAD_NUMBER;
    13511351    ADOLC_OPENMP_GET_THREAD_NUMBER;
     
    13531353        return (-coval+v <= 0);
    13541354    else {
    1355         int b = (ADOLC_GLOBAL_TAPE_VARS.store[v.loc()] <= 0);
     1355        bool b = (ADOLC_GLOBAL_TAPE_VARS.store[v.loc()] <= 0);
    13561356        if (ADOLC_CURRENT_TAPE_INFOS.traceFlag) {
    13571357#if defined(ADOLC_TRACK_ACTIVITY)
     
    13701370/*--------------------------------------------------------------------------*/
    13711371/*   The Greater than or Equal Operator (>=)      */
    1372 int operator >= ( const badouble& v, double coval ) {
     1372bool operator >= ( const badouble& v, double coval ) {
    13731373    ADOLC_OPENMP_THREAD_NUMBER;
    13741374    ADOLC_OPENMP_GET_THREAD_NUMBER;
     
    13761376        return (-coval+v >= 0);
    13771377    else {
    1378         int b = (ADOLC_GLOBAL_TAPE_VARS.store[v.loc()] >= 0);
     1378        bool b = (ADOLC_GLOBAL_TAPE_VARS.store[v.loc()] >= 0);
    13791379        if (ADOLC_CURRENT_TAPE_INFOS.traceFlag) {
    13801380#if defined(ADOLC_TRACK_ACTIVITY)
     
    13931393/*--------------------------------------------------------------------------*/
    13941394/*   The Greater than Operator (>)      */
    1395 int operator > ( const badouble& v, double coval ) {
     1395bool operator > ( const badouble& v, double coval ) {
    13961396    ADOLC_OPENMP_THREAD_NUMBER;
    13971397    ADOLC_OPENMP_GET_THREAD_NUMBER;
     
    13991399        return (-coval+v > 0);
    14001400    else {
    1401         int b = (ADOLC_GLOBAL_TAPE_VARS.store[v.loc()] > 0);
     1401        bool b = (ADOLC_GLOBAL_TAPE_VARS.store[v.loc()] > 0);
    14021402        if (ADOLC_CURRENT_TAPE_INFOS.traceFlag) {
    14031403#if defined(ADOLC_TRACK_ACTIVITY)
     
    14161416/*--------------------------------------------------------------------------*/
    14171417/*   The Less than Operator (<)      */
    1418 int operator < ( const badouble& v, double coval ) {
     1418bool operator < ( const badouble& v, double coval ) {
    14191419    ADOLC_OPENMP_THREAD_NUMBER;
    14201420    ADOLC_OPENMP_GET_THREAD_NUMBER;
     
    14221422        return (-coval+v < 0);
    14231423    else {
    1424         int b = (ADOLC_GLOBAL_TAPE_VARS.store[v.loc()] < 0);
     1424        bool b = (ADOLC_GLOBAL_TAPE_VARS.store[v.loc()] < 0);
    14251425        if (ADOLC_CURRENT_TAPE_INFOS.traceFlag) {
    14261426#if defined(ADOLC_TRACK_ACTIVITY)
  • trunk/ADOL-C/src/adouble_tl.cpp

    r746 r772  
    3636
    3737size_t adouble::numDir = 1;
     38
     39#ifdef USE_ADTL_REFCOUNTING
     40size_t refcounter::refcnt = 0;
     41#endif
     42
    3843
    3944#if USE_BOOST_POOL
  • trunk/ADOL-C/src/drivers/psdrivers.c

    r764 r772  
    44 Revision: $Id$
    55 Contents: Easy to use drivers for piecewise smooth functions
    6            (with C and C++ callable interfaces including Fortran
     6           (with C and C++ callable interfaces including Fortran 
    77            callable versions).
    88
    9  Copyright (c) Andrea Walther, Sabrina Fiege
     9 Copyright (c) Andrea Walther, Sabrina Fiege 
    1010
    1111 This file is part of ADOL-C. This software is provided as open source.
    12  Any use, reproduct ion, or distribution of the software constitutes
     12 Any use, reproduct ion, or distribution of the software constitutes 
    1313 recipient's acceptance of the terms of the accompanying license file.
    14 
     14 
    1515----------------------------------------------------------------------------*/
    1616#include <adolc/drivers/psdrivers.h>
     
    3131/*                                                          abs-normal form */
    3232
    33 int abs_normal(short tag,      /* tape identifier */
    34                int m,          /* number od dependents   */
     33int abs_normal(short tag,      /* tape identifier */ 
     34               int m,          /* number od dependents   */             
    3535               int n,          /* number of independents */
    3636               int swchk,      /* number of switches (check) */
     
    4949  double *res, tmp;
    5050  s=get_num_switches(tag);
    51 
    52   /* This check is required because the user is probably allocating his
     51 
     52  /* This check is required because the user is probably allocating his 
    5353   * arrays sigma, cz, Z, L, Y, J according to swchk */
    5454  if (s != swchk) {
     
    7272        for(j=0;j<s;j++) { /* L[i][i] .. L[i][s] are theoretically zero,
    7373                            *  we probably don't need to copy them */
    74             L[i][j]=res[j+n];
     74            L[i][j]=res[j+n];   
    7575            if (j < i)
    7676              {
  • trunk/ADOL-C/src/drivers/psdriversf.c

    r764 r772  
    44 Revision: $Id$
    55 Contents: Easy to use drivers for piecewise smooth functions
    6            (with C and C++ callable interfaces including Fortran
     6           (with C and C++ callable interfaces including Fortran 
    77            callable versions).
    88
    9  Copyright (c) Andrea Walther, Sabrina Fiege, Kshitij Kulshreshtha
     9 Copyright (c) Andrea Walther, Sabrina Fiege, Kshitij Kulshreshtha 
    1010
    1111 This file is part of ADOL-C. This software is provided as open source.
    12  Any use, reproduct ion, or distribution of the software constitutes
     12 Any use, reproduct ion, or distribution of the software constitutes 
    1313 recipient's acceptance of the terms of the accompanying license file.
    14 
     14 
    1515----------------------------------------------------------------------------*/
    1616
     
    6060                 fdouble* fZ,
    6161                 fdouble* fL) {
    62     int rc = -1;
     62    int rc = -1; 
    6363    short tag = (short)*ftag;
    6464    int m = (int)*fdepen, n = (int)*findep, s=(int)*fswchk;
  • trunk/ADOL-C/src/fo_rev.c

    r762 r772  
    248248                   int    indep,     /* consistency chk on # of indeps */
    249249                   int    swchk,    /* consistency chk on # of switches */
    250                    short   *siggrad,
     250                   short   *siggrad,
    251251                   double  *lagrange,
    252252                   double *results) /*  coefficient vectors */
     
    17651765#else
    17661766                                      aTmp = ARES / 2.0;
     1767              fprintf(DIAG_OUT, "ADOL-C warning: fmin/fmax used with equal arguments, adjoints might be incorrect.\n");
    17671768                                      ARES_INC = 0.0;
    17681769                                      AARG2_INC += aTmp;
     
    18051806                    }
    18061807                    switchnum--;
    1807 #elif defined(_ABS_NORM_SIG_)
     1808#elif defined(_ABS_NORM_SIG_) 
    18081809                    aTmp = ARES;
    18091810                    ARES_INC = 0.0;
  • trunk/ADOL-C/src/fos_pl_sig_reverse.c

    r639 r772  
    44 Revision: $Id$
    55 Contents: fos_reverse (first-order-scalar reverse mode)
    6 
     6 
    77 Copyright (c) Kshitij Kulshreshtha
    8 
     8 
    99 This file is part of ADOL-C. This software is provided as open source.
    10  Any use, reproduction, or distribution of the software constitutes
     10 Any use, reproduction, or distribution of the software constitutes 
    1111 recipient's acceptance of the terms of the accompanying license file.
    12 
     12 
    1313----------------------------------------------------------------------------*/
    1414
  • trunk/INSTALL

    r1 r772  
    240240
    241241***********************************************************************
    242 *              INSTALLING ADOL-C ON WINDOWS PLATFORMS                 *
     242*              INSTALLING ADOL-C ON WINDOWS USING MINGW               *
    243243***********************************************************************
    244244
     
    248248The provided makefile set is optimized for the GNU-make system. Although
    249249other make systems may work too we strongly recommened using the GNU
    250 version. The later can be obtained from the download section of the MinGW
    251 project page located at
    252 
    253 http://www.mingw.org/download.shtml
    254 
    255 or from the files section of the SourceForge project page
    256 
    257 http://sourceforge.net/projects/mingw/
     250version.
     251
    258252
    259253Of the "mingw32-make*" package one only needs the executable from the "bin"
     
    283277COMPILING
    284278=========
    285 
    286 ADOL-C features a Windows compilation script named "comp_win.bat" that
    287 should be used. It is a simple wrapper that calls the make program with
    288 appropriate arguments. The script itself accepts a small number of
    289 switches what results in the following ways of calling it:
    290 
    291  1) "comp_win" or "comp_win library"
    292 
    293     Compiles the library only.
    294 
    295  2) "comp_win --with-exa"
    296 
    297     Compiles the library and all examples.
    298 
    299  3) "comp_win clean"
    300 
    301     Removes all created files including the library.
     279Use the MINGW shell to do the following:
     280
     281 1) Run
     282      $autoconf -fi
     283 2) Run
     284      $ ./configure --with-boost="/path/to/boost" --prefix="path/to/PREFIX"
     285    Since Windows has no standard location for boost we need to provide it.
     286    There are precompiled boost libraries available or build it yourself.
     287    Also provide a prefix for the looks of it.
     288
     289    The boost structure should look like
     290      |- boost/
     291         |- lib/                      // boost lib files
     292            |- libboost_system.a
     293            |- libboost_system.dll.a
     294            |- libboost_system.dll
     295            | ...
     296         |- boost/                    // boost sub folders and headers go here
     297            |- pool/
     298            |- ...
     299
     300 3) $ make
     301 4) $ make install
    302302
    303303There is (currently) no automatic way of installing the relevant headers
     
    328328======
    329329
    330 * It is possible to create a "static" library, too. Changes to "winflags_dll"
    331   are required to achieve this behaviour. The fourth line creates a variable
    332   named "AR" with the default value of "Change_Me". It should be set to the
    333   command name for building the static library. The value of "ARFLAGS" should
    334   be set accordingly.
     330* It is possible to create a "static" library, too.
    335331
    336332* It should be possible to use ADOL-C from within graphical programming
     
    339335
    340336
     337***********************************************************************
     338*              INSTALLING ADOL-C ON WINDOWS USING MSVC                *
     339***********************************************************************
     340
     341Please refer to the file windows/Readme_VC++.txt for building the library and
     342ADOL-C/examples/Readme_VC++.txt for the documented examples.
     343
     344
     345
    341346
    342347We would appreciate very much if you could give us feedback in case of
  • trunk/README

    r608 r772  
    44This new version of ADOL-C features new library functions for
    55
    6   - sparse Jacobians and sparse Hessians 
     6  - sparse Jacobians and sparse Hessians
    77  - external differentiated functions
    88  - optimal checkpointing
     
    1010  - parallel differentiation of OpenMP-parallel loops
    1111  - Lie derivatives of scalar, vector and covector fields
    12    
    13 and many bug fixes. 
     12
     13and many bug fixes.
    1414
    1515Furthermore the source code was adapted to allow a compilation with
    16 WINDOWS compilers. See file "INSTALL" for generic installation 
     16WINDOWS compilers. See file "INSTALL" for generic installation
    1717instructions and special instructions for the installation on a WINDOWS
    1818platform.
    19  
     19
    2020The complete documentation can be found in the subdirectory "doc".
    2121
     
    2525==================
    2626
    27 1. Run configure with possibly using one of these options:
     271. Type autoreconf -fi
     28
     292. Run configure with possibly using one of these options:
    2830
    2931  --prefix=PREFIX         install library and header files in PREFIX
     
    4042                          -with-openmp-flag=FLAG required
    4143
    42   --with-cflags=FLAGS     use CFLAGS=FLAGS (default: -O3 -Wall -ansi)
    43   --with-cxxflags=FLAGS   use CXXFLAGS=FLAGS (default: -O3 -Wall)
     44  --with-cflags=FLAGS     use CFLAGS=FLAGS (default: -g -O2)
     45  --with-cxxflags=FLAGS   use CXXFLAGS=FLAGS (default: -g -02 -std=c++11)
    4446
    45 2. Type make
     47  --with-boost=BOOST_PATH path to the compiled boost library, otherwise
     48                          the system one is chosen by default (if exists)
    4649
    47 3. Type make install
     503. Type make
     51
     524. Type make install
    4853
    4954   By default, `make install' will install all the files in ${PREFIX}/lib and
     
    7378the library's path to "/etc/ld.so.conf" the usage of LD_LIBRARY_PATH and the
    7479"-L" link switch becomes unnecessary. In many cases, for instance for
    75 PATH=/usr/local, the use of the -I directive for compiling sources becomes 
     80PATH=/usr/local, the use of the -I directive for compiling sources becomes
    7681unnecessary too.
    7782
     
    8186========
    8287
    83 Examples must be configured to build by using the configure switches 
     88Examples must be configured to build by using the configure switches
    8489   --enable-docexa or --enable-addexa.
    8590They will never be installed by make install but can be found in the
     
    8792
    8893
     94Windows Compilation with MINGW
     95==============================
     96
     97Please refer to INSTALL
    8998
    9099Windows Compilation with Visual Studio
    91100======================================
    92101
    93 Please refer to the file windows/Readme_VC++.txt for building the library and 
    94 ADOL-C/examples/Readme_VC++.txt for the documented examples. 
     102Please refer to the file windows/Readme_VC++.txt for building the library and
     103ADOL-C/examples/Readme_VC++.txt for the documented examples.
    95104
    96105
    97106
     107Unit tests
     108==========
     109
     110ADOL-C provides more than 400 unit tests to verify its basic functionality.
     111For more information how to run the tests, please check the README file in ADOL-C/boost-test directory.
     112
    98113Enjoy this new version!
    99114
  • trunk/autoconf/ax_boost_system.m4

    r596 r772  
    3636AC_DEFUN([AX_BOOST_SYSTEM],
    3737[
    38         AC_ARG_WITH([boost-system],
    39         AS_HELP_STRING([--with-boost-system@<:@=special-lib@:>@],
     38    AC_ARG_WITH([boost-system],
     39    AS_HELP_STRING([--with-boost-system@<:@=special-lib@:>@],
    4040                   [use the System library from boost - it is possible to specify a certain library for the linker
    4141                        e.g. --with-boost-system=boost_system-gcc-mt ]),
    4242        [
    4343        if test "$withval" = "no"; then
    44                         want_boost="no"
     44            want_boost="no"
    4545        elif test "$withval" = "yes"; then
    4646            want_boost="yes"
    4747            ax_boost_user_system_lib=""
    4848        else
    49                     want_boost="yes"
    50                 ax_boost_user_system_lib="$withval"
    51                 fi
     49            want_boost="yes"
     50        ax_boost_user_system_lib="$withval"
     51        fi
    5252        ],
    5353        [want_boost="yes"]
    54         )
     54    )
    5555
    56         if test "x$want_boost" = "xyes"; then
     56    if test "x$want_boost" = "xyes"; then
    5757        AC_REQUIRE([AC_PROG_CC])
    5858        AC_REQUIRE([AC_CANONICAL_BUILD])
    59                 CPPFLAGS_SAVED="$CPPFLAGS"
    60                 CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
    61                 export CPPFLAGS
     59        CPPFLAGS_SAVED="$CPPFLAGS"
     60        CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
     61        export CPPFLAGS
    6262
    63                 LDFLAGS_SAVED="$LDFLAGS"
    64                 LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
    65                 export LDFLAGS
     63        LDFLAGS_SAVED="$LDFLAGS"
     64        LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
     65        export LDFLAGS
    6666
    6767        AC_CACHE_CHECK(whether the Boost::System library is available,
    68                                            ax_cv_boost_system,
     68                       ax_cv_boost_system,
    6969        [AC_LANG_PUSH([C++])
    70                         CXXFLAGS_SAVE=$CXXFLAGS
     70            CXXFLAGS_SAVE=$CXXFLAGS
    7171
    72                         AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/system/error_code.hpp>]],
     72            AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/system/error_code.hpp>]],
    7373                                   [[boost::system::system_category]])],
    7474                   ax_cv_boost_system=yes, ax_cv_boost_system=no)
    75                         CXXFLAGS=$CXXFLAGS_SAVE
     75            CXXFLAGS=$CXXFLAGS_SAVE
    7676             AC_LANG_POP([C++])
    77                 ])
    78                 if test "x$ax_cv_boost_system" = "xyes"; then
    79                         AC_SUBST(BOOST_CPPFLAGS)
     77        ])
     78        if test "x$ax_cv_boost_system" = "xyes"; then
     79            AC_SUBST(BOOST_CPPFLAGS)
    8080
    81                         AC_DEFINE(HAVE_BOOST_SYSTEM,,[define if the Boost::System library is available])
     81            AC_DEFINE(HAVE_BOOST_SYSTEM,,[define if the Boost::System library is available])
    8282            BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
    8383
    84                         LDFLAGS_SAVE=$LDFLAGS
     84            LDFLAGS_SAVE=$LDFLAGS
    8585            if test "x$ax_boost_user_system_lib" = "x"; then
    8686                for libextension in `ls -r $BOOSTLIBDIR/libboost_system* 2>/dev/null | sed 's,.*/lib,,' | sed 's,\..*,,'` ; do
    8787                     ax_lib=${libextension}
    88                                     AC_CHECK_LIB($ax_lib, exit,
     88                    AC_CHECK_LIB($ax_lib, exit,
    8989                                 [BOOST_SYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_SYSTEM_LIB) link_system="yes"; break],
    9090                                 [link_system="no"])
    91                                 done
     91                done
    9292                if test "x$link_system" != "xyes"; then
    9393                for libextension in `ls -r $BOOSTLIBDIR/boost_system* 2>/dev/null | sed 's,.*/,,' | sed -e 's,\..*,,'` ; do
    9494                     ax_lib=${libextension}
    95                                     AC_CHECK_LIB($ax_lib, exit,
     95                    AC_CHECK_LIB($ax_lib, exit,
    9696                                 [BOOST_SYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_SYSTEM_LIB) link_system="yes"; break],
    9797                                 [link_system="no"])
    98                                 done
     98                done
    9999                fi
    100100
    101101            else
    102102               for ax_lib in $ax_boost_user_system_lib boost_system-$ax_boost_user_system_lib; do
    103                                       AC_CHECK_LIB($ax_lib, exit,
     103                      AC_CHECK_LIB($ax_lib, exit,
    104104                                   [BOOST_SYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_SYSTEM_LIB) link_system="yes"; break],
    105105                                   [link_system="no"])
     
    110110                AC_MSG_ERROR(Could not find a version of the library!)
    111111            fi
    112                         if test "x$link_system" = "xno"; then
    113                                 AC_MSG_ERROR(Could not link against $ax_lib !)
    114                         fi
    115                 fi
     112            if test "x$link_system" = "xno"; then
     113                AC_MSG_ERROR(Could not link against $ax_lib !)
     114            fi
     115        fi
    116116
    117                 CPPFLAGS="$CPPFLAGS_SAVED"
    118         LDFLAGS="$LDFLAGS_SAVED"
    119         fi
     117        CPPFLAGS="$CPPFLAGS_SAVED"
     118    LDFLAGS="$LDFLAGS_SAVED"
     119    fi
    120120])
  • trunk/configure.ac

    r771 r772  
    2424AC_PREFIX_DEFAULT(${HOME}/adolc_base)
    2525AM_INIT_AUTOMAKE([1.11 dist-bzip2 foreign subdir-objects])
    26 AM_MAINTAINER_MODE([disable])
    2726AM_SILENT_RULES([yes])
    2827
     
    597596                MSVisualStudio/v14/x64/sparse/config.h
    598597                MSVisualStudio/v14/x64/nosparse/config.h
    599                 adolc.spec
     598                adolc.spec
    600599                adolclib.pc
    601600)
Note: See TracChangeset for help on using the changeset viewer.