Jul 12, 2016 4:18:44 AM (3 years ago)

Merge branch 'master' of 'gitclone' into 'svn'

The following changes have been merged:

commit e2291bde44a282a133894b0db350aeb0b92a87db
Author: Mladen Banovic <mladenbanovic2705@…>
Date: Fri Jul 8 10:15:51 2016 +0200

Add methods getNumLiveVar and getNumDir in adtl.h, change counter type in FOR_I_EQ_0_LT_NUMDIR macro to size_t (instead of int). Update chunk size of BOOST pool in adouble_tl.cpp according to adouble::numDir.

commit 2ffb294465b973bfd4bf1f73d84478f8233c0d2f
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Thu Jun 23 12:32:14 2016 +0200

implement missing ref_eq_mult_p und ref_eq_min_p in ho_rev.c

somehow these were left out when parameters were being implemented.

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit 8cf0e5c1bd36f1dcf3be72cd67de631b2e1d0ee6
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Thu Jun 23 12:31:04 2016 +0200

make sure the result is the last locint written in trace for each operation

since we're trying to generate ascii traces in the future, we'll need this
convention that the last location is the result, and previous locations
are arguments. This has been the case for almost all operations anyway
except for a few new one's that I wrote without keeping this in mind.

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit 9ae0ff220f37463f2ed85cafc8a626c24e472f2f
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Tue Jun 21 14:16:27 2016 +0200

on some compilers newer boost interferes with AC_FUNC_MALLOC test

so do AC_FUNC_MALLOC and AC_FUNC_REALLOC as usual and check for boost
library later.

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit b746f620772cc8cce53e8f350adc6281279caf72
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Mon Jun 20 15:32:22 2016 +0200

make Klaus Röbenack's name UTF-8 instead of ISO-8859-1

These are the only places where we're not simple ASCII or UTF-8 already

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit 1171aa3961b5eb46a5d2ee64751c02a393a8a6f5
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Fri Jun 17 10:42:39 2016 +0200

correct short_ref document about include file

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit 2c6b2aac2ef04431ece2c6ff80e574aa2e58814b
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Fri Jun 17 10:40:34 2016 +0200

correct error message to new semantics

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit 506cde73451740bf0a15eff7d4abb158ee719ab0
Author: mflehmig <martin.flehmig@…>
Date: Fri Jun 17 10:14:26 2016 +0200

Fixed include of ADOL-C header.

ADOL-C header was included in old fashion (without adolc directory) for this example.

commit 2a023d3281d3d6d9824bad724a5768e3ee2fff94
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Thu Jun 16 13:50:39 2016 +0200

Try to use boost::pool for allocating advals in traceless vector mode

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit 80f1e2019ac1faab96fe06f3e9da47efcc1bcd23
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Mon May 23 15:13:22 2016 +0200

correct a reference in doc and rebuild

commit d7ab5283afe58bacb2e8739d72ede4e17f4c8081
Author: Mladen Banovic <mladenbanovic2705@…>
Date: Fri May 20 16:42:13 2016 +0200

Update section 7 of adolc-manual related to the Traceless forward differentiation.

commit bedb8e36f959c5272e4610fe504acc83208e5e9d
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Tue May 17 16:09:36 2016 +0200

macro name correction

commit 92ff596a0331776901df7f172ca347572e3daafd
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Tue May 17 15:56:17 2016 +0200

Add a warning about using static build of ADOL-C

static build of ADOL-C does not call constructors
for internal global objects, thereby causing
segmentation faults.

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

1 edited


  • trunk/ADOL-C/include/adolc/adtl.h

    r704 r708  
    2828#error "please use -std=c++11 compiler flag with a C++11 compliant compiler"
     31#if USE_BOOST_POOL
     32#include <boost/pool/pool_alloc.hpp>
    5761    refcounter() { ++refcnt; }
    5862    ~refcounter() { --refcnt; }
     63    inline static size_t getNumLiveVar() {return refcnt;}
     243#if USE_BOOST_POOL
     244    static boost::pool<boost::default_user_allocator_new_delete>* advalpool;
    238246    double val;
    239247    double *adval;
    246254    ADOLC_DLL_EXPIMP static enum Mode forward_mode;
    247255    inline friend void setNumDir(const size_t p);
     256    inline friend size_t getNumDir();
    248257    inline friend void setMode(enum Mode newmode);
    295304inline void setNumDir(const size_t p) {
    296305    if (refcounter::refcnt > 0) {
    297         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);
     306        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 Number of currently existing adoubles = %zu\n", refcounter::refcnt);
    298307    }
    299308    if (p < 1) {
    302311    }
    303312    adouble::numDir = p;
    304 }
     313#if USE_BOOST_POOL
     314    if (adouble::advalpool != NULL) {
     315        delete adouble::advalpool;
     316        adouble::advalpool = NULL;
     317    }
     318    adouble::advalpool = new boost::pool<boost::default_user_allocator_new_delete>(adouble::numDir*sizeof(double));
     322inline size_t getNumDir() {return adouble::numDir;}
    306324inline void setMode(enum Mode newmode) {
    321 #define FOR_I_EQ_0_LT_NUMDIR for (int _i=0; _i < adouble::numDir; ++_i)
     339#define FOR_I_EQ_0_LT_NUMDIR for (size_t _i=0; _i < adouble::numDir; ++_i)
    322340#define ADVAL_I              adval[_i]
    323341#define ADV_I                adv[_i]
    327345inline adouble::adouble() : val(0), adval(NULL) {
    328346    if (do_adval())
     347#if USE_BOOST_POOL
     348        adval = reinterpret_cast<double*>(advalpool->malloc());
    329350        adval = new double[adouble::numDir];
    330352    if (do_indo()) {
    331353     if (!pattern.empty())
    336358inline adouble::adouble(const double v) : val(v), adval(NULL) {
    337359    if (do_adval()) {
     360#if USE_BOOST_POOL
     361        adval = reinterpret_cast<double*>(advalpool->malloc());
    338363        adval = new double[adouble::numDir];
    339365        FOR_I_EQ_0_LT_NUMDIR
    340366            ADVAL_I = 0.0;
    348374inline adouble::adouble(const double v, const double* adv) : val(v), adval(NULL) {
    349375    if (do_adval()) {
     376#if USE_BOOST_POOL
     377        adval = reinterpret_cast<double*>(advalpool->malloc());
    350379        adval = new double[adouble::numDir];
    351381        FOR_I_EQ_0_LT_NUMDIR
    352382            ADVAL_I=ADV_I;
    360390inline adouble::adouble(const adouble& a) : val(a.val), adval(NULL) {
    361391    if (do_adval()) {
     392#if USE_BOOST_POOL
     393        adval = reinterpret_cast<double*>(advalpool->malloc());
    362395        adval = new double[adouble::numDir];
    363397        FOR_I_EQ_0_LT_NUMDIR
    364398            ADVAL_I=a.ADVAL_I;
    375409inline adouble::~adouble() {
    376410    if (adval != NULL)
     411#if USE_BOOST_POOL
     412        advalpool->free(adval);
    377414        delete[] adval;
    378416#if 0
    379417    if ( !pattern.empty() )
Note: See TracChangeset for help on using the changeset viewer.