Changeset 370


Ignore:
Timestamp:
Nov 22, 2012 8:18:52 AM (7 years ago)
Author:
kulshres
Message:

Merge branch '2.3.x_ISSM' into svn

This introduces the new externally differentiated functions API

From: Jean Utke <utke@…>

Please see comments in ADOL-C/include/adolc/externfcts.h for details

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

Location:
trunk
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/ADOL-C/doc/adolc-manual.tex

    r347 r370  
    10361036activity flags in the derivative routine
    10371037{\sf hov\_reverse} presented in \autoref{forw_rev_ad}.
     1038
     1039The {\sf adouble} default constructor sets to zero the associated value.
     1040This implies a certain overhead that may seem unnecessary when no initial value
     1041is actually given, however,
     1042the implicit initialization of arrays from a partial value list is the only legitimate construct (known to us) that requires this behavior.
     1043An array instantiation such as
     1044\begin{center}
     1045\sf double x[3]=\{2.0\};
     1046\end{center}
     1047will initialize {\sf x[0]} to {\sf 2.0} and initialize (implicitly) the remaining array elements
     1048{\sf x[1]} and {\sf x[2]}  to {\sf 0.0}. According to the C++ standard the array element  construction of
     1049the type changed instantiation
     1050\begin{center}
     1051\sf adouble x[3]=\{2.0\};
     1052\end{center}
     1053will use the constructor {\sf adouble(const double\&);} for {\sf x[0]} passing in {\sf 2.0} but
     1054will call the {\sf adouble} default constructor {\sf x[1]} and {\sf x[2]} leaving these array
     1055elements uninitialized {\em unless} the default constructor does implement the initialization to
     1056zero.
     1057The C++ constructor syntax does not provide a means to  distinguish this implicit initialization from the declaration of any simple uninitialized variable.
     1058If the user can ascertain the absence of array instantiations such as the above then one can 
     1059configure ADOL-C with the \verb=--disable-stdczero= option , see \autoref{genlib}, to
     1060avoid the overhead of these initializations. 
     1061 
    10381062%
    10391063%
     
    34343458be used for linking.
    34353459 
     3460The option \verb=--disable-stdczero= turns off the initialization in the {\sf adouble} default
     3461constructor. This will improve efficiency but requires that there be no implicit array initialization in the code, see
     3462\autoref{WarSug}. 
     3463
     3464
    34363465\subsection{Compiling and Linking the Example Programs}
    34373466%
  • trunk/ADOL-C/examples/additional_examples/ext_diff_func/ext_diff_func.cpp

    r171 r370  
    2727
    2828// versions for usage as external differentiated function
    29 int zos_for_euler_step(int n, double *yin, int m, double *yout);
    30 int fos_rev_euler_step(int n, double *u, int m, double *z);
     29ADOLC_ext_fct zos_for_euler_step;
     30ADOLC_ext_fct_fos_reverse fos_rev_euler_step;
    3131
    3232ext_diff_fct *edf;
     
    173173}
    174174
    175 int fos_rev_euler_step(int n, double *u, int m, double *z)
     175int fos_rev_euler_step(int n, double *u, int m, double *z, double */* unused */, double */*unused*/)
    176176{
    177177  int rc;
  • trunk/ADOL-C/include/adolc/externfcts.h

    r354 r370  
    2222BEGIN_C_DECLS
    2323
    24 typedef int (*ADOLC_ext_fct) (int n, double *x, int m, double *y);
     24typedef int (ADOLC_ext_fct) (int n, double *x, int m, double *y);
     25typedef int (ADOLC_ext_fct_fos_forward) (int n, double *dp_x, double *dp_X, int m, double *dp_y, double *dp_Y);
     26typedef int (ADOLC_ext_fct_fov_forward) (int n, double *dp_x, int p, double **dpp_X, int m, double *dp_y, double **dpp_Y);
     27typedef int (ADOLC_ext_fct_hos_forward) (int n, double *dp_x, int d, double **dpp_X, int m, double *dp_y, double **dpp_Y);
     28typedef int (ADOLC_ext_fct_hov_forward) (int n, double *dp_x, int d, int p, double ***dppp_X, int m, double *dp_y, double ***dppp_Y);
     29typedef int (ADOLC_ext_fct_fos_reverse) (int m, double *dp_U, int n, double *dp_Z, double *dp_x, double *dp_y);
     30typedef int (ADOLC_ext_fct_fov_reverse) (int m, int p, double **dpp_U, int n, double **dpp_Z, double *dp_x, double *dp_y);
     31typedef int (ADOLC_ext_fct_hos_reverse) (int m, double *dp_U, int n, int d, double **dpp_Z);
     32typedef int (ADOLC_ext_fct_hov_reverse) (int m, int p, double **dpp_U, int n, int d, double ***dppp_Z, short **spp_nz);
     33
    2534
    2635/**
     
    3443   * DO NOT touch - the function pointer is set through reg_ext_fct
    3544   */
    36   ADOLC_ext_fct function; 
     45  ADOLC_ext_fct *function; 
    3746
    3847  /**
     
    5564   * in examples/additional_examples/ext_diff_func/ext_diff_func.cpp 
    5665   */
    57   int (*zos_forward) (int n, double *dp_x,
    58                       int m, double *dp_y);
     66  ADOLC_ext_fct *zos_forward;
    5967
    6068  /**
     
    6371   * see also the explanation of the dp_X/Y  members below.
    6472   */
    65   int (*fos_forward) (int n, double *dp_x, double *dp_X,
    66                       int m, double *dp_y, double *dp_Y);
     73  ADOLC_ext_fct_fos_forward *fos_forward;
     74
    6775  /**
    6876   * this points to a  method implementing a forward execution of the externally differentiated function dp_y=f(dp_x)
     
    7078   * see also the explanation of the dpp_X/Y  members below.
    7179   */
    72   int (*fov_forward) (int n, double *dp_x, int p, double **dpp_X,
    73                       int m, double *dp_y, double **dpp_Y);
     80  ADOLC_ext_fct_fov_forward *fov_forward;
    7481  /**
    7582   * higher order scalar forward for external functions  is currently not implemented in uni5_for.c
    7683   */
    77   int (*hos_forward) (int n, double *dp_x, int d, double **dpp_X,
    78                       int m, double *dp_y, double **dpp_Y);
     84  ADOLC_ext_fct_hos_forward *hos_forward;
    7985  /**
    8086   * higher order vector forward for external functions  is currently not implemented in uni5_for.c
    8187   */
    82   int (*hov_forward) (int n, double *dp_x, int d, int p, double ***dppp_X,
    83                       int m, double *dp_y, double ***dppp_Y);
    84 
     88  ADOLC_ext_fct_hov_forward *hov_forward;
    8589  /**
    8690   * this points to a  method computing the projection dp_Z=transpose(dp_U) * Jacobian
    8791   * see also the explanation of the dp_U/Z  members below.
    8892   */
    89   int (*fos_reverse) (int m, double *dp_U,
    90                       int n, double *dp_Z);
    91 
     93  ADOLC_ext_fct_fos_reverse *fos_reverse;
    9294  /**
    9395   * this points to a  method computing the projection dpp_Z=transpose(dpp_U) * Jacobian
    9496   * see also the explanation of the dpp_U/Z  members below.
    9597   */
    96   int (*fov_reverse) (int m, int p, double **dpp_U,
    97                       int n, double **dpp_Z);
    98 
     98  ADOLC_ext_fct_fov_reverse *fov_reverse;
    9999  /**
    100100   * higher order scalar reverse for external functions  is currently not implemented in ho_rev.c
    101101   */
    102   int (*hos_reverse) (int m, double *dp_U,
    103                       int n, int d, double **dpp_Z);
     102  ADOLC_ext_fct_hos_reverse *hos_reverse;
    104103  /**
    105104   * higher order vector reverse for external functions  is currently not implemented in ho_rev.c
    106105   */
    107   int (*hov_reverse) (int m, int p, double **dpp_U,
    108                       int n, int d, double ***dppp_Z,
    109                       short **spp_nz);
     106  ADOLC_ext_fct_hov_reverse *hov_reverse;
    110107
    111108
     
    195192  short **spp_nz;
    196193
     194  /**
     195   * track maximal value of n when function is invoked
     196   */
     197  int max_n;
     198
     199  /**
     200   * track maximal value of m when function is invoked
     201   */
     202  int max_m;
     203
     204  /**
     205   * make the call such that Adol-C may be used inside
     206   * of the externally differentiated function;
     207   * defaults to non-0;
     208   * this implies certain storage duplication that can
     209   * be avoided if no nested use of Adol-C takes place
     210   */
     211  char nestedAdolc;
     212
     213  /**
     214   * if 0, then the 'function' does not change dp_x;
     215   * defaults to non-0 which implies dp_x values are saved in taylors
     216   */
     217  char dp_x_changes;
     218
     219  /**
     220   * if 0, then the value of dp_y prior to calling 'function'
     221   * is not required for reverse;
     222   * defaults to non-0 which implies  dp_y values are saved in taylors
     223   */
     224  char dp_y_priorRequired;
     225
    197226}
    198227ext_diff_fct;
  • trunk/ADOL-C/src/checkpointing.cpp

    r337 r370  
    3434/* forward function declarations */
    3535void init_edf(ext_diff_fct *edf);
    36 int cp_zos_forward (int n, double *dp_x, int m, double *dp_y);
    37 int cp_fos_forward (int n, double *dp_x, double *dp_X,
    38                     int m, double *dp_y, double *dp_Y);
    39 int cp_fov_forward (int n, double *dp_x, int p, double **dpp_X,
    40                     int m, double *dp_y, double **dpp_Y);
    41 int cp_hos_forward (int n, double *dp_x, int d, double **dpp_X,
    42                     int m, double *dp_y, double **dpp_Y);
    43 int cp_hov_forward (int n, double *dp_x, int d, int p, double ***dppp_X,
    44                     int m, double *dp_y, double ***dppp_Y);
    45 int cp_fos_reverse (int m, double *dp_U, int n, double *dp_Z);
    46 int cp_fov_reverse (int m, int p, double **dpp_U, int n, double **dpp_Z);
    47 int cp_hos_reverse (int m, double *dp_U, int n, int d, double **dpp_Z);
    48 int cp_hov_reverse (int m, int p, double **dpp_U, int n, int d, double ***dppp_Z,
    49                     short **spp_nz);
     36ADOLC_ext_fct cp_zos_forward;
     37ADOLC_ext_fct_fos_forward cp_fos_forward;
     38ADOLC_ext_fct_fov_forward cp_fov_forward;
     39ADOLC_ext_fct_hos_forward cp_hos_forward;
     40ADOLC_ext_fct_hov_forward cp_hov_forward;
     41ADOLC_ext_fct_fos_reverse cp_fos_reverse;
     42ADOLC_ext_fct_fov_reverse cp_fov_reverse;
     43ADOLC_ext_fct_hos_reverse cp_hos_reverse;
     44ADOLC_ext_fct_hov_reverse cp_hov_reverse;
    5045void cp_takeshot(CpInfos *cpInfos);
    5146void cp_restore(CpInfos *cpInfos);
     
    283278}
    284279
    285 int cp_fov_forward (int n, double *dp_x, int p,  double **dpp_X,
     280int cp_fov_forward (int n, double *dp_x, int p, double **dpp_X,
    286281                    int m, double *dp_y, double **dpp_Y) {
    287282    printf("WARNING: Checkpointing algorithm not "
     
    304299}
    305300
    306 int cp_fos_reverse (int m, double *dp_U, int n, double *dp_Z) {
     301int cp_fos_reverse (int m, double *dp_U, int n, double *dp_Z, double *dp_x, double *dp_y) {
    307302    ADOLC_OPENMP_THREAD_NUMBER;
    308303    ADOLC_OPENMP_GET_THREAD_NUMBER;
     
    402397}
    403398
    404 int cp_fov_reverse (int m, int p, double **dpp_U, int n, double **dpp_Z) {
     399int cp_fov_reverse (int m, int p, double **dpp_U, int n, double **dpp_Z, double */*unused*/, double */*unused*/) {
    405400    ADOLC_OPENMP_THREAD_NUMBER;
    406401    ADOLC_OPENMP_GET_THREAD_NUMBER;
     
    505500}
    506501
    507 int cp_hos_reverse (int m, double *dp_U, int n, int d, double **dpp_Z) {
     502int cp_hos_reverse (int m, double *dp_U, int n, int d,  double **dpp_Z) {
    508503    printf("WARNING: Checkpointing algorithm not "
    509504           "implemented for the hos_reverse mode!\n");
  • trunk/ADOL-C/src/externfcts.cpp

    r342 r370  
    6565  edf->spp_nz=0;
    6666
     67  edf->max_n=0;
     68  edf->max_m=0;
     69
     70  edf->nestedAdolc=true;
     71  edf->dp_x_changes=true;
     72  edf->dp_y_priorRequired=true;
     73
    6774  return edf;
    6875}
     
    7885    ADOLC_OPENMP_GET_THREAD_NUMBER;
    7986
     87    if (xa[n-1].loc()-xa[0].loc()!=n-1 || ya[m-1].loc()-ya[0].loc()!=m-1) fail(ADOLC_EXT_DIFF_LOCATIONGAP);
    8088    if (edfct==NULL) fail(ADOLC_EXT_DIFF_NULLPOINTER_STRUCT);
    8189
     
    93101    } else oldTraceFlag=0;
    94102
    95     numVals = ADOLC_GLOBAL_TAPE_VARS.storeSize;
    96     vals = new double[numVals];
    97     memcpy(vals, ADOLC_GLOBAL_TAPE_VARS.store,
    98             numVals * sizeof(double));
     103    if (edfct->nestedAdolc) {
     104      numVals = ADOLC_GLOBAL_TAPE_VARS.storeSize;
     105      vals = new double[numVals];
     106      memcpy(vals, ADOLC_GLOBAL_TAPE_VARS.store,
     107             numVals * sizeof(double));
     108    }
    99109
    100     for (i=0; i<n; ++i) xp[i]=xa[i].getValue();
    101     for (i=0; i<m; ++i) yp[i]=ya[i].getValue();
    102 
    103     ret=edfct->function(n, xp, m, yp);
    104 
    105     memcpy(ADOLC_GLOBAL_TAPE_VARS.store, vals,
    106             numVals * sizeof(double));
    107     delete[] vals;
     110    edfct->max_n=(edfct->max_n<n)?n:edfct->max_n;
     111    edfct->max_m=(edfct->max_m<m)?m:edfct->max_m;
    108112
    109113    /* update taylor buffer if keep != 0 ; possible double counting as in
     
    111115
    112116    if (oldTraceFlag != 0) {
    113         ADOLC_CURRENT_TAPE_INFOS.numTays_Tape += n;
    114         ADOLC_CURRENT_TAPE_INFOS.numTays_Tape += m;
    115         if (ADOLC_CURRENT_TAPE_INFOS.keepTaylors) {
    116             for (i=0; i<n; ++i) ADOLC_WRITE_SCAYLOR(xa[i].getValue());
    117             for (i=0; i<m; ++i) ADOLC_WRITE_SCAYLOR(ya[i].getValue());
    118         }
     117      if (edfct->dp_x_changes) ADOLC_CURRENT_TAPE_INFOS.numTays_Tape += n;
     118      if (edfct->dp_y_priorRequired) ADOLC_CURRENT_TAPE_INFOS.numTays_Tape += m;
     119      if (ADOLC_CURRENT_TAPE_INFOS.keepTaylors) {
     120        if (edfct->dp_x_changes) for (i=0; i<n; ++i) ADOLC_WRITE_SCAYLOR(xa[i].getValue());
     121        if (edfct->dp_y_priorRequired) for (i=0; i<m; ++i) ADOLC_WRITE_SCAYLOR(ya[i].getValue());
     122      }
    119123    }
     124
     125    for (i=0; i<n; ++i) xp[i]=xa[i].getValue();
     126    if (edfct->dp_y_priorRequired) for (i=0; i<m; ++i) yp[i]=ya[i].getValue();
     127
     128    ret=edfct->function(n, xp, m, yp);
     129
     130    if (edfct->nestedAdolc) {
     131      memcpy(ADOLC_GLOBAL_TAPE_VARS.store, vals,
     132          numVals * sizeof(double));
     133      delete[] vals;
     134    }
     135
    120136    /* write back */
    121     for (i=0; i<n; ++i) xa[i].setValue(xp[i]);
     137    if (edfct->dp_x_changes) for (i=0; i<n; ++i) xa[i].setValue(xp[i]);
    122138    for (i=0; i<m; ++i) ya[i].setValue(yp[i]);
    123139
  • trunk/ADOL-C/src/fixpoint.cpp

    r106 r370  
    126126}
    127127
    128 static int fp_fos_reverse ( int dim_x, double *x_fix_bar, int dim_xu, double *xu_bar) {
     128static int fp_fos_reverse ( int dim_x, double *x_fix_bar, int dim_xu, double *xu_bar, double* /*unused*/, double* /*unused*/) {
    129129    // (d x_fix) / (d x_0) = 0 (!)
    130130    int i, k;
  • trunk/ADOL-C/src/fo_rev.c

    r360 r370  
    330330# define ADOLC_EXT_FCT_POINTER fos_reverse
    331331# define ADOLC_EXT_FCT_COMPLETE \
    332   fos_reverse(m, edfct->dp_U, n, edfct->dp_Z)
     332  fos_reverse(m, edfct->dp_U, n, edfct->dp_Z, edfct->dp_x, edfct->dp_y)
    333333# define ADOLC_EXT_FCT_SAVE_NUMDIRS
    334334#else
     
    337337# define ADOLC_EXT_FCT_POINTER fov_reverse
    338338# define ADOLC_EXT_FCT_COMPLETE \
    339     fov_reverse(m, p, edfct->dpp_U, n, edfct->dpp_Z)
     339  fov_reverse(m, p, edfct->dpp_U, n, edfct->dpp_Z, edfct->dp_x, edfct->dp_y)
    340340# define ADOLC_EXT_FCT_SAVE_NUMDIRS ADOLC_CURRENT_TAPE_INFOS.numDirs_rev = nrows
    341341#endif
     
    21712171                if (edfct->ADOLC_EXT_FCT_POINTER == NULL)
    21722172                    fail(ADOLC_EXT_DIFF_NULLPOINTER_FUNCTION);
    2173                 if (m>0)
     2173                if (m>0) {
    21742174                    if (ADOLC_EXT_FCT_U == NULL) fail(ADOLC_EXT_DIFF_NULLPOINTER_ARGUMENT);
    2175                 if (n>0)
     2175                    if (edfct->dp_y==NULL) fail(ADOLC_EXT_DIFF_NULLPOINTER_ARGUMENT);
     2176                }
     2177                if (n>0) {
    21762178                    if (ADOLC_EXT_FCT_Z == NULL) fail(ADOLC_EXT_DIFF_NULLPOINTER_ARGUMENT);
    2177 
     2179                    if (edfct->dp_x==NULL) fail(ADOLC_EXT_DIFF_NULLPOINTER_ARGUMENT);
     2180                }
    21782181                arg = ADOLC_CURRENT_TAPE_INFOS.lowestYLoc_rev;
    21792182                for (loop = 0; loop < m; ++loop) {
     
    21832186                    ++arg;
    21842187                }
    2185                 for (loop = 0; loop < m; ++loop) {
    2186                     --arg;
    2187                     ADOLC_GET_TAYLOR(arg);
    2188                 }
     2188
    21892189                arg = ADOLC_CURRENT_TAPE_INFOS.lowestXLoc_rev;
    21902190                for (loop = 0; loop < n; ++loop) {
     
    21942194                    ++arg;
    21952195                }
    2196                 for (loop = 0; loop < n; ++loop) {
    2197                     --arg;
    2198                     ADOLC_GET_TAYLOR(arg);
     2196                arg = ADOLC_CURRENT_TAPE_INFOS.lowestXLoc_rev;
     2197                for (loop = 0; loop < n; ++loop,++arg) {
     2198                  edfct->dp_x[loop]=TARG;
    21992199                }
    2200 
     2200                arg = ADOLC_CURRENT_TAPE_INFOS.lowestYLoc_rev;
     2201                for (loop = 0; loop < m; ++loop,++arg) {
     2202                  edfct->dp_y[loop]=TARG;
     2203                }
    22012204                ext_retc = edfct->ADOLC_EXT_FCT_COMPLETE;
    22022205                MINDEC(ret_c, ext_retc);
     
    22162219                    ++res;
    22172220                }
    2218 
     2221                if (edfct->dp_y_priorRequired) {
     2222                  arg = ADOLC_CURRENT_TAPE_INFOS.lowestYLoc_rev+m-1;
     2223                  for (loop = 0; loop < m; ++loop,--arg) {
     2224                    ADOLC_GET_TAYLOR(arg);
     2225                  }
     2226                }
     2227                if (edfct->dp_x_changes) {
     2228                  arg = ADOLC_CURRENT_TAPE_INFOS.lowestXLoc_rev+n-1;
     2229                  for (loop = 0; loop < n; ++loop,--arg) {
     2230                    ADOLC_GET_TAYLOR(arg);
     2231                  }
     2232                }
    22192233                ADOLC_CURRENT_TAPE_INFOS.traceFlag = oldTraceFlag;
    22202234
  • trunk/ADOL-C/src/taping.c

    r350 r370  
    223223        case ADOLC_EXT_DIFF_NULLPOINTER_DIFFFUNC:
    224224            fprintf(DIAG_OUT,
    225                     "ADOL-C error: No function for extern differentiation found"
     225                    "ADOL-C error: No function for external differentiation found"
    226226                    " to work with (null pointer)\n!");
    227227            break;
     
    235235                    "ADOL-C error: Function with specified index not found!\n");
    236236            break;
     237
     238        case ADOLC_EXT_DIFF_LOCATIONGAP:
     239          fprintf(DIAG_OUT,
     240                  "ADOL-C error: active type arguments passed to call_ext_fct do not have contiguous ascending locations; use ensureContiguousLocations(size_t) to reserve  contiguous blocks prior to allocation of the arguments.\n");
     241          break;
    237242
    238243        case ADOLC_CHECKPOINTING_CPINFOS_NULLPOINTER:
  • trunk/ADOL-C/src/taping_p.h

    r295 r370  
    106106    ADOLC_EXT_DIFF_NULLPOINTER_ARGUMENT,
    107107    ADOLC_EXT_DIFF_WRONG_FUNCTION_INDEX,
     108    ADOLC_EXT_DIFF_LOCATIONGAP,
    108109
    109110    ADOLC_CHECKPOINTING_CPINFOS_NULLPOINTER,
  • trunk/ADOL-C/src/uni5_for.c

    r363 r370  
    861861#   define ADOLC_EXT_FCT_POINTER fov_forward
    862862#   define ADOLC_EXT_FCT_COMPLETE \
    863     fov_forward(n, edfct->dp_x, p, edfct->dpp_X, m, edfct->dp_y, edfct->dpp_Y)
     863    fov_forward(n, edfct->dp_x,p, edfct->dpp_X, m, edfct->dp_y, edfct->dpp_Y)
    864864#   define ADOLC_EXT_POINTER_X edfct->dpp_X
    865865#   define ADOLC_EXT_POINTER_Y edfct->dpp_Y
     
    10651065
    10661066    while (operation !=end_of_tape) {
    1067 
    1068 
     1067     
    10691068      switch (operation) {
    10701069
     
    46324631                arg = ADOLC_CURRENT_TAPE_INFOS.lowestXLoc_for;
    46334632                for (loop=0; loop<n; ++loop) {
     4633                    if (edfct->dp_x_changes) {
     4634                      IF_KEEP_WRITE_TAYLOR(arg, keep, k, p);
     4635                    }
    46344636                    edfct->dp_x[loop]=dp_T0[arg];
    46354637#if !defined(_ZOS_)
     
    46424644                arg = ADOLC_CURRENT_TAPE_INFOS.lowestYLoc_for;
    46434645                for (loop=0; loop<m; ++loop) {
     4646                    if (edfct->dp_y_priorRequired) {
     4647                      IF_KEEP_WRITE_TAYLOR(arg, keep, k, p);
     4648                    }
    46444649                    edfct->dp_y[loop]=dp_T0[arg];
    46454650#if !defined(_ZOS_)
     
    46564661                res = ADOLC_CURRENT_TAPE_INFOS.lowestXLoc_for;
    46574662                for (loop=0; loop<n; ++loop) {
    4658                     IF_KEEP_WRITE_TAYLOR(res, keep, k, p);
    46594663                    dp_T0[res]=edfct->dp_x[loop];
    46604664#if !defined(_ZOS_)
     
    46674671                res = ADOLC_CURRENT_TAPE_INFOS.lowestYLoc_for;
    46684672                for (loop=0; loop<m; ++loop) {
    4669                     IF_KEEP_WRITE_TAYLOR(res, keep, k, p);
    46704673                    dp_T0[res]=edfct->dp_y[loop];
    46714674#if !defined(_ZOS_)
     
    46794682                break;
    46804683#endif
     4684
    46814685                /*--------------------------------------------------------------------------*/
    46824686
  • trunk/configure.ac

    r368 r370  
    137137fi
    138138
    139 AC_MSG_CHECKING(whether standard adouble constructor shall zero value)
     139AC_MSG_CHECKING(whether the default adouble constructor should initialize the value to 0)
    140140AC_ARG_ENABLE(stdczero,
    141141              [
    142 AS_HELP_STRING([--enable-stdczero],[adouble standard constructor zeros value
    143 (at the cost of performance) [default=no]])],
    144   [
    145   adolc_stdczero=$enableval
    146   AC_MSG_RESULT($adolc_stdczero)
    147   ],
     142AS_HELP_STRING([--disable-stdczero],[adouble default constructor does not initialze the value to zero
     143(improves performance but yields incorrect results for implicit array initializations, see manual) [default=enabled]])],
    148144  [
    149145  adolc_stdczero=no
    150146  AC_MSG_RESULT(no)
     147  ],
     148  [
     149  adolc_stdczero=yes
     150  AC_MSG_RESULT(yes)
    151151  ])
    152152
    153 if test x$adolc_stdczero == xyes ; then
     153if test x$adolc_stdczero == xyes; then
    154154AC_DEFINE(ADOLC_ADOUBLE_STDCZERO,1,[ADOL-C adouble zeroing mode])
    155155fi
     
    426426Configuration:
    427427
    428   C compiler:                       ${CC}
    429   C++ compiler:                     ${CXX}
    430   Linker:                           ${LD}
    431   Source code location:             `pwd`
    432   Install path:                     ${prefix}
     428  C compiler:                         ${CC}
     429  C++ compiler:                       ${CXX}
     430  Linker:                             ${LD}
     431  Source code location:               `pwd`
     432  Install path:                       ${prefix}
    433433 
    434   CFLAGS:                           ${ac_adolc_cflags}
    435   CXXFLAGS:                         ${ac_adolc_cxxflags}
    436 
    437   Use ADOL-C debug mode:            ${adolc_debug}
    438   Use ADOL-C hard debug mode:       ${adolc_harddebug}
    439   Use ADOL-C adouble zeroing mode: ${adolc_stdczero}"
     434  CFLAGS:                             ${ac_adolc_cflags}
     435  CXXFLAGS:                           ${ac_adolc_cxxflags}
     436
     437  Use ADOL-C debug mode:              ${adolc_debug}
     438  Use ADOL-C hard debug mode:         ${adolc_harddebug}
     439  Zero value in adouble default ctor: ${adolc_stdczero}"
    440440
    441441if [[ "x${ac_adolc_openmpflag}" != "x" ]] ; then
    442442    echo \
    443 "  Access thread number via errno:   ${adolc_tserrno}"
     443"  Access thread number via errno:     ${adolc_tserrno}"
    444444fi
    445445
    446446echo \
    447 "  Use ADOL-C safe extern mode:      ${adolc_safe_extern}
    448 
    449   Build sparse drivers:             ${sparse}
    450   Build with ColPack:               ${have_colpack}"
     447"  Use ADOL-C safe extern mode:        ${adolc_safe_extern}
     448
     449  Build sparse drivers:               ${sparse}
     450  Build with ColPack:                 ${have_colpack}"
    451451if test x$sparse = xyes && test x$have_colpack = xno; then
    452452    echo -e \
     
    458458
    459459echo \
    460 "  Build documented examples:        ${docexa}
    461   Build additional examples:        ${addexa}
     460"  Build documented examples:          ${docexa}
     461  Build additional examples:          ${addexa}
    462462
    463463  See ADOL-C/src/config.h for further configuration information.
Note: See TracChangeset for help on using the changeset viewer.