Changeset 603 for trunk/ADOL-C/include


Ignore:
Timestamp:
Mar 23, 2015 11:35:03 PM (5 years ago)
Author:
kulshres
Message:

merge branch 'master' of 'gitclone' into 'svn'

The following commits were merged:

commit 5a89482e64674eeae3ae33de2d40bc04732347bb
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Fri Mar 20 19:46:36 2015 +0100

add default contiguous allocation for adouble arrays when using ADIC_ADOLC_T

YPE

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

commit c6b42c807a25ce3382b0fc1cf51e5c82fc9fa87e
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Thu Mar 19 03:29:41 2015 +0100

allow for querying all currently cached trace tags

all currently cached trace tags will be stored in the
argument vector. However this does not know about any
traces living on disk that could potentially be used.

To check for a disk based trace tag, check whether the
file name fname returned by
char* fname = createFileName(tag, 0);
exists. Remember to free(fname) later.

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

commit 3d6d2262ed37c5f18da7b727e6e088eac862d2d8
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Tue Mar 17 05:09:57 2015 +0100

initialization of x and y was reversed

U and y should be in the same loop. Z and x in another

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

commit e6c580614b7fcaf2b81d901bef63a6ae45c22d28
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Fri Mar 13 20:21:40 2015 +0100

Also use boost pool_allocator in tapeless mode

this might bring some slight performance gain.

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

commit 8e6d8e7a83fe5a254087d96fd703a4630ccf7d17
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Thu Mar 12 23:43:10 2015 +0100

add tapedoc for ext_diff_v2

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

l

Location:
trunk/ADOL-C/include/adolc
Files:
3 edited

Legend:

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

    r595 r603  
    256256};
    257257
     258BEGIN_C_DECLS
     259ADOLC_DLL_EXPORT void ensureContiguousLocations(size_t n);
     260END_C_DECLS
    258261
    259262/****************************************************************************/
     
    291294   
    292295    inline locint loc(void) const;
     296
     297#if defined(ADIC_ADOLC_TYPE)
     298    void *operator new[](size_t sz) {
     299        void *p = ::new char[sz];
     300        size_t n = (sz - sizeof(size_t))/sizeof(adouble);
     301        ensureContiguousLocations(n);
     302        return p;
     303    }
     304    void operator delete[](void* p) {
     305        ::delete[] (char*)p;
     306    }
     307#endif
     308
    293309};
    294310
  • trunk/ADOL-C/include/adolc/adtl.h

    r537 r603  
    256256#include <limits>
    257257
     258
    258259namespace adtl {
    259260
     
    276277#endif
    277278
     279struct adtl_alloc {
     280    static double* allocate(size_t n);
     281    static void deallocate(double* p, size_t n);
     282};
     283
     284
    278285inline bool adouble::_do_val() {
    279286    return ((forward_mode & ADTL_Z_MASK) == ADTL_Z_MASK);
     
    328335inline adouble::adouble() : val(0), adval(NULL) {
    329336    if (do_adval())
    330         adval = new double[adouble::numDir];
     337        adval = adtl_alloc::allocate(adouble::numDir);
    331338    if (do_indo()) {
    332339     if (!pattern.empty())
     
    337344inline adouble::adouble(const double v) : val(v), adval(NULL) {
    338345    if (do_adval()) {
    339         adval = new double[adouble::numDir];
     346        adval = adtl_alloc::allocate(adouble::numDir);
    340347        FOR_I_EQ_0_LT_NUMDIR
    341348            ADVAL_I = 0.0;
     
    349356inline adouble::adouble(const double v, const double* adv) : val(v), adval(NULL) {
    350357    if (do_adval()) {
    351         adval = new double[adouble::numDir];
     358        adval = adtl_alloc::allocate(adouble::numDir);
    352359        FOR_I_EQ_0_LT_NUMDIR
    353360            ADVAL_I=ADV_I;
     
    361368inline adouble::adouble(const adouble& a) : val(a.val), adval(NULL) {
    362369    if (do_adval()) {
    363         adval = new double[adouble::numDir];
     370        adval = adtl_alloc::allocate(adouble::numDir);
    364371        FOR_I_EQ_0_LT_NUMDIR
    365372            ADVAL_I=a.ADVAL_I;
     
    376383inline adouble::~adouble() {
    377384    if (adval != NULL)
    378         delete[] adval;
     385        adtl_alloc::deallocate(adval,adouble::numDir);
    379386#if 0
    380387    if ( !pattern.empty() )
  • trunk/ADOL-C/include/adolc/taping.h

    r537 r603  
    6060ADOLC_DLL_EXPORT void disableBranchSwitchWarnings();
    6161
    62 ADOLC_DLL_EXPORT void ensureContiguousLocations(size_t n);
    63 
    6462ADOLC_DLL_EXPORT void enableMinMaxUsingAbs();
    6563ADOLC_DLL_EXPORT void disableMinMaxUsingAbs();
     
    109107ADOLC_DLL_EXPORT void skip_tracefile_cleanup(short tnum);
    110108
     109#include <vector>
     110ADOLC_DLL_EXPORT void cachedTraceTags(std::vector<short>& result);
     111
    111112#endif
    112113
Note: See TracChangeset for help on using the changeset viewer.