Add Chromium-only Blender WebEngine parity work
This commit is contained in:
47
blender-5.2.0/extern/gmp-source/tests/devel/Makefile.am
vendored
Normal file
47
blender-5.2.0/extern/gmp-source/tests/devel/Makefile.am
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
## Process this file with automake to generate Makefile.in
|
||||
|
||||
# Copyright 2000-2002, 2018 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is part of the GNU MP Library test suite.
|
||||
#
|
||||
# The GNU MP Library test suite is free software; you can redistribute it
|
||||
# and/or modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation; either version 3 of the License,
|
||||
# or (at your option) any later version.
|
||||
#
|
||||
# The GNU MP Library test suite is distributed in the hope that it will be
|
||||
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
# Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/.
|
||||
|
||||
|
||||
AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/tests
|
||||
AM_LDFLAGS = -no-install
|
||||
LDADD = $(top_builddir)/tests/libtests.la $(top_builddir)/libgmp.la
|
||||
|
||||
EXTRA_PROGRAMS = \
|
||||
sqrtrem_1_2 primes try test-add_ssaaaa test-sub_ddmmss
|
||||
|
||||
EXTRA_DIST = gen-test-longlong_h.c
|
||||
|
||||
allprogs: $(EXTRA_PROGRAMS)
|
||||
|
||||
CLEANFILES = $(EXTRA_PROGRAMS)
|
||||
|
||||
$(top_builddir)/tests/libtests.la:
|
||||
cd $(top_builddir)/tests; $(MAKE) $(AM_MAKEFLAGS) libtests.la
|
||||
|
||||
test-add_ssaaaa.c: gen-test-longlong_h$(EXEEXT_FOR_BUILD)
|
||||
./gen-test-longlong_h add >test-add_ssaaaa.c || (rm -f test-add_ssaaaa.c; exit 1)
|
||||
CLEANFILES += test-add_ssaaaa.c
|
||||
|
||||
test-sub_ddmmss.c: gen-test-longlong_h$(EXEEXT_FOR_BUILD)
|
||||
./gen-test-longlong_h sub >test-sub_ddmmss.c || (rm -f test-sub_ddmmss.c; exit 1)
|
||||
CLEANFILES += test-sub_ddmmss.c
|
||||
|
||||
gen-test-longlong_h$(EXEEXT_FOR_BUILD): gen-test-longlong_h.c
|
||||
$(CC_FOR_BUILD) `test -f 'gen-test-longlong_h.c' || echo '$(srcdir)/'`gen-test-longlong_h.c -o gen-test-longlong_h$(EXEEXT_FOR_BUILD)
|
||||
CLEANFILES += gen-test-longlong_h$(EXEEXT_FOR_BUILD)
|
||||
673
blender-5.2.0/extern/gmp-source/tests/devel/Makefile.in
vendored
Normal file
673
blender-5.2.0/extern/gmp-source/tests/devel/Makefile.in
vendored
Normal file
@@ -0,0 +1,673 @@
|
||||
# Makefile.in generated by automake 1.15 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2014 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
# Copyright 2000-2002, 2018 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is part of the GNU MP Library test suite.
|
||||
#
|
||||
# The GNU MP Library test suite is free software; you can redistribute it
|
||||
# and/or modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation; either version 3 of the License,
|
||||
# or (at your option) any later version.
|
||||
#
|
||||
# The GNU MP Library test suite is distributed in the hope that it will be
|
||||
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
# Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/.
|
||||
VPATH = @srcdir@
|
||||
am__is_gnu_make = { \
|
||||
if test -z '$(MAKELEVEL)'; then \
|
||||
false; \
|
||||
elif test -n '$(MAKE_HOST)'; then \
|
||||
true; \
|
||||
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
|
||||
true; \
|
||||
else \
|
||||
false; \
|
||||
fi; \
|
||||
}
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
EXTRA_PROGRAMS = sqrtrem_1_2$(EXEEXT) primes$(EXEEXT) try$(EXEEXT) \
|
||||
test-add_ssaaaa$(EXEEXT) test-sub_ddmmss$(EXEEXT)
|
||||
subdir = tests/devel
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
primes_SOURCES = primes.c
|
||||
primes_OBJECTS = primes.$(OBJEXT)
|
||||
primes_LDADD = $(LDADD)
|
||||
primes_DEPENDENCIES = $(top_builddir)/tests/libtests.la \
|
||||
$(top_builddir)/libgmp.la
|
||||
AM_V_lt = $(am__v_lt_@AM_V@)
|
||||
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
|
||||
am__v_lt_0 = --silent
|
||||
am__v_lt_1 =
|
||||
sqrtrem_1_2_SOURCES = sqrtrem_1_2.c
|
||||
sqrtrem_1_2_OBJECTS = sqrtrem_1_2.$(OBJEXT)
|
||||
sqrtrem_1_2_LDADD = $(LDADD)
|
||||
sqrtrem_1_2_DEPENDENCIES = $(top_builddir)/tests/libtests.la \
|
||||
$(top_builddir)/libgmp.la
|
||||
test_add_ssaaaa_SOURCES = test-add_ssaaaa.c
|
||||
test_add_ssaaaa_OBJECTS = test-add_ssaaaa.$(OBJEXT)
|
||||
test_add_ssaaaa_LDADD = $(LDADD)
|
||||
test_add_ssaaaa_DEPENDENCIES = $(top_builddir)/tests/libtests.la \
|
||||
$(top_builddir)/libgmp.la
|
||||
test_sub_ddmmss_SOURCES = test-sub_ddmmss.c
|
||||
test_sub_ddmmss_OBJECTS = test-sub_ddmmss.$(OBJEXT)
|
||||
test_sub_ddmmss_LDADD = $(LDADD)
|
||||
test_sub_ddmmss_DEPENDENCIES = $(top_builddir)/tests/libtests.la \
|
||||
$(top_builddir)/libgmp.la
|
||||
try_SOURCES = try.c
|
||||
try_OBJECTS = try.$(OBJEXT)
|
||||
try_LDADD = $(LDADD)
|
||||
try_DEPENDENCIES = $(top_builddir)/tests/libtests.la \
|
||||
$(top_builddir)/libgmp.la
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
|
||||
depcomp =
|
||||
am__depfiles_maybe =
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
AM_V_CC = $(am__v_CC_@AM_V@)
|
||||
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
|
||||
am__v_CC_0 = @echo " CC " $@;
|
||||
am__v_CC_1 =
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
|
||||
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
|
||||
am__v_CCLD_0 = @echo " CCLD " $@;
|
||||
am__v_CCLD_1 =
|
||||
SOURCES = primes.c sqrtrem_1_2.c test-add_ssaaaa.c test-sub_ddmmss.c \
|
||||
try.c
|
||||
DIST_SOURCES = primes.c sqrtrem_1_2.c test-add_ssaaaa.c \
|
||||
test-sub_ddmmss.c try.c
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
# Read a list of newline-separated strings from the standard input,
|
||||
# and print each of them once, without duplicates. Input order is
|
||||
# *not* preserved.
|
||||
am__uniquify_input = $(AWK) '\
|
||||
BEGIN { nonempty = 0; } \
|
||||
{ items[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in items) print i; }; } \
|
||||
'
|
||||
# Make sure the list of sources is unique. This is necessary because,
|
||||
# e.g., the same source file might be shared among _SOURCES variables
|
||||
# for different programs/libraries.
|
||||
am__define_uniq_tagged_files = \
|
||||
list='$(am__tagged_files)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | $(am__uniquify_input)`
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
am__DIST_COMMON = $(srcdir)/Makefile.in README
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ABI = @ABI@
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
ASMFLAGS = @ASMFLAGS@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CALLING_CONVENTIONS_OBJS = @CALLING_CONVENTIONS_OBJS@
|
||||
CC = @CC@
|
||||
CCAS = @CCAS@
|
||||
CC_FOR_BUILD = @CC_FOR_BUILD@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CPP_FOR_BUILD = @CPP_FOR_BUILD@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFN_LONG_LONG_LIMB = @DEFN_LONG_LONG_LIMB@
|
||||
DEFS = @DEFS@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@
|
||||
FGREP = @FGREP@
|
||||
GMP_LDFLAGS = @GMP_LDFLAGS@
|
||||
GMP_LIMB_BITS = @GMP_LIMB_BITS@
|
||||
GMP_NAIL_BITS = @GMP_NAIL_BITS@
|
||||
GREP = @GREP@
|
||||
HAVE_CLOCK_01 = @HAVE_CLOCK_01@
|
||||
HAVE_CPUTIME_01 = @HAVE_CPUTIME_01@
|
||||
HAVE_GETRUSAGE_01 = @HAVE_GETRUSAGE_01@
|
||||
HAVE_GETTIMEOFDAY_01 = @HAVE_GETTIMEOFDAY_01@
|
||||
HAVE_HOST_CPU_FAMILY_power = @HAVE_HOST_CPU_FAMILY_power@
|
||||
HAVE_HOST_CPU_FAMILY_powerpc = @HAVE_HOST_CPU_FAMILY_powerpc@
|
||||
HAVE_SIGACTION_01 = @HAVE_SIGACTION_01@
|
||||
HAVE_SIGALTSTACK_01 = @HAVE_SIGALTSTACK_01@
|
||||
HAVE_SIGSTACK_01 = @HAVE_SIGSTACK_01@
|
||||
HAVE_STACK_T_01 = @HAVE_STACK_T_01@
|
||||
HAVE_SYS_RESOURCE_H_01 = @HAVE_SYS_RESOURCE_H_01@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LEX = @LEX@
|
||||
LEXLIB = @LEXLIB@
|
||||
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
|
||||
LIBCURSES = @LIBCURSES@
|
||||
LIBGMPXX_LDFLAGS = @LIBGMPXX_LDFLAGS@
|
||||
LIBGMP_DLL = @LIBGMP_DLL@
|
||||
LIBGMP_LDFLAGS = @LIBGMP_LDFLAGS@
|
||||
LIBM = @LIBM@
|
||||
LIBM_FOR_BUILD = @LIBM_FOR_BUILD@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBREADLINE = @LIBREADLINE@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
|
||||
M4 = @M4@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
SPEED_CYCLECOUNTER_OBJ = @SPEED_CYCLECOUNTER_OBJ@
|
||||
STRIP = @STRIP@
|
||||
TAL_OBJECT = @TAL_OBJECT@
|
||||
TUNE_LIBS = @TUNE_LIBS@
|
||||
TUNE_SQR_OBJ = @TUNE_SQR_OBJ@
|
||||
U_FOR_BUILD = @U_FOR_BUILD@
|
||||
VERSION = @VERSION@
|
||||
WITH_READLINE_01 = @WITH_READLINE_01@
|
||||
YACC = @YACC@
|
||||
YFLAGS = @YFLAGS@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
gmp_srclinks = @gmp_srclinks@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
mpn_objects = @mpn_objects@
|
||||
mpn_objs_in_libgmp = @mpn_objs_in_libgmp@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/tests
|
||||
AM_LDFLAGS = -no-install
|
||||
LDADD = $(top_builddir)/tests/libtests.la $(top_builddir)/libgmp.la
|
||||
EXTRA_DIST = gen-test-longlong_h.c
|
||||
CLEANFILES = $(EXTRA_PROGRAMS) test-add_ssaaaa.c test-sub_ddmmss.c \
|
||||
gen-test-longlong_h$(EXEEXT_FOR_BUILD)
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps tests/devel/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu --ignore-deps tests/devel/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
primes$(EXEEXT): $(primes_OBJECTS) $(primes_DEPENDENCIES) $(EXTRA_primes_DEPENDENCIES)
|
||||
@rm -f primes$(EXEEXT)
|
||||
$(AM_V_CCLD)$(LINK) $(primes_OBJECTS) $(primes_LDADD) $(LIBS)
|
||||
|
||||
sqrtrem_1_2$(EXEEXT): $(sqrtrem_1_2_OBJECTS) $(sqrtrem_1_2_DEPENDENCIES) $(EXTRA_sqrtrem_1_2_DEPENDENCIES)
|
||||
@rm -f sqrtrem_1_2$(EXEEXT)
|
||||
$(AM_V_CCLD)$(LINK) $(sqrtrem_1_2_OBJECTS) $(sqrtrem_1_2_LDADD) $(LIBS)
|
||||
|
||||
test-add_ssaaaa$(EXEEXT): $(test_add_ssaaaa_OBJECTS) $(test_add_ssaaaa_DEPENDENCIES) $(EXTRA_test_add_ssaaaa_DEPENDENCIES)
|
||||
@rm -f test-add_ssaaaa$(EXEEXT)
|
||||
$(AM_V_CCLD)$(LINK) $(test_add_ssaaaa_OBJECTS) $(test_add_ssaaaa_LDADD) $(LIBS)
|
||||
|
||||
test-sub_ddmmss$(EXEEXT): $(test_sub_ddmmss_OBJECTS) $(test_sub_ddmmss_DEPENDENCIES) $(EXTRA_test_sub_ddmmss_DEPENDENCIES)
|
||||
@rm -f test-sub_ddmmss$(EXEEXT)
|
||||
$(AM_V_CCLD)$(LINK) $(test_sub_ddmmss_OBJECTS) $(test_sub_ddmmss_LDADD) $(LIBS)
|
||||
|
||||
try$(EXEEXT): $(try_OBJECTS) $(try_DEPENDENCIES) $(EXTRA_try_DEPENDENCIES)
|
||||
@rm -f try$(EXEEXT)
|
||||
$(AM_V_CCLD)$(LINK) $(try_OBJECTS) $(try_LDADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
.c.o:
|
||||
$(AM_V_CC)$(COMPILE) -c -o $@ $<
|
||||
|
||||
.c.obj:
|
||||
$(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
$(AM_V_CC)$(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
ID: $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); mkid -fID $$unique
|
||||
tags: tags-am
|
||||
TAGS: tags
|
||||
|
||||
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
$(am__define_uniq_tagged_files); \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: ctags-am
|
||||
|
||||
CTAGS: ctags
|
||||
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
cscopelist: cscopelist-am
|
||||
|
||||
cscopelist-am: $(am__tagged_files)
|
||||
list='$(am__tagged_files)'; \
|
||||
case "$(srcdir)" in \
|
||||
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||
esac; \
|
||||
for i in $$list; do \
|
||||
if test -f "$$i"; then \
|
||||
echo "$(subdir)/$$i"; \
|
||||
else \
|
||||
echo "$$sdir/$$i"; \
|
||||
fi; \
|
||||
done >> $(top_builddir)/cscope.files
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile
|
||||
installdirs:
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am:
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
|
||||
clean-libtool cscopelist-am ctags ctags-am distclean \
|
||||
distclean-compile distclean-generic distclean-libtool \
|
||||
distclean-tags distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-html \
|
||||
install-html-am install-info install-info-am install-man \
|
||||
install-pdf install-pdf-am install-ps install-ps-am \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
|
||||
pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
|
||||
allprogs: $(EXTRA_PROGRAMS)
|
||||
|
||||
$(top_builddir)/tests/libtests.la:
|
||||
cd $(top_builddir)/tests; $(MAKE) $(AM_MAKEFLAGS) libtests.la
|
||||
|
||||
test-add_ssaaaa.c: gen-test-longlong_h$(EXEEXT_FOR_BUILD)
|
||||
./gen-test-longlong_h add >test-add_ssaaaa.c || (rm -f test-add_ssaaaa.c; exit 1)
|
||||
|
||||
test-sub_ddmmss.c: gen-test-longlong_h$(EXEEXT_FOR_BUILD)
|
||||
./gen-test-longlong_h sub >test-sub_ddmmss.c || (rm -f test-sub_ddmmss.c; exit 1)
|
||||
|
||||
gen-test-longlong_h$(EXEEXT_FOR_BUILD): gen-test-longlong_h.c
|
||||
$(CC_FOR_BUILD) `test -f 'gen-test-longlong_h.c' || echo '$(srcdir)/'`gen-test-longlong_h.c -o gen-test-longlong_h$(EXEEXT_FOR_BUILD)
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
37
blender-5.2.0/extern/gmp-source/tests/devel/README
vendored
Normal file
37
blender-5.2.0/extern/gmp-source/tests/devel/README
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
Copyright 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the GNU MP Library test suite.
|
||||
|
||||
The GNU MP Library test suite is free software; you can redistribute it
|
||||
and/or modify it under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation; either version 3 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
The GNU MP Library test suite is distributed in the hope that it will be
|
||||
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/.
|
||||
|
||||
|
||||
|
||||
|
||||
DEVELOPMENT TEST PROGRAMS
|
||||
|
||||
|
||||
This directory contains various programs used during development. Casual
|
||||
GMP users are unlikely to find anything of interest.
|
||||
|
||||
Nothing here is built or installed, nor even run in a "make check", but
|
||||
there's Makefile rules to build each program, or "allprogs" to build
|
||||
everything.
|
||||
|
||||
|
||||
|
||||
----------------
|
||||
Local variables:
|
||||
mode: text
|
||||
fill-column: 76
|
||||
End:
|
||||
140
blender-5.2.0/extern/gmp-source/tests/devel/gen-test-longlong_h.c
vendored
Normal file
140
blender-5.2.0/extern/gmp-source/tests/devel/gen-test-longlong_h.c
vendored
Normal file
@@ -0,0 +1,140 @@
|
||||
/*
|
||||
Copyright 2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the GNU MP Library test suite.
|
||||
|
||||
The GNU MP Library test suite is free software; you can redistribute it
|
||||
and/or modify it under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation; either version 3 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
The GNU MP Library test suite is distributed in the hope that it will be
|
||||
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
typedef unsigned long mp_limb_t; /* neat */
|
||||
|
||||
void
|
||||
one (const char *op, size_t ind, mp_limb_t m0, mp_limb_t s0)
|
||||
{
|
||||
printf ("static void f%zu(mp_limb_t*r1p,mp_limb_t*r0p){", ind);
|
||||
printf ("mp_limb_t r1,r0;");
|
||||
printf ("%s(r1,r0,0,%ld,0,%ld);", op, (long) m0, (long) s0);
|
||||
printf ("*r1p=r1;*r0p=r0;");
|
||||
printf ("}\n");
|
||||
}
|
||||
|
||||
mp_limb_t ops[1000];
|
||||
|
||||
enum what_t {ADD, SUB};
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
size_t n_operands = 0;
|
||||
size_t n_functions = 0;
|
||||
const char *op;
|
||||
enum what_t what;
|
||||
|
||||
if (argc == 2 && strcmp (argv[1], "add") == 0)
|
||||
{
|
||||
op = "add_ssaaaa";
|
||||
what = ADD;
|
||||
}
|
||||
else if (argc == 2 && strcmp (argv[1], "sub") == 0)
|
||||
{
|
||||
op = "sub_ddmmss";
|
||||
what = SUB;
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf (stderr, "what do yuo want me to do?\n");
|
||||
exit (1);
|
||||
}
|
||||
|
||||
for (int i = 0; i < 16; i++)
|
||||
{
|
||||
ops[n_operands++] = 1 << i;
|
||||
ops[n_operands++] = -(1 << i);
|
||||
ops[n_operands++] = (1 << i) - 1;
|
||||
ops[n_operands++] = -(1 << i) - 1;
|
||||
}
|
||||
|
||||
printf ("#include <stdlib.h>\n");
|
||||
printf ("#include <stdio.h>\n");
|
||||
printf ("#include \"gmp-impl.h\"\n");
|
||||
printf ("#include \"longlong.h\"\n");
|
||||
|
||||
/* Print out ops[] definition. */
|
||||
printf ("static const int ops[%zu] = {\n", n_operands);
|
||||
for (int i = 0; i < n_operands; i++)
|
||||
{
|
||||
printf ("%ld,", (long) ops[i]);
|
||||
if ((i + 1) % 4 == 0)
|
||||
puts ("");
|
||||
}
|
||||
printf ("};\n");
|
||||
|
||||
/* Generate functions and print them. */
|
||||
for (int i = 0; i < n_operands; i++)
|
||||
{
|
||||
for (int j = 0; j < n_operands; j++)
|
||||
{
|
||||
one (op, n_functions++, ops[i], ops[j]);
|
||||
}
|
||||
}
|
||||
|
||||
/* Print out function pointer table. */
|
||||
printf ("typedef void (*func_t) (mp_limb_t*, mp_limb_t*);\n");
|
||||
printf ("static const func_t funcs[%zu] = {\n", n_functions);
|
||||
for (size_t i = 0; i < n_functions; i++)
|
||||
{
|
||||
printf ("f%zu,", i);
|
||||
if ((i + 1) % 16 == 0)
|
||||
puts ("");
|
||||
}
|
||||
printf ("};\n");
|
||||
|
||||
/* Print out table of reference results. */
|
||||
printf ("static const int ref[%zu][2] = {\n", n_functions);
|
||||
for (int i = 0; i < n_operands; i++)
|
||||
{
|
||||
for (int j = 0; j < n_operands; j++)
|
||||
{
|
||||
if (what == ADD)
|
||||
printf ("{%6ld,%2ld},", (long) ( ops[i] + ops[j]), (long) ((mp_limb_t) ((ops[i] + ops[j]) < ops[i])));
|
||||
else /* SUB */
|
||||
printf ("{%6ld,%2ld},", (long) ( ops[i] - ops[j]), (long) (-(mp_limb_t) (ops[i] < ops[j])));
|
||||
if ((i * n_operands + j) % 8 == 0)
|
||||
puts ("");
|
||||
}
|
||||
}
|
||||
printf ("};\n");
|
||||
|
||||
printf ("int main ()\n{\n");
|
||||
printf (" mp_limb_t r1, r0;\n");
|
||||
printf (" int err = 0;\n");
|
||||
printf (" size_t ind = 0;\n");
|
||||
printf (" for (size_t i = 0; i < %zu; i++)\n", n_functions);
|
||||
printf (" {\n");
|
||||
printf (" int ii = i / %zu, jj = i %% %zu;\n", n_operands, n_operands);
|
||||
printf (" funcs[i](&r1, &r0);\n");
|
||||
printf (" if (r0 != (mp_limb_signed_t) ref[ind][0] || r1 != (mp_limb_signed_t) ref[ind][1]) {\n");
|
||||
printf (" printf (\"error for f%%zu(%%d,%%d): want (%%d,%%d) got (%%d,%%d)\\n\", i, (int) ops[ii], (int) ops[jj], ref[ind][1], ref[ind][0], (int) r1, (int) r0);\n");
|
||||
printf (" err++;\n");
|
||||
printf (" }\n");
|
||||
printf (" ind++;\n");
|
||||
printf (" }\n");
|
||||
|
||||
printf (" return err != 0;\n");
|
||||
printf ("}\n");
|
||||
return 0;
|
||||
}
|
||||
424
blender-5.2.0/extern/gmp-source/tests/devel/primes.c
vendored
Normal file
424
blender-5.2.0/extern/gmp-source/tests/devel/primes.c
vendored
Normal file
@@ -0,0 +1,424 @@
|
||||
/*
|
||||
Copyright 2018-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the GNU MP Library test suite.
|
||||
|
||||
The GNU MP Library test suite is free software; you can redistribute it
|
||||
and/or modify it under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation; either version 3 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
The GNU MP Library test suite is distributed in the hope that it will be
|
||||
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */
|
||||
|
||||
/* Usage:
|
||||
|
||||
./primes [p|c] [n0] <nMax>
|
||||
|
||||
Checks mpz_probab_prime_p(n, r) exhaustively, starting from n=n0
|
||||
up to nMax.
|
||||
If n0 * n0 > nMax, the intervall is sieved piecewise, else the
|
||||
full intervall [0..nMax] is sieved at once.
|
||||
With the parameter "p" (or nothing), tests all numbers. With "c"
|
||||
only composites are tested.
|
||||
|
||||
./primes n|N [n0] <nMax>
|
||||
|
||||
Checks mpz_nextprime() exhaustively, starting from n=n0 up to
|
||||
nMax. With "n", only the sequence of primes is checked, with "N"
|
||||
the function is tested on every number in the interval.
|
||||
|
||||
WARNING: The full intervall [0..nMax] is sieved at once, even if
|
||||
only a piece is needed. This may require a lot of memory!
|
||||
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include "gmp-impl.h"
|
||||
#include "longlong.h"
|
||||
#include "tests.h"
|
||||
#define STOP(x) return (x)
|
||||
/* #define STOP(x) x */
|
||||
#define REPS 10
|
||||
/* #define TRACE(x,n) if ((n)>1) {x;} */
|
||||
#define TRACE(x,n)
|
||||
|
||||
/* The full primesieve.c is included, just for block_resieve, that
|
||||
is not exported ... */
|
||||
#undef gmp_primesieve
|
||||
#include "../../primesieve.c"
|
||||
|
||||
#ifndef BLOCK_SIZE
|
||||
#define BLOCK_SIZE 2048
|
||||
#endif
|
||||
|
||||
/*********************************************************/
|
||||
/* Section sieve: sieving functions and tools for primes */
|
||||
/*********************************************************/
|
||||
|
||||
static mp_size_t
|
||||
primesieve_size (mp_limb_t n) { return n_fto_bit(n) / GMP_LIMB_BITS + 1; }
|
||||
|
||||
/*************************************************************/
|
||||
/* Section macros: common macros, for swing/fac/bin (&sieve) */
|
||||
/*************************************************************/
|
||||
|
||||
#define LOOP_ON_SIEVE_CONTINUE(prime,end) \
|
||||
__max_i = (end); \
|
||||
\
|
||||
do { \
|
||||
++__i; \
|
||||
if ((*__sieve & __mask) == 0) \
|
||||
{ \
|
||||
mp_limb_t prime; \
|
||||
prime = id_to_n(__i)
|
||||
|
||||
#define LOOP_ON_SIEVE_BEGIN(prime,start,end,off,sieve) \
|
||||
do { \
|
||||
mp_limb_t __mask, *__sieve, __max_i, __i; \
|
||||
\
|
||||
__i = (start)-(off); \
|
||||
__sieve = (sieve) + __i / GMP_LIMB_BITS; \
|
||||
__mask = CNST_LIMB(1) << (__i % GMP_LIMB_BITS); \
|
||||
__i += (off); \
|
||||
\
|
||||
LOOP_ON_SIEVE_CONTINUE(prime,end)
|
||||
|
||||
#define LOOP_ON_SIEVE_STOP \
|
||||
} \
|
||||
__mask = __mask << 1 | __mask >> (GMP_LIMB_BITS-1); \
|
||||
__sieve += __mask & 1; \
|
||||
} while (__i <= __max_i)
|
||||
|
||||
#define LOOP_ON_SIEVE_END \
|
||||
LOOP_ON_SIEVE_STOP; \
|
||||
} while (0)
|
||||
|
||||
mpz_t g;
|
||||
|
||||
int something_wrong (mpz_t er, int exp)
|
||||
{
|
||||
fprintf (stderr, "value = %lu , expected = %i\n", mpz_get_ui (er), exp);
|
||||
return -1;
|
||||
}
|
||||
|
||||
int
|
||||
check_pprime (unsigned long begin, unsigned long end, int composites)
|
||||
{
|
||||
begin = (begin / 6U) * 6U;
|
||||
for (;(begin < 2) & (begin <= end); ++begin)
|
||||
{
|
||||
*(g->_mp_d) = begin;
|
||||
TRACE(printf ("-%li ", begin),1);
|
||||
if (mpz_probab_prime_p (g, REPS))
|
||||
STOP (something_wrong (g, 0));
|
||||
}
|
||||
for (;(begin < 4) & (begin <= end); ++begin)
|
||||
{
|
||||
*(g->_mp_d) = begin;
|
||||
TRACE(printf ("+%li ", begin),2);
|
||||
if (!composites && !mpz_probab_prime_p (g, REPS))
|
||||
STOP (something_wrong (g, 1));
|
||||
}
|
||||
if (end > 4) {
|
||||
if ((end > 10000) && (begin > end / begin))
|
||||
{
|
||||
mp_limb_t *sieve, *primes;
|
||||
mp_size_t size_s, size_p, off;
|
||||
unsigned long start;
|
||||
|
||||
mpz_set_ui (g, end);
|
||||
mpz_sqrt (g, g);
|
||||
start = mpz_get_ui (g) + GMP_LIMB_BITS;
|
||||
size_p = primesieve_size (start);
|
||||
|
||||
primes = __GMP_ALLOCATE_FUNC_LIMBS (size_p);
|
||||
gmp_primesieve (primes, start);
|
||||
|
||||
size_s = BLOCK_SIZE * 2;
|
||||
sieve = __GMP_ALLOCATE_FUNC_LIMBS (size_s);
|
||||
off = n_cto_bit(begin);
|
||||
|
||||
do {
|
||||
TRACE (printf ("off =%li\n", off),3);
|
||||
block_resieve (sieve, BLOCK_SIZE, off, primes);
|
||||
TRACE (printf ("LOOP =%li - %li\n", id_to_n (off+1), id_to_n (off + BLOCK_SIZE * GMP_LIMB_BITS)),3);
|
||||
LOOP_ON_SIEVE_BEGIN (prime, off, off + BLOCK_SIZE * GMP_LIMB_BITS - 1,
|
||||
off, sieve);
|
||||
|
||||
do {
|
||||
*(g->_mp_d) = begin;
|
||||
TRACE(printf ("-%li ", begin),1);
|
||||
if (mpz_probab_prime_p (g, REPS))
|
||||
STOP (something_wrong (g, 0));
|
||||
if ((begin & 0xff) == 0)
|
||||
{
|
||||
spinner();
|
||||
if ((begin & 0xfffffff) == 0)
|
||||
printf ("%li (0x%lx)\n", begin, begin);
|
||||
}
|
||||
} while (++begin < prime);
|
||||
|
||||
*(g->_mp_d) = begin;
|
||||
TRACE(printf ("+%li ", begin),2);
|
||||
if (!composites && ! mpz_probab_prime_p (g, REPS))
|
||||
STOP (something_wrong (g, 1));
|
||||
++begin;
|
||||
|
||||
LOOP_ON_SIEVE_END;
|
||||
off += BLOCK_SIZE * GMP_LIMB_BITS;
|
||||
} while (begin < end);
|
||||
|
||||
__GMP_FREE_FUNC_LIMBS (sieve, size_s);
|
||||
__GMP_FREE_FUNC_LIMBS (primes, size_p);
|
||||
}
|
||||
else
|
||||
{
|
||||
mp_limb_t *sieve;
|
||||
mp_size_t size;
|
||||
unsigned long start;
|
||||
|
||||
size = primesieve_size (end);
|
||||
|
||||
sieve = __GMP_ALLOCATE_FUNC_LIMBS (size);
|
||||
gmp_primesieve (sieve, end);
|
||||
start = MAX (begin, 5) | 1;
|
||||
LOOP_ON_SIEVE_BEGIN (prime, n_cto_bit(start),
|
||||
n_fto_bit (end), 0, sieve);
|
||||
|
||||
do {
|
||||
*(g->_mp_d) = begin;
|
||||
TRACE(printf ("-%li ", begin),1);
|
||||
if (mpz_probab_prime_p (g, REPS))
|
||||
STOP (something_wrong (g, 0));
|
||||
if ((begin & 0xff) == 0)
|
||||
{
|
||||
spinner();
|
||||
if ((begin & 0xfffffff) == 0)
|
||||
printf ("%li (0x%lx)\n", begin, begin);
|
||||
}
|
||||
} while (++begin < prime);
|
||||
|
||||
*(g->_mp_d) = begin;
|
||||
TRACE(printf ("+%li ", begin),2);
|
||||
if (!composites && ! mpz_probab_prime_p (g, REPS))
|
||||
STOP (something_wrong (g, 1));
|
||||
++begin;
|
||||
|
||||
LOOP_ON_SIEVE_END;
|
||||
|
||||
__GMP_FREE_FUNC_LIMBS (sieve, size);
|
||||
}
|
||||
}
|
||||
|
||||
for (;begin < end; ++begin)
|
||||
{
|
||||
*(g->_mp_d) = begin;
|
||||
TRACE(printf ("-%li ", begin),1);
|
||||
if (mpz_probab_prime_p (g, REPS))
|
||||
STOP (something_wrong (g, 0));
|
||||
}
|
||||
|
||||
gmp_printf ("%Zd\n", g);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
check_nprime (unsigned long begin, unsigned long end)
|
||||
{
|
||||
if (begin < 2)
|
||||
{
|
||||
*(g->_mp_d) = begin;
|
||||
g->_mp_size = begin;
|
||||
TRACE(printf ("%li ", begin),1);
|
||||
mpz_nextprime (g, g);
|
||||
if (mpz_cmp_ui (g, 2) != 0)
|
||||
STOP (something_wrong (g, 2));
|
||||
begin = mpz_get_ui (g);
|
||||
}
|
||||
if (begin < 3)
|
||||
{
|
||||
*(g->_mp_d) = begin;
|
||||
TRACE(printf ("%li ", begin),1);
|
||||
mpz_nextprime (g, g);
|
||||
if (mpz_cmp_ui (g, 3) != 0)
|
||||
STOP (something_wrong (g, 3));
|
||||
begin = mpz_get_ui (g);
|
||||
}
|
||||
if (end > 4)
|
||||
{
|
||||
mp_limb_t *sieve;
|
||||
mp_size_t size;
|
||||
unsigned long start;
|
||||
|
||||
size = primesieve_size (end);
|
||||
|
||||
sieve = __GMP_ALLOCATE_FUNC_LIMBS (size);
|
||||
gmp_primesieve (sieve, end);
|
||||
start = MAX (begin, 5) | 1;
|
||||
*(g->_mp_d) = begin;
|
||||
LOOP_ON_SIEVE_BEGIN (prime, n_cto_bit(start),
|
||||
n_fto_bit (end), 0, sieve);
|
||||
|
||||
mpz_nextprime (g, g);
|
||||
if (mpz_cmp_ui (g, prime) != 0)
|
||||
STOP (something_wrong (g, prime));
|
||||
|
||||
if (prime - start > 200)
|
||||
{
|
||||
start = prime;
|
||||
spinner();
|
||||
if (prime - begin > 0xfffffff)
|
||||
{
|
||||
begin = prime;
|
||||
printf ("%li (0x%lx)\n", begin, begin);
|
||||
}
|
||||
}
|
||||
|
||||
LOOP_ON_SIEVE_END;
|
||||
|
||||
__GMP_FREE_FUNC_LIMBS (sieve, size);
|
||||
}
|
||||
|
||||
if (mpz_cmp_ui (g, end) < 0)
|
||||
{
|
||||
mpz_nextprime (g, g);
|
||||
if (mpz_cmp_ui (g, end) <= 0)
|
||||
STOP (something_wrong (g, -1));
|
||||
}
|
||||
|
||||
gmp_printf ("%Zd\n", g);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
check_Nprime (unsigned long begin, unsigned long end)
|
||||
{
|
||||
mpz_t op;
|
||||
mpz_init_set_ui (op, end);
|
||||
|
||||
for (;begin < 2; ++begin)
|
||||
{
|
||||
*(op->_mp_d) = begin;
|
||||
op->_mp_size = begin;
|
||||
TRACE(printf ("%li ", begin),1);
|
||||
mpz_nextprime (g, op);
|
||||
if (mpz_cmp_ui (g, 2) != 0)
|
||||
STOP (something_wrong (g, 2));
|
||||
}
|
||||
if (begin < 3)
|
||||
{
|
||||
*(op->_mp_d) = begin;
|
||||
TRACE(printf ("%li ", begin),1);
|
||||
mpz_nextprime (g, op);
|
||||
if (mpz_cmp_ui (g, 3) != 0)
|
||||
STOP (something_wrong (g, 3));
|
||||
begin = 3;
|
||||
}
|
||||
if (end > 4)
|
||||
{
|
||||
mp_limb_t *sieve;
|
||||
mp_size_t size;
|
||||
unsigned long start;
|
||||
unsigned long opl;
|
||||
|
||||
size = primesieve_size (end);
|
||||
|
||||
sieve = __GMP_ALLOCATE_FUNC_LIMBS (size);
|
||||
gmp_primesieve (sieve, end);
|
||||
start = MAX (begin, 5) | 1;
|
||||
opl = begin;
|
||||
LOOP_ON_SIEVE_BEGIN (prime, n_cto_bit(start),
|
||||
n_fto_bit (end), 0, sieve);
|
||||
|
||||
do {
|
||||
*(op->_mp_d) = opl;
|
||||
mpz_nextprime (g, op);
|
||||
if (mpz_cmp_ui (g, prime) != 0)
|
||||
STOP (something_wrong (g, prime));
|
||||
++opl;
|
||||
} while (opl < prime);
|
||||
|
||||
if (prime - start > 200)
|
||||
{
|
||||
start = prime;
|
||||
spinner();
|
||||
if (prime - begin > 0xfffffff)
|
||||
{
|
||||
begin = prime;
|
||||
printf ("%li (0x%lx)\n", begin, begin);
|
||||
}
|
||||
}
|
||||
|
||||
LOOP_ON_SIEVE_END;
|
||||
|
||||
__GMP_FREE_FUNC_LIMBS (sieve, size);
|
||||
}
|
||||
|
||||
if (mpz_cmp_ui (g, end) < 0)
|
||||
{
|
||||
mpz_nextprime (g, g);
|
||||
if (mpz_cmp_ui (g, end) <= 0)
|
||||
STOP (something_wrong (g, -1));
|
||||
}
|
||||
|
||||
gmp_printf ("%Zd\n", g);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
int ret, mode = 0;
|
||||
unsigned long begin = 0, end = 0;
|
||||
|
||||
for (;argc > 1;--argc,++argv)
|
||||
switch (*argv[1]) {
|
||||
case 'p':
|
||||
mode = 0;
|
||||
break;
|
||||
case 'c':
|
||||
mode = 2;
|
||||
break;
|
||||
case 'n':
|
||||
mode = 1;
|
||||
break;
|
||||
case 'N':
|
||||
mode = 3;
|
||||
break;
|
||||
default:
|
||||
begin = end;
|
||||
end = atol (argv[1]);
|
||||
}
|
||||
|
||||
if (begin >= end)
|
||||
{
|
||||
fprintf (stderr, "usage: primes [N|n|p|c] [n0] <nMax>\n");
|
||||
exit (1);
|
||||
}
|
||||
|
||||
mpz_init_set_ui (g, ULONG_MAX);
|
||||
|
||||
switch (mode) {
|
||||
case 1:
|
||||
ret = check_nprime (begin, end);
|
||||
break;
|
||||
case 3:
|
||||
ret = check_Nprime (begin, end);
|
||||
break;
|
||||
default:
|
||||
ret = check_pprime (begin, end, mode);
|
||||
}
|
||||
|
||||
mpz_clear (g);
|
||||
|
||||
if (ret == 0)
|
||||
printf ("Prime tests checked in [%lu - %lu] [0x%lx - 0x%lx].\n", begin, end, begin, end);
|
||||
return ret;
|
||||
}
|
||||
401
blender-5.2.0/extern/gmp-source/tests/devel/sqrtrem_1_2.c
vendored
Normal file
401
blender-5.2.0/extern/gmp-source/tests/devel/sqrtrem_1_2.c
vendored
Normal file
@@ -0,0 +1,401 @@
|
||||
/*
|
||||
Copyright 2017 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of the GNU MP Library test suite.
|
||||
|
||||
The GNU MP Library test suite is free software; you can redistribute it
|
||||
and/or modify it under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation; either version 3 of the License,
|
||||
or (at your option) any later version.
|
||||
|
||||
The GNU MP Library test suite is distributed in the hope that it will be
|
||||
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */
|
||||
|
||||
/* Usage:
|
||||
|
||||
./sqrtrem_1_2 x
|
||||
|
||||
Checks mpn_sqrtrem() exhaustively, starting from 0, incrementing
|
||||
the operand by a single unit, until all values handled by
|
||||
mpn_sqrtrem{1,2} are tested. SLOW.
|
||||
|
||||
./sqrtrem_1_2 s 1
|
||||
|
||||
Checks some special cases for mpn_sqrtrem(). I.e. values of the form
|
||||
2^k*i and 2^k*(i+1)-1, with k=2^n and 0<i<2^k, until all such values,
|
||||
handled by mpn_sqrtrem{1,2}, are tested.
|
||||
Currently supports only the test of values that fits in one limb.
|
||||
Less slow than the exhaustive test.
|
||||
|
||||
./sqrtrem_1_2 c
|
||||
|
||||
Checks all corner cases for mpn_sqrtrem(). I.e. values of the form
|
||||
i*i and (i+1)*(i+1)-1, for each value of i, until all such values,
|
||||
handled by mpn_sqrtrem{1,2}, are tested.
|
||||
Slightly faster than the special cases test.
|
||||
|
||||
For larger values, use
|
||||
./try mpn_sqrtrem
|
||||
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include "gmp-impl.h"
|
||||
#include "longlong.h"
|
||||
#include "tests.h"
|
||||
#define STOP(x) return (x)
|
||||
/* #define STOP(x) x */
|
||||
#define SPINNER(v) \
|
||||
do { \
|
||||
MPN_SIZEINBASE_2EXP (spinner_count, q, v, 1); \
|
||||
--spinner_count; \
|
||||
spinner(); \
|
||||
} while (0)
|
||||
|
||||
int something_wrong (mp_limb_t er, mp_limb_t ec, mp_limb_t es)
|
||||
{
|
||||
fprintf (stderr, "root = %lu , rem = {%lu , %lu}\n", (long unsigned) es,(long unsigned) ec,(long unsigned) er);
|
||||
return -1;
|
||||
}
|
||||
|
||||
int
|
||||
check_all_values (int justone, int quick)
|
||||
{
|
||||
mp_limb_t es, mer, er, s[1], r[2], q[2];
|
||||
mp_size_t x;
|
||||
unsigned bits;
|
||||
|
||||
es=1;
|
||||
if (quick) {
|
||||
printf ("Quick, skipping some... (%u)\n", GMP_NUMB_BITS - 2);
|
||||
es <<= GMP_NUMB_BITS / 2 - 1;
|
||||
}
|
||||
er=0;
|
||||
mer= es << 1;
|
||||
*q = es * es;
|
||||
printf ("All values tested, up to bits:\n");
|
||||
do {
|
||||
x = mpn_sqrtrem (s, r, q, 1);
|
||||
if (UNLIKELY (x != (er != 0)) || UNLIKELY (*s != es)
|
||||
|| UNLIKELY ((x == 1) && (er != *r)))
|
||||
STOP (something_wrong (er, 0, es));
|
||||
|
||||
if (UNLIKELY (er == mer)) {
|
||||
++es;
|
||||
if (UNLIKELY ((es & 0xff) == 0))
|
||||
SPINNER(1);
|
||||
mer +=2; /* mer = es * 2 */
|
||||
er = 0;
|
||||
} else
|
||||
++er;
|
||||
++*q;
|
||||
} while (*q != 0);
|
||||
q[1] = 1;
|
||||
SPINNER(2);
|
||||
printf ("\nValues of a single limb, tested.\n");
|
||||
if (justone) return 0;
|
||||
printf ("All values tested, up to bits:\n");
|
||||
do {
|
||||
x = mpn_sqrtrem (s, r, q, 2);
|
||||
if (UNLIKELY (x != (er != 0)) || UNLIKELY (*s != es)
|
||||
|| UNLIKELY ((x == 1) && (er != *r)))
|
||||
STOP (something_wrong (er, 0, es));
|
||||
|
||||
if (UNLIKELY (er == mer)) {
|
||||
++es;
|
||||
if (UNLIKELY ((es & 0x7f) == 0))
|
||||
SPINNER(2);
|
||||
mer +=2; /* mer = es * 2 */
|
||||
if (UNLIKELY (mer == 0))
|
||||
break;
|
||||
er = 0;
|
||||
} else
|
||||
++er;
|
||||
q[1] += (++*q == 0);
|
||||
} while (1);
|
||||
SPINNER(2);
|
||||
printf ("\nValues with at most a limb for reminder, tested.\n");
|
||||
printf ("Testing more values not supported, jet.\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
mp_limb_t
|
||||
upd (mp_limb_t *s, mp_limb_t k)
|
||||
{
|
||||
mp_limb_t _s = *s;
|
||||
|
||||
while (k > _s * 2)
|
||||
{
|
||||
k -= _s * 2 + 1;
|
||||
++_s;
|
||||
}
|
||||
*s = _s;
|
||||
return k;
|
||||
}
|
||||
|
||||
mp_limb_t
|
||||
upd1 (mp_limb_t *s, mp_limb_t k)
|
||||
{
|
||||
mp_limb_t _s = *s;
|
||||
|
||||
if (LIKELY (k < _s * 2)) return k + 1;
|
||||
*s = _s + 1;
|
||||
return k - _s * 2;
|
||||
}
|
||||
|
||||
int
|
||||
check_some_values (int justone, int quick)
|
||||
{
|
||||
mp_limb_t es, her, er, k, s[1], r[2], q[2];
|
||||
mp_size_t x;
|
||||
unsigned bits;
|
||||
|
||||
es = 1 << 1;
|
||||
if (quick) {
|
||||
es <<= GMP_NUMB_BITS / 4 - 1;
|
||||
printf ("Quick, skipping some... (%u)\n", GMP_NUMB_BITS / 2);
|
||||
}
|
||||
er = 0;
|
||||
*q = es * es;
|
||||
printf ("High-half values tested, up to bits:\n");
|
||||
do {
|
||||
k = *q - 1;
|
||||
do {
|
||||
x = mpn_sqrtrem (s, r, q, 1);
|
||||
if (UNLIKELY (x != (er != 0)) || UNLIKELY (*s != es)
|
||||
|| UNLIKELY ((x == 1) && (er != *r)))
|
||||
STOP (something_wrong (er, 0, es));
|
||||
|
||||
if (UNLIKELY ((es & 0xffff) == 0))
|
||||
SPINNER(1);
|
||||
if ((*q & k) == 0) {
|
||||
*q |= k;
|
||||
er = upd (&es, k + er);
|
||||
} else {
|
||||
++*q;
|
||||
er = upd1 (&es, er);
|
||||
}
|
||||
} while (es & k);
|
||||
} while (*q != 0);
|
||||
q[1] = 1;
|
||||
SPINNER(2);
|
||||
printf ("\nValues of a single limb, tested.\n");
|
||||
if (justone) return 0;
|
||||
if (quick) {
|
||||
es <<= GMP_NUMB_BITS / 2 - 1;
|
||||
q[1] <<= GMP_NUMB_BITS - 2;
|
||||
printf ("Quick, skipping some... (%u)\n", GMP_NUMB_BITS - 2);
|
||||
}
|
||||
printf ("High-half values tested, up to bits:\n");
|
||||
do {
|
||||
x = mpn_sqrtrem (s, r, q, 2);
|
||||
if (UNLIKELY (x != (er != 0)) || UNLIKELY (*s != es)
|
||||
|| UNLIKELY ((x == 1) && (er != *r)))
|
||||
STOP (something_wrong (er, 0, es));
|
||||
|
||||
if (*q == 0) {
|
||||
*q = GMP_NUMB_MAX;
|
||||
if (UNLIKELY ((es & 0xffff) == 0)) {
|
||||
if (UNLIKELY (es == GMP_NUMB_HIGHBIT))
|
||||
break;
|
||||
SPINNER(2);
|
||||
}
|
||||
/* er = er + GMP_NUMB_MAX - 1 - es*2 // postponed */
|
||||
++es;
|
||||
/* er = er + GMP_NUMB_MAX - 1 - 2*(es-1) =
|
||||
= er +(GMP_NUMB_MAX + 1)- 2* es = er - 2*es */
|
||||
er = upd (&es, er - 2 * es);
|
||||
} else {
|
||||
*q = 0;
|
||||
++q[1];
|
||||
er = upd1 (&es, er);
|
||||
}
|
||||
} while (1);
|
||||
SPINNER(2);
|
||||
printf ("\nValues with at most a limb for reminder, tested.\n");
|
||||
er = GMP_NUMB_MAX; her = 0;
|
||||
|
||||
printf ("High-half values tested, up to bits:\n");
|
||||
do {
|
||||
x = mpn_sqrtrem (s, r, q, 2);
|
||||
if (UNLIKELY (x != (her?2:(er != 0))) || UNLIKELY (*s != es)
|
||||
|| UNLIKELY ((x != 0) && ((er != *r) || ((x == 2) && (r[1] != 1)))))
|
||||
STOP (something_wrong (er, her, es));
|
||||
|
||||
if (*q == 0) {
|
||||
*q = GMP_NUMB_MAX;
|
||||
if (UNLIKELY ((es & 0xffff) == 0)) {
|
||||
SPINNER(2);
|
||||
}
|
||||
if (her) {
|
||||
++es;
|
||||
her = 0;
|
||||
er = er - 2 * es;
|
||||
} else {
|
||||
her = --er != GMP_NUMB_MAX;
|
||||
if (her & (er > es * 2)) {
|
||||
er -= es * 2 + 1;
|
||||
her = 0;
|
||||
++es;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
*q = 0;
|
||||
if (++q[1] == 0) break;
|
||||
if ((her == 0) | (er < es * 2)) {
|
||||
her += ++er == 0;
|
||||
} else {
|
||||
er -= es * 2;
|
||||
her = 0;
|
||||
++es;
|
||||
}
|
||||
}
|
||||
} while (1);
|
||||
printf ("| %u\nValues of at most two limbs, tested.\n", GMP_NUMB_BITS*2);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
check_corner_cases (int justone, int quick)
|
||||
{
|
||||
mp_limb_t es, er, s[1], r[2], q[2];
|
||||
mp_size_t x;
|
||||
unsigned bits;
|
||||
|
||||
es = 1;
|
||||
if (quick) {
|
||||
es <<= GMP_NUMB_BITS / 2 - 1;
|
||||
printf ("Quick, skipping some... (%u)\n", GMP_NUMB_BITS - 2);
|
||||
}
|
||||
er = 0;
|
||||
*q = es*es;
|
||||
printf ("Corner cases tested, up to bits:\n");
|
||||
do {
|
||||
x = mpn_sqrtrem (s, r, q, 1);
|
||||
if (UNLIKELY (x != (er != 0)) || UNLIKELY (*s != es)
|
||||
|| UNLIKELY ((x == 1) && (er != *r)))
|
||||
STOP (something_wrong (er, 0, es));
|
||||
|
||||
if (er != 0) {
|
||||
++es;
|
||||
if (UNLIKELY ((es & 0xffff) == 0))
|
||||
SPINNER(1);
|
||||
er = 0;
|
||||
++*q;
|
||||
} else {
|
||||
er = es * 2;
|
||||
*q += er;
|
||||
}
|
||||
} while (*q != 0);
|
||||
q[1] = 1;
|
||||
SPINNER(2);
|
||||
printf ("\nValues of a single limb, tested.\n");
|
||||
if (justone) return 0;
|
||||
if (quick) {
|
||||
es <<= GMP_NUMB_BITS / 2 - 1;
|
||||
q[1] <<= GMP_NUMB_BITS - 2;
|
||||
printf ("Quick, skipping some... (%u)\n", GMP_NUMB_BITS - 2);
|
||||
--es;
|
||||
--q[1];
|
||||
q[0] -= es*2+1;
|
||||
}
|
||||
printf ("Corner cases tested, up to bits:\n");
|
||||
do {
|
||||
x = mpn_sqrtrem (s, r, q, 2);
|
||||
if (UNLIKELY (x != (er != 0)) || UNLIKELY (*s != es)
|
||||
|| UNLIKELY ((x == 1) && (er != *r)))
|
||||
STOP (something_wrong (er, 0, es));
|
||||
|
||||
if (er != 0) {
|
||||
++es;
|
||||
if (UNLIKELY ((es & 0xff) == 0))
|
||||
SPINNER(2);
|
||||
er = 0;
|
||||
q[1] += (++*q == 0);
|
||||
if (UNLIKELY (es == GMP_NUMB_HIGHBIT))
|
||||
break;
|
||||
} else {
|
||||
er = es * 2;
|
||||
add_ssaaaa (q[1], *q, q[1], *q, 0, er);
|
||||
}
|
||||
} while (1);
|
||||
SPINNER(2);
|
||||
printf ("\nValues with at most a limb for reminder, tested.\nCorner cases tested, up to bits:\n");
|
||||
x = mpn_sqrtrem (s, r, q, 2);
|
||||
if ((*s != es) || (x != 0))
|
||||
STOP (something_wrong (0, 0, es));
|
||||
q[1] += 1;
|
||||
x = mpn_sqrtrem (s, r, q, 2);
|
||||
if ((*s != es) || (x != 2) || (*r != 0) || (r[1] != 1))
|
||||
STOP (something_wrong (0, 1, es));
|
||||
++es;
|
||||
q[1] += (++*q == 0);
|
||||
do {
|
||||
x = mpn_sqrtrem (s, r, q, 2);
|
||||
if (UNLIKELY (x != (er != 0) * 2) || UNLIKELY (*s != es)
|
||||
|| UNLIKELY ((x == 2) && ((er != *r) || (r[1] != 1))))
|
||||
STOP (something_wrong (er, er != 0, es));
|
||||
|
||||
if (er != 0) {
|
||||
++es;
|
||||
if (UNLIKELY (es == 0))
|
||||
break;
|
||||
if (UNLIKELY ((es & 0xff) == 0))
|
||||
SPINNER(2);
|
||||
er = 0;
|
||||
q[1] += (++*q == 0);
|
||||
} else {
|
||||
er = es * 2;
|
||||
add_ssaaaa (q[1], *q, q[1], *q, 1, er);
|
||||
}
|
||||
} while (1);
|
||||
printf ("| %u\nValues of at most two limbs, tested.\n", GMP_NUMB_BITS*2);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
int mode = 0;
|
||||
int justone = 0;
|
||||
int quick = 0;
|
||||
|
||||
for (;argc > 1;--argc,++argv)
|
||||
switch (*argv[1]) {
|
||||
default:
|
||||
fprintf (stderr, "usage: sqrtrem_1_2 [x|c|s] [1|2] [q]\n");
|
||||
exit (1);
|
||||
case 'x':
|
||||
mode = 0;
|
||||
break;
|
||||
case 'c':
|
||||
mode = 1;
|
||||
break;
|
||||
case 's':
|
||||
mode = 2;
|
||||
break;
|
||||
case 'q':
|
||||
quick = 1;
|
||||
break;
|
||||
case '1':
|
||||
justone = 1;
|
||||
break;
|
||||
case '2':
|
||||
justone = 0;
|
||||
}
|
||||
|
||||
switch (mode) {
|
||||
default:
|
||||
return check_all_values (justone, quick);
|
||||
case 1:
|
||||
return check_corner_cases (justone, quick);
|
||||
case 2:
|
||||
return check_some_values (justone, quick);
|
||||
}
|
||||
}
|
||||
4908
blender-5.2.0/extern/gmp-source/tests/devel/test-add_ssaaaa.c
vendored
Normal file
4908
blender-5.2.0/extern/gmp-source/tests/devel/test-add_ssaaaa.c
vendored
Normal file
File diff suppressed because it is too large
Load Diff
4908
blender-5.2.0/extern/gmp-source/tests/devel/test-sub_ddmmss.c
vendored
Normal file
4908
blender-5.2.0/extern/gmp-source/tests/devel/test-sub_ddmmss.c
vendored
Normal file
File diff suppressed because it is too large
Load Diff
3658
blender-5.2.0/extern/gmp-source/tests/devel/try.c
vendored
Normal file
3658
blender-5.2.0/extern/gmp-source/tests/devel/try.c
vendored
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user