[BACK]Return to Makefile.am CVS log [TXT][DIR] Up to [local] / OpenXM_contrib / gmp / tune

Annotation of OpenXM_contrib/gmp/tune/Makefile.am, Revision 1.1.1.2

1.1       maekawa     1: ## Process this file with automake to generate Makefile.in
                      2:
1.1.1.2 ! ohara       3: # Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
1.1       maekawa     4: #
                      5: # This file is part of the GNU MP Library.
                      6: #
                      7: # The GNU MP Library is free software; you can redistribute it and/or modify
                      8: # it under the terms of the GNU Lesser General Public License as published by
                      9: # the Free Software Foundation; either version 2.1 of the License, or (at your
                     10: # option) any later version.
                     11: #
                     12: # The GNU MP Library is distributed in the hope that it will be useful, but
                     13: # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
                     14: # or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
                     15: # License for more details.
                     16: #
                     17: # You should have received a copy of the GNU Lesser General Public License
                     18: # along with the GNU MP Library; see the file COPYING.LIB.  If not, write to
                     19: # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
                     20: # MA 02111-1307, USA.
                     21:
                     22:
                     23: AUTOMAKE_OPTIONS = gnu no-dependencies $(top_builddir)/ansi2knr
                     24:
1.1.1.2 ! ohara      25: INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/tests
1.1       maekawa    26:
1.1.1.2 ! ohara      27: EXTRA_DIST = alpha.asm pentium.asm sparcv9.asm hppa.asm hppa2.asm hppa2w.asm ia64.asm many.pl
1.1       maekawa    28: noinst_HEADERS = speed.h
                     29:
1.1.1.2 ! ohara      30:
1.1       maekawa    31: EXTRA_LTLIBRARIES = libspeed.la
                     32:
1.1.1.2 ! ohara      33: libspeed_la_SOURCES =                                                  \
        !            34:   common.c divrem1div.c divrem1inv.c divrem2div.c divrem2inv.c         \
        !            35:   freq.c gcd_bin.c gcd_finda_gen.c                                     \
        !            36:   gcdext_single.c gcdext_double.c gcdextod.c gcdextos.c                        \
        !            37:   jacbase1.c jacbase2.c jacbase3.c                                     \
        !            38:   mod_1_div.c mod_1_inv.c modlinv.c mul_n_mpn.c mul_n_open.c           \
        !            39:   noop.c powm_mod.c powm_redc.c pre_divrem_1.c                         \
        !            40:   set_strb.c set_strs.c time.c                                         \
        !            41:   sb_div.c sb_inv.c
        !            42:
        !            43: libspeed_la_DEPENDENCIES = $(SPEED_CYCLECOUNTER_OBJ) \
        !            44:   $(top_builddir)/tests/libtests.la $(top_builddir)/libgmp.la
        !            45: libspeed_la_LIBADD = $(libspeed_la_DEPENDENCIES) $(LIBM)
        !            46: libspeed_la_LDFLAGS = -static
        !            47:
        !            48: $(top_builddir)/tests/libtests.la:
        !            49:        cd $(top_builddir)/tests; $(MAKE) $(AM_MAKEFLAGS) libtests.la
        !            50:
        !            51:
        !            52: # The library code is faster static than shared on some systems, so do
        !            53: # tuning and measuring with static, since users who care about maximizing
        !            54: # speed will be using that.  speed-dynamic exists to show the difference.
        !            55: #
        !            56: # On Solaris 8, gcc 2.95.2 -static is somehow broken (it creates executables
        !            57: # that immediately seg fault), so -all-static is not used.  The only thing
        !            58: # -all-static does is make libc static linked as well as libgmp, and that
        !            59: # makes a difference only when measuring malloc and friends in the speed
        !            60: # program.  This can always be forced with "make speed_LDFLAGS=-all-static
        !            61: # ..." if desired, see tune/README.
1.1       maekawa    62:
1.1.1.2 ! ohara      63: EXTRA_PROGRAMS = speed speed-dynamic speed-ext tuneup
1.1       maekawa    64:
1.1.1.2 ! ohara      65: DEPENDENCIES = libspeed.la
        !            66: LDADD = $(DEPENDENCIES)
1.1       maekawa    67:
1.1.1.2 ! ohara      68: speed_SOURCES = speed.c
        !            69: speed_LDFLAGS = -static
1.1       maekawa    70:
1.1.1.2 ! ohara      71: speed_dynamic_SOURCES = speed.c
1.1       maekawa    72:
1.1.1.2 ! ohara      73: speed_ext_SOURCES = speed-ext.c
        !            74: speed_ext_LDFLAGS = -static
1.1       maekawa    75:
1.1.1.2 ! ohara      76: tuneup_SOURCES = tuneup.c
        !            77: nodist_tuneup_SOURCES = sqr_basecase.c $(TUNE_MPN_SRCS)
        !            78: tuneup_DEPENDENCIES = $(TUNE_SQR_OBJ) libspeed.la
        !            79: tuneup_LDADD = $(tuneup_DEPENDENCIES)
        !            80: tuneup_LDFLAGS = -static
1.1       maekawa    81:
                     82:
1.1.1.2 ! ohara      83: tune:
        !            84:        $(MAKE) $(AM_MAKEFLAGS) tuneup$(EXEEXT)
        !            85:        ./tuneup
        !            86:
        !            87: allprogs: $(EXTRA_PROGRAMS)
        !            88:
        !            89: # $(MANY_CLEAN) and $(MANY_DISTCLEAN) are hooks for many.pl
1.1       maekawa    90: CLEANFILES = $(EXTRA_PROGRAMS) $(EXTRA_LTLIBRARIES) \
1.1.1.2 ! ohara      91:        $(TUNE_MPN_SRCS) sqr_asm.asm \
1.1       maekawa    92:        stg.gnuplot stg.data \
                     93:        mtg.gnuplot mtg.data \
                     94:        fibg.gnuplot fibg.data \
1.1.1.2 ! ohara      95:        graph.gnuplot graph.data \
        !            96:        $(MANY_CLEAN)
        !            97: DISTCLEANFILES = sqr_basecase.c  $(MANY_DISTCLEAN)
1.1       maekawa    98:
                     99:
1.1.1.2 ! ohara     100: # Generating these little files at build time seems better than including
        !           101: # them in the distribution, since the list can be changed more easily.
        !           102: #
        !           103: # mpn/generic/tdiv_qr.c uses mpn_divrem_1 and mpn_divrem_2, but only for 1
        !           104: # and 2 limb divisors, which are never used during tuning, so it doesn't
        !           105: # matter whether it picks up a tuned or untuned version of those.
        !           106: #
        !           107: # divrem_1 and mod_1 are recompiled renamed to "_tune" to avoid a linking
        !           108: # problem.  If a native divrem_1 provides an mpn_divrem_1c entrypoint then
        !           109: # common.c will want that, but the generic divrem_1 doesn't provide it,
        !           110: # likewise for mod_1.  The simplest way around this is to have the tune
        !           111: # build versions renamed suitably.
        !           112: #
        !           113: # FIXME: Would like say mul_n.c to depend on $(top_builddir)/mul_n.c so the
        !           114: # recompiled object will be rebuilt if that file changes.
        !           115:
        !           116: TUNE_MPN_SRCS = $(TUNE_MPN_SRCS_BASIC) divrem_1.c mod_1.c
        !           117: TUNE_MPN_SRCS_BASIC = dc_divrem_n.c divrem_2.c gcd.c get_str.c \
        !           118:   mul_n.c mul_fft.c mul.c sb_divrem_mn.c tdiv_qr.c
1.1       maekawa   119:
1.1.1.2 ! ohara     120: $(TUNE_MPN_SRCS_BASIC):
        !           121:        for i in $(TUNE_MPN_SRCS_BASIC); do \
        !           122:          echo "#define TUNE_PROGRAM_BUILD 1" >$$i; \
        !           123:          echo "#include \"mpn/generic/$$i\"" >>$$i; \
        !           124:        done
1.1       maekawa   125:
1.1.1.2 ! ohara     126: divrem_1.c:
        !           127:        echo "#define TUNE_PROGRAM_BUILD 1"                >divrem_1.c
        !           128:        echo "#define __gmpn_divrem_1  mpn_divrem_1_tune" >>divrem_1.c
        !           129:        echo "#include \"mpn/generic/divrem_1.c\""        >>divrem_1.c
1.1       maekawa   130:
1.1.1.2 ! ohara     131: mod_1.c:
        !           132:        echo "#define TUNE_PROGRAM_BUILD 1"          >mod_1.c
        !           133:        echo "#define __gmpn_mod_1  mpn_mod_1_tune" >>mod_1.c
        !           134:        echo "#include \"mpn/generic/mod_1.c\""     >>mod_1.c
1.1       maekawa   135:
1.1.1.2 ! ohara     136: sqr_asm.asm: $(top_builddir)/mpn/sqr_basecase.asm
        !           137:        echo 'define(SQR_KARATSUBA_THRESHOLD_OVERRIDE,SQR_KARATSUBA_THRESHOLD_MAX)' >sqr_asm.asm
        !           138:        echo 'include(../mpn/sqr_basecase.asm)' >>sqr_asm.asm
1.1       maekawa   139:
                    140:
1.1.1.2 ! ohara     141: include ../mpn/Makeasm.am
1.1       maekawa   142:
                    143:
                    144: # "mk" is multiplication in the karatsuba range
                    145: # "st" is squaring in the toom-cook range, etc
                    146: # "g" forms produce graphs
                    147:
                    148: mk:
                    149:        ./speed -s 5-40 -c mpn_mul_basecase mpn_kara_mul_n
                    150:
                    151: MTS = -s 50-150 -c
                    152: mt:
1.1.1.2 ! ohara     153:        ./speed $(MTS) mpn_kara_mul_n mpn_toom3_mul_n
1.1       maekawa   154: mtg:
                    155:        ./speed $(MTS) -P mtg mpn_kara_mul_n mpn_toom3_mul_n
                    156:
                    157: sk:
                    158:        ./speed -s 5-40 -c mpn_sqr_basecase mpn_kara_sqr_n
                    159:
                    160: STS = -s 50-150 -c
                    161: st:
1.1.1.2 ! ohara     162:        ./speed $(STS) mpn_kara_sqr_n mpn_toom3_sqr_n
1.1       maekawa   163: stg:
                    164:        ./speed $(STS) -P stg mpn_kara_sqr_n mpn_toom3_sqr_n
                    165:
1.1.1.2 ! ohara     166: dc:
        !           167:        ./speed -s 5-40 -c mpn_dc_divrem_sb mpn_dc_divrem_n mpn_dc_tdiv_qr
1.1       maekawa   168:
                    169: fib:
1.1.1.2 ! ohara     170:        ./speed -s 40-60 -c mpz_fib_ui
1.1       maekawa   171: fibg:
                    172:        ./speed -s 10-300 -P fibg mpz_fib_ui
                    173:
                    174:
                    175: gcd:
                    176:        ./speed -s 1-20 -c mpn_gcd
1.1.1.2 ! ohara     177:
        !           178: udiv:
        !           179:        ./speed -s 1 -c udiv_qrnnd udiv_qrnnd_preinv udiv_qrnnd_preinv2norm invert_limb udiv_qrnnd_c
        !           180:
        !           181: divn:
        !           182:        ./speed -s 1-30 -c mpn_divrem_1_div.-1 mpn_divrem_1_inv.-1
        !           183: divun:
        !           184:        ./speed -s 1-30 -c mpn_divrem_1_div.12345 mpn_divrem_1_inv.12345
        !           185: modn:
        !           186:        ./speed -s 1-30 -c mpn_mod_1_div.-1 mpn_mod_1_inv.-1
        !           187: modun:
        !           188:        ./speed -s 1-30 -c mpn_mod_1_div.12345 mpn_mod_1_inv.12345
1.1       maekawa   189:
                    190:
                    191: graph:
                    192:        ./speed -s 1-5000 -f 1.02 -P graph mpn_mul_n mpn_sqr
                    193:        gnuplot graph.gnuplot

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>