Changeset 595 for trunk/ADOL-C/include


Ignore:
Timestamp:
Feb 16, 2015 6:08:54 AM (5 years ago)
Author:
kulshres
Message:

Merge changes from 'master' branch of 'gitclone'

The following changesets have been merged:

commit 3931a4393e4003928eed197011a8dc75aab95514
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Fri Feb 13 16:55:03 2015 +0100

Visual Studio Compatibility

unfortunately visual studio 2010 does not support C++11 standard.

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

commit 023a1f5062e61a5761f15a7c6ec93d05ec9e4bf3
Author: kulshres <kulshres@94ac48a7-3327-4b6a-8511-9a4036a20e83>
Date: Mon Feb 9 16:12:23 2015 +0000

correct ColPack? download website

git-svn-id: https://projects.coin-or.org/svn/ADOL-C/trunk@594 94ac48a7-3327-4b6a-8511-9a4036a20e83

commit 6a1c37c41b89b9c13b3702035d16ad78c5730166
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Wed Feb 4 18:01:44 2015 +0100

scoping changes

forward declarations with friends and declspec(dllexport) for windows
are a bit tricky.

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

commit 199e0da8bbf28c4819cd47b5acfd5cd8a18d55a3
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Wed Feb 4 17:42:37 2015 +0100

Add operations vec_dot and vec_axpy

This will reduce tape length and provide speed.
Dot-products and axpy operations done with
adoubles and for-loops require many temporary
adub variables and become slow.

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

commit d5f729d55ed250384fe62c64f6b5dcc5e8c09748
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Tue Feb 3 15:30:04 2015 +0100

read unsigned values from .adolcrc

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

commit b7a9e1062c345624f27039b2a590f09bd8e70a70
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Fri Jan 30 17:12:02 2015 +0100

specify initial size of live variable store in adolcrc

if one knows approximately how many live variables
there are going to be in the program one can
specify it in the .adolcrc file with INITLIVE
This will prevent the many initially required
new and delete calls while the store grows dynamically
when adouble objects are initialized

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

commit 9ce7f63b4c7a7099781a2d2f6c7a962e24932c65
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Fri Jan 30 16:07:53 2015 +0100

provide a conversion to adouble* from advector

the memory will still be managed inside advector

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

commit 26ac5de41e0ef0e0faae26e32ea3b377570b7ef0
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Fri Jan 30 16:06:53 2015 +0100

streamline advector class

since we now use c++11 we can use the default-insertion
instead of having to copy. This saves operations.
so we don't need the dflt field anymore.
We can also use the adolc_vec_copy() function to
implement the copy constructor.

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

commit 2b2f878a05082d777ebbe5e3d445751ca68759cb
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Fri Jan 30 15:56:05 2015 +0100

add a faster vector copy operation

this should in principle be faster than calling
n assignment operators of adouble and it also
shortens the trace somewhat.

Can only be used if the arrays were allocated
with contiguous locations.

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

commit ef9babd35faea9e766c6c861d99b001510d7e5d4
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Wed Jan 28 14:01:06 2015 +0100

try disabling multithreading support in boost

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

commit 766ac8360bb952b68ce345ea29ee96be65044c29
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Tue Jan 27 14:28:23 2015 +0100

add DLL_EXPORT to function

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

commit fe580956f2664a743f1a981464fd398aabd9acbc
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Tue Jan 27 12:41:51 2015 +0100

allow edf structures to be initialised to zero from outside the library

This is required to properly deallocate the memory, which is user
allocated and set as pointers in this structure, to ensure that
the structure does not call for this memory after the user deallocates
it.

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

commit 4c793005996f0af6b4a95788283e3baab233d3b8
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Mon Jan 26 13:56:35 2015 +0100

more streamlining of next_loc()/free_loc()

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

commit 6686a248a2598a306f4502acd3158c4945d45705
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Mon Jan 26 13:20:14 2015 +0100

a couple of warning fixes

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

commit 7a87f9f5ed97d0af7db7674229483aa782abd970
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Mon Jan 26 11:17:10 2015 +0100

streamline StoreManagerLocintBlock::free_loc() slightly

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

commit 1e4b7a739849098fc33174138b237e5d44462822
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Mon Jan 26 11:08:41 2015 +0100

Also check for boost::system in code

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

commit 1f9eb738280610aad49b1dff623e8aaaca9903d6
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Mon Jan 26 11:05:02 2015 +0100

use a pool allocator from the boost library if available

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

commit 0498360e12d8590f67f19f9a1bca7dff1edb00a2
Author: kulshres <kulshres@94ac48a7-3327-4b6a-8511-9a4036a20e83>
Date: Tue Jan 6 14:48:24 2015 +0000

copy paste typos

Thanks to Mu Wang <wangmu0701@…>

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

git-svn-id: https://projects.coin-or.org/svn/ADOL-C/trunk@593 94ac48a7-3327-4b6a-8511-9a4036a20e83

commit 80f4a743262d32daf1869cfbc4486c977de1e3a4
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Wed Dec 24 14:45:32 2014 +0100

Scatterv/Allgatherv? and compile fixes

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

commit 6caec6d3e19f234da22241e97999cb2eebb40be2
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Wed Dec 24 01:04:48 2014 +0100

Implement Gatherv and some compile fixes

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

commit 439ab813d8b08c0a17c6afb6180ebe914acc3e20
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Tue Dec 23 19:56:45 2014 +0100

Don't use uninitialised pointer for status in MPI calls

From: Max Sagebaum <max.sagebaum@…>
Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit fb911b73d6f9e4729fdf5148671b3c23ed9252b8
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Fri Dec 19 11:02:14 2014 +0100

Implement AMPI calls in forward mode

Send,Recv,Gather,Scatter,Allgather

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

commit 5eecda924840d63fa7309bfc3e4758b28f7e41ec
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Tue Dec 16 15:55:32 2014 +0100

try out some c++11 features since we mandate it anyway

use forward_list instead of list since its unidirectional

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

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

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

Legend:

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

    r562 r595  
    199199   ---- operates just like a badouble, but it has a destructor defined for it.
    200200*/
     201ADOLC_DLL_EXPORT adub* adubp_from_adub(const adub&);
     202/* s = adolc_vec_dot(x,y,size); <=> s = <x,y>_2 */
     203ADOLC_DLL_EXPORT adub adolc_vec_dot(const adouble*const, const adouble*const, locint);
    201204
    202205class ADOLC_DLL_EXPORT adub:public badouble {
     
    205208    friend ADOLC_DLL_EXPORT class adubref;
    206209    friend ADOLC_DLL_EXPORT class pdouble;
    207     friend ADOLC_DLL_EXPORT adub* adubp_from_adub(const adub&);
     210    friend adub* adubp_from_adub(const adub&);
    208211    adub( adub const &) {
    209212        isInit = false;
     
    233236
    234237    /*--------------------------------------------------------------------------*/
     238    /* s = adolc_vec_dot(x,y,size); <=> s = <x,y>_2 */
     239    friend adub adolc_vec_dot(const adouble*const, const adouble*const, locint);
    235240    /* Functions friends with both badouble and adub */
    236241#define _IN_CLASS_ 1
  • trunk/ADOL-C/include/adolc/advector.h

    r537 r595  
    103103};
    104104
     105/* adolc_vec_copy(dest,src,size); */
     106void ADOLC_DLL_EXPORT adolc_vec_copy(adouble *const, const adouble*const, locint);
     107/* adolc_vec_axpy(res,a,x,y,size); <=> res = a*x + y  */
     108void ADOLC_DLL_EXPORT adolc_vec_axpy(adouble *const, const badouble&, const adouble*const, const adouble*const, locint);
     109
    105110class advector {
    106111private:
    107112    struct ADOLC_DLL_EXPORT blocker {
    108         adouble *dflt;
    109113        blocker() {}
    110114        blocker(size_t n);
     
    115119public:
    116120    ADOLC_DLL_EXPORT advector() : blk(), data() {}
    117     ADOLC_DLL_EXPORT explicit advector(size_t n) : blk(n), data(n, *blk.dflt) { delete blk.dflt; }
     121    ADOLC_DLL_EXPORT explicit advector(size_t n) : blk(n), data(n) {}
    118122    ADOLC_DLL_EXPORT ~advector() {}
    119     ADOLC_DLL_EXPORT advector(const advector& x) : blk(x.data.size()), data(x.data) { delete blk.dflt; }
    120     ADOLC_DLL_EXPORT advector(const std::vector<adouble>& v) : blk(v.size()), data(v) { delete blk.dflt; }
     123    ADOLC_DLL_EXPORT advector(const advector& x) : blk(x.size()), data(x.size()) {  adolc_vec_copy(data.data(),x.data.data(),x.size()); }
     124    // in the above copy we are sure of contiguous locations
     125    // but not so in the one below
     126    ADOLC_DLL_EXPORT advector(const std::vector<adouble>& v) : blk(v.size()), data(v) {}
    121127    ADOLC_DLL_EXPORT size_t size() const { return data.size(); }
    122128    ADOLC_DLL_EXPORT operator const std::vector<adouble>&() const { return data; }
    123129    ADOLC_DLL_EXPORT operator std::vector<adouble>&() { return data; }
     130    ADOLC_DLL_EXPORT operator adouble*() { return data.data(); }
    124131    ADOLC_DLL_EXPORT adub operator[](const badouble& index) const;
    125132    ADOLC_DLL_EXPORT adubref operator[](const badouble& index);
  • trunk/ADOL-C/include/adolc/externfcts.h

    r537 r595  
    273273                                   int m, double *yp, adouble *ya);
    274274
     275/**
     276 * zeros out the edf pointers and sets bools to defaults
     277 */
     278ADOLC_DLL_EXPORT void edf_zero(ext_diff_fct *edfct);
     279
    275280#endif /* __CPLUSPLUS */
    276281
Note: See TracChangeset for help on using the changeset viewer.