Ignore:
Timestamp:
Jan 21, 2014 5:16:57 AM (6 years ago)
Author:
awalther
Message:

extend tensor driver address(..) for unsorted arguments, renaming to tensor_address to avoid conflicts

Location:
trunk/ADOL-C/src/drivers
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ADOL-C/src/drivers/Makefile.in

    r439 r450  
    1 # Makefile.in generated by automake 1.12.1 from Makefile.am.
     1# Makefile.in generated by automake 1.11.1 from Makefile.am.
    22# @configure_input@
    33
    4 # Copyright (C) 1994-2012 Free Software Foundation, Inc.
    5 
     4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
     5# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
     6# Inc.
    67# This Makefile.in is free software; the Free Software Foundation
    78# gives unlimited permission to copy and/or distribute it,
     
    1920
    2021VPATH = @srcdir@
    21 am__make_dryrun = \
    22   { \
    23     am__dry=no; \
    24     case $$MAKEFLAGS in \
    25       *\\[\ \   ]*) \
    26         echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
    27           | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
    28       *) \
    29         for am__flg in $$MAKEFLAGS; do \
    30           case $$am__flg in \
    31             *=*|--*) ;; \
    32             *n*) am__dry=yes; break;; \
    33           esac; \
    34         done;; \
    35     esac; \
    36     test $$am__dry = yes; \
    37   }
    3822pkgdatadir = $(datadir)/@PACKAGE@
    3923pkgincludedir = $(includedir)/@PACKAGE@
     
    5539host_triplet = @host@
    5640subdir = ADOL-C/src/drivers
    57 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
    58         $(top_srcdir)/autoconf/depcomp
     41DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
    5942ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
    6043am__aclocal_m4_deps = $(top_srcdir)/autoconf/acx_builtin.m4 \
     
    7760        odedriversf.lo taylor.lo
    7861libdrivers_la_OBJECTS = $(am_libdrivers_la_OBJECTS)
    79 AM_V_lt = $(am__v_lt_@AM_V@)
    80 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
     62AM_V_lt = $(am__v_lt_$(V))
     63am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
    8164am__v_lt_0 = --silent
    8265DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/ADOL-C/src
     
    9073        $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
    9174        $(AM_CFLAGS) $(CFLAGS)
    92 AM_V_CC = $(am__v_CC_@AM_V@)
    93 am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
    94 am__v_CC_0 = @echo "  CC      " $@;
    95 AM_V_at = $(am__v_at_@AM_V@)
    96 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
     75AM_V_CC = $(am__v_CC_$(V))
     76am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
     77am__v_CC_0 = @echo "  CC    " $@;
     78AM_V_at = $(am__v_at_$(V))
     79am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
    9780am__v_at_0 = @
    9881CCLD = $(CC)
     
    10083        $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
    10184        $(AM_LDFLAGS) $(LDFLAGS) -o $@
    102 AM_V_CCLD = $(am__v_CCLD_@AM_V@)
    103 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
    104 am__v_CCLD_0 = @echo "  CCLD    " $@;
    105 AM_V_GEN = $(am__v_GEN_@AM_V@)
    106 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
    107 am__v_GEN_0 = @echo "  GEN     " $@;
     85AM_V_CCLD = $(am__v_CCLD_$(V))
     86am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
     87am__v_CCLD_0 = @echo "  CCLD  " $@;
     88AM_V_GEN = $(am__v_GEN_$(V))
     89am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
     90am__v_GEN_0 = @echo "  GEN   " $@;
    10891SOURCES = $(libdrivers_la_SOURCES)
    10992DIST_SOURCES = $(libdrivers_la_SOURCES)
    110 am__can_run_installinfo = \
    111   case $$AM_UPDATE_INFO_DIR in \
    112     n|no|NO) false;; \
    113     *) (install-info --version) >/dev/null 2>&1;; \
    114   esac
    11593ETAGS = etags
    11694CTAGS = ctags
     
    168146LTLIBOBJS = @LTLIBOBJS@
    169147MAKEINFO = @MAKEINFO@
    170 MANIFEST_TOOL = @MANIFEST_TOOL@
    171148MKDIR_P = @MKDIR_P@
    172149NM = @NM@
     
    200177ac_adolc_cxxflags = @ac_adolc_cxxflags@
    201178ac_aux_dir = @ac_aux_dir@
    202 ac_ct_AR = @ac_ct_AR@
    203179ac_ct_CC = @ac_ct_CC@
    204180ac_ct_CXX = @ac_ct_CXX@
     
    235211localedir = @localedir@
    236212localstatedir = @localstatedir@
     213lt_ECHO = @lt_ECHO@
    237214mandir = @mandir@
    238215mkdir_p = @mkdir_p@
     
    296273clean-noinstLTLIBRARIES:
    297274        -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
    298         @list='$(noinst_LTLIBRARIES)'; \
    299         locs=`for p in $$list; do echo $$p; done | \
    300               sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
    301               sort -u`; \
    302         test -z "$$locs" || { \
    303           echo rm -f $${locs}; \
    304           rm -f $${locs}; \
    305         }
    306 libdrivers.la: $(libdrivers_la_OBJECTS) $(libdrivers_la_DEPENDENCIES) $(EXTRA_libdrivers_la_DEPENDENCIES)
     275        @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
     276          dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
     277          test "$$dir" != "$$p" || dir=.; \
     278          echo "rm -f \"$${dir}/so_locations\""; \
     279          rm -f "$${dir}/so_locations"; \
     280        done
     281libdrivers.la: $(libdrivers_la_OBJECTS) $(libdrivers_la_DEPENDENCIES)
    307282        $(AM_V_CCLD)$(LINK)  $(libdrivers_la_OBJECTS) $(libdrivers_la_LIBADD) $(LIBS)
    308283
     
    322297@am__fastdepCC_TRUE@    $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
    323298@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
    324 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
     299@am__fastdepCC_FALSE@   $(AM_V_CC) @AM_BACKSLASH@
     300@AMDEP_TRUE@@am__fastdepCC_FALSE@       source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
    325301@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    326 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
     302@am__fastdepCC_FALSE@   $(COMPILE) -c $<
    327303
    328304.c.obj:
    329305@am__fastdepCC_TRUE@    $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
    330306@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
    331 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
     307@am__fastdepCC_FALSE@   $(AM_V_CC) @AM_BACKSLASH@
     308@AMDEP_TRUE@@am__fastdepCC_FALSE@       source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
    332309@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    333 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
     310@am__fastdepCC_FALSE@   $(COMPILE) -c `$(CYGPATH_W) '$<'`
    334311
    335312.c.lo:
    336313@am__fastdepCC_TRUE@    $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
    337314@am__fastdepCC_TRUE@    $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
    338 @AMDEP_TRUE@@am__fastdepCC_FALSE@       $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
     315@am__fastdepCC_FALSE@   $(AM_V_CC) @AM_BACKSLASH@
     316@AMDEP_TRUE@@am__fastdepCC_FALSE@       source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
    339317@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    340 @am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
     318@am__fastdepCC_FALSE@   $(LTCOMPILE) -c -o $@ $<
    341319
    342320mostlyclean-libtool:
     
    394372          && $(am__cd) $(top_srcdir) \
    395373          && gtags -i $(GTAGS_ARGS) "$$here"
    396 
    397 cscopelist:  $(HEADERS) $(SOURCES) $(LISP)
    398         list='$(SOURCES) $(HEADERS) $(LISP)'; \
    399         case "$(srcdir)" in \
    400           [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
    401           *) sdir=$(subdir)/$(srcdir) ;; \
    402         esac; \
    403         for i in $$list; do \
    404           if test -f "$$i"; then \
    405             echo "$(subdir)/$$i"; \
    406           else \
    407             echo "$$sdir/$$i"; \
    408           fi; \
    409         done >> $(top_builddir)/cscope.files
    410374
    411375distclean-tags:
     
    456420installcheck: installcheck-am
    457421install-strip:
    458         if test -z '$(STRIP)'; then \
    459           $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
    460             install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
    461               install; \
    462         else \
    463           $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
    464             install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
    465             "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
    466         fi
     422        $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
     423          install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
     424          `test -z '$(STRIP)' || \
     425            echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
    467426mostlyclean-generic:
    468427
     
    551510
    552511.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
    553         clean-libtool clean-noinstLTLIBRARIES cscopelist ctags \
    554         distclean distclean-compile distclean-generic \
    555         distclean-libtool distclean-tags distdir dvi dvi-am html \
    556         html-am info info-am install install-am install-data \
    557         install-data-am install-dvi install-dvi-am install-exec \
    558         install-exec-am install-html install-html-am install-info \
    559         install-info-am install-man install-pdf install-pdf-am \
    560         install-ps install-ps-am install-strip installcheck \
    561         installcheck-am installdirs maintainer-clean \
    562         maintainer-clean-generic mostlyclean mostlyclean-compile \
    563         mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
    564         tags uninstall uninstall-am
     512        clean-libtool clean-noinstLTLIBRARIES ctags distclean \
     513        distclean-compile distclean-generic distclean-libtool \
     514        distclean-tags distdir dvi dvi-am html html-am info info-am \
     515        install install-am install-data install-data-am install-dvi \
     516        install-dvi-am install-exec install-exec-am install-html \
     517        install-html-am install-info install-info-am install-man \
     518        install-pdf install-pdf-am install-ps install-ps-am \
     519        install-strip installcheck installcheck-am installdirs \
     520        maintainer-clean maintainer-clean-generic mostlyclean \
     521        mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
     522        pdf pdf-am ps ps-am tags uninstall uninstall-am
    565523
    566524
  • trunk/ADOL-C/src/drivers/taylor.c

    r333 r450  
    261261
    262262/*--------------------------------------------------------------------------*/
    263 int address( int d, int* im ) {
    264     int i,
    265     add = 0;
     263int tensor_address( int d, int* multi) {
     264    int i, j, max, ind;
     265    int add = 0;
     266    int *im = (int*) malloc(d*sizeof(int));
     267    int *mymulti = (int*) malloc(d*sizeof(int));
     268
     269    max = 0;
     270    ind = d-1;
     271    for (i=0; i<d; i++) {
     272        mymulti[i] = multi[i];
     273        if (mymulti[i] > max)
     274            max = mymulti[i];
     275        im[i] = 0;
     276    }
     277
     278    for (i=0; i<d; i++) {
     279        if (mymulti[i] == max)
     280        { im[ind] = mymulti[i];
     281          mymulti[i] = 0;
     282          max = 0;
     283          ind -= 1;
     284          for (j=0; j<d; j++)
     285            if (mymulti[j] > max)
     286              max = mymulti[j];
     287        }
     288    }
    266289
    267290    for (i=0; i<d; i++)
     291      {
    268292        add += binomi(im[i]+i,i+1);
    269     return add;
     293      }
     294    free((char*) im);
     295    free((char*) mymulti);
     296
     297    return add;
    270298}
    271299
     
    868896        }
    869897    }
    870     add = address(d,im);
     898    add = tensor_address(d,im);
    871899    for (i=0; i<m; i++)
    872900        y[i] = tensor[i][add];
Note: See TracChangeset for help on using the changeset viewer.