Changeset 375


Ignore:
Timestamp:
Dec 14, 2012 6:22:48 AM (7 years ago)
Author:
kulshres
Message:

Move some options out of usrparms.h

These should be set using the configure script arguments and are
now in a new generated header file that will be installed via
make install. This include ATRIG_ERF, and the typedefs for locint/revreal
A new option ADOLC_ADVANCED_BRANCHING is also created.

ADOLC_USE_CALLOC goes into config.h as this is only required for build
but not after installation

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

Location:
trunk
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/ADOL-C/include/adolc/Makefile.am

    r354 r375  
    1616                       externfcts.h checkpointing.h fixpoint.h\
    1717                       adolc_sparse.h adolc_openmp.h \
    18                        revolve.h advector.h
     18                       revolve.h advector.h adolc_settings.h
    1919
    2020SUBDIRS = drivers tapedoc
     21
     22EXTRA_DIST = adolc_settings.h.in
    2123
    2224if SPARSE
  • trunk/ADOL-C/include/adolc/common.h

    r354 r375  
    1717#define ADOLC_COMMON_H 1
    1818
     19#include <stdint.h>
    1920/*--------------------------------------------------------------------------*/
    2021/* standard includes */
     
    7980#include <adolc/dvlparms.h>
    8081#include <adolc/usrparms.h>
     82#include <adolc/adolc_settings.h>
    8183
    8284/*--------------------------------------------------------------------------*/
  • trunk/ADOL-C/include/adolc/usrparms.h

    r354 r375  
    3535
    3636/*--------------------------------------------------------------------------*/
    37 /* ADOL-C data types */
    38 #define locint     unsigned int                /* ensure locint is unsigned */
    39 #define revreal    double
    40 
    41 /*--------------------------------------------------------------------------*/
    4237/* Data types used by Fortran callable versions of functions */
    4338#define fint       long
     
    5247#define ADOLC_EPS  10E-20  /* for test on zero                            */
    5348
    54 /*--------------------------------------------------------------------------*/
    55 /* Enable/disable asinh, acosh,atanh, erf */
    56 #undef ATRIG_ERF
    57 /* #define ATRIG_ERF 1 */
    58 
    5949/****************************************************************************/
    6050/* Standard output used for diagnostics by ADOL-C,                          */
    6151/* e.g. stdout or stderr or whatever file identifier                        */
    6252#define DIAG_OUT stderr
    63 
    64 /*--------------------------------------------------------------------------*/
    65 /* Use 'calloc' instead of 'malloc' in ADOL-C allocation routines. If you   */
    66 /* have any trouble with uninitialized memory, then define ADOLC_USE_CALLOC.*/
    67 #define ADOLC_USE_CALLOC 1
    6853
    6954/*--------------------------------------------------------------------------*/
  • trunk/configure.ac

    r370 r375  
    100100AC_SUBST(ADOLC_SUBVERSION)
    101101AC_SUBST(ADOLC_PATCHLEVEL)
     102
     103AC_MSG_CHECKING(whether to use calloc or malloc for memory allocation)
     104AC_ARG_ENABLE(use-calloc,[AS_HELP_STRING([--disable-use-calloc],
     105  [disable use of calloc and use malloc instead for memory allocation [default=calloc is used]])],
     106  [use_calloc=$enableval],[use_calloc=yes])
     107
     108if test x$use_calloc = xyes ; then
     109AC_MSG_RESULT(calloc)
     110AC_DEFINE(ADOLC_USE_CALLOC,1,[Use calloc instead of malloc for memory allocation])
     111else
     112AC_MSG_RESULT(malloc)
     113fi
     114
     115AC_MSG_CHECKING(whether to enable atrig/erf functions)
     116AC_ARG_ENABLE(atrig-erf,[AS_HELP_STRING([--enable-atrig-erf],
     117  [enable atrig and erf functions in ADOL-C [default=no]])],
     118  [use_atrig_erf=$enableval],[use_atrig_erf=no])
     119AC_MSG_RESULT($use_atrig_erf)
     120
     121if test x$use_atrig_erf = xyes ; then
     122  ATRIG_ERF_FALSE="// "
     123  ATRIG_ERF_TRUE=""
     124else
     125  ATRIG_ERF_FALSE=""
     126  ATRIG_ERF_TRUE="// "
     127fi
     128AC_SUBST(ATRIG_ERF_FALSE)
     129AC_SUBST(ATRIG_ERF_TRUE)
     130
     131AC_MSG_CHECKING(whether to use 32-bit or 64-bit locations)
     132AC_ARG_ENABLE(ulong,[AS_HELP_STRING([--enable-ulong],
     133  [enable 64-bit locations [default=32-bit]])],
     134  [use_ulong=$enableval],[use_ulong=no])
     135
     136if test x$use_ulong = xyes ; then
     137  UINT_TYPE=uint64_t
     138  AC_MSG_RESULT(64-bit)
     139else
     140  UINT_TYPE=uint32_t
     141  AC_MSG_RESULT(32-bit)
     142fi
     143AC_SUBST(UINT_TYPE)
     144
     145AC_MSG_CHECKING(whether to use single or double precision)
     146AC_ARG_ENABLE(double,[AS_HELP_STRING([--disable-double],
     147  [disable double precision arithmetic [default=no]])],
     148  [use_float=$enableval],[use_float=no])
     149
     150if test x$use_float = xyes ; then
     151  REAL_TYPE=float
     152  AC_MSG_RESULT(float)
     153else
     154  REAL_TYPE=double
     155  AC_MSG_RESULT(double)
     156fi
     157AC_SUBST(REAL_TYPE)
     158
     159AC_MSG_CHECKING(whether to enable advanced branching operations)
     160AC_ARG_ENABLE(advanced-branching, [AS_HELP_STRING([--enable-advanced-branching],
     161  [enable advanced branching operations to reduce retaping [default=no]])],
     162  [use_advbranch=$enableval],[use_advbranch=no])
     163AC_MSG_RESULT($use_advbranch)
     164
     165if test x$use_advbranch = xyes ; then
     166  ADVBRANCH_TRUE=""
     167  ADVBRANCH_FALSE="// "
     168else
     169  ADVBRANCH_TRUE="// "
     170  ADVBRANCH_FALSE=""
     171fi
     172AC_SUBST(ADVBRANCH_TRUE)
     173AC_SUBST(ADVBRANCH_FALSE)
    102174
    103175AC_MSG_CHECKING(whether to use ADOL-C debug mode)
     
    379451                ADOL-C/include/Makefile
    380452                ADOL-C/include/adolc/Makefile
     453                ADOL-C/include/adolc/adolc_settings.h
    381454                ADOL-C/include/adolc/drivers/Makefile
    382455                ADOL-C/include/adolc/sparse/Makefile
Note: See TracChangeset for help on using the changeset viewer.