You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(11) |
Jul
(43) |
Aug
(688) |
Sep
(96) |
Oct
(18) |
Nov
(17) |
Dec
(16) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
|
Feb
(18) |
Mar
(29) |
Apr
|
May
(23) |
Jun
(11) |
Jul
(46) |
Aug
(9) |
Sep
|
Oct
|
Nov
|
Dec
(2) |
2007 |
Jan
(2) |
Feb
|
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(19) |
2008 |
Jan
(2) |
Feb
|
Mar
(1) |
Apr
(1) |
May
(1) |
Jun
(3) |
Jul
|
Aug
(1) |
Sep
(3) |
Oct
(2) |
Nov
(2) |
Dec
(5) |
2009 |
Jan
(8) |
Feb
(3) |
Mar
(4) |
Apr
(17) |
May
|
Jun
(1) |
Jul
(1) |
Aug
(3) |
Sep
(2) |
Oct
(2) |
Nov
(12) |
Dec
(1) |
2010 |
Jan
(1) |
Feb
|
Mar
(1) |
Apr
(1) |
May
(6) |
Jun
(3) |
Jul
(2) |
Aug
|
Sep
(1) |
Oct
(2) |
Nov
|
Dec
|
2011 |
Jan
(6) |
Feb
(6) |
Mar
(1) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(8) |
Nov
(1) |
Dec
(1) |
2012 |
Jan
|
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
(9) |
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <Ba...@us...> - 2010-05-29 21:34:03
|
Revision: 391 http://ggnfs.svn.sourceforge.net/ggnfs/?rev=391&view=rev Author: Batalov Date: 2010-05-29 21:33:57 +0000 (Sat, 29 May 2010) Log Message: ----------- rudimentary test of automatic Rev reporting Modified Paths: -------------- trunk/src/lasieve4/gnfs-lasieve4e.c Modified: trunk/src/lasieve4/gnfs-lasieve4e.c =================================================================== --- trunk/src/lasieve4/gnfs-lasieve4e.c 2010-05-29 21:32:21 UTC (rev 390) +++ trunk/src/lasieve4/gnfs-lasieve4e.c 2010-05-29 21:33:57 UTC (rev 391) @@ -2935,7 +2935,7 @@ } if(verbose) { /* first rudimentary test of automatic $Rev reporting */ - fprintf(stderr, "gnfs-lasieveI4%de: L1_BITS=%d, SVN $Revision$\n", I_bits, L1_BITS); + fprintf(stderr, "gnfs-lasieve4I%de: L1_BITS=%d, SVN $Revision$\n", I_bits, L1_BITS); } #define LINE_BUF_SIZE 300 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ba...@us...> - 2010-05-29 21:32:30
|
Revision: 390 http://ggnfs.svn.sourceforge.net/ggnfs/?rev=390&view=rev Author: Batalov Date: 2010-05-29 21:32:21 +0000 (Sat, 29 May 2010) Log Message: ----------- rudimentary test of automatic Rev reporting Modified Paths: -------------- trunk/src/lasieve4/gnfs-lasieve4e.c Property Changed: ---------------- trunk/src/lasieve4/gnfs-lasieve4e.c Modified: trunk/src/lasieve4/gnfs-lasieve4e.c =================================================================== --- trunk/src/lasieve4/gnfs-lasieve4e.c 2010-05-27 13:22:00 UTC (rev 389) +++ trunk/src/lasieve4/gnfs-lasieve4e.c 2010-05-29 21:32:21 UTC (rev 390) @@ -2934,6 +2934,10 @@ } } + if(verbose) { /* first rudimentary test of automatic $Rev reporting */ + fprintf(stderr, "gnfs-lasieveI4%de: L1_BITS=%d, SVN $Revision$\n", I_bits, L1_BITS); + } + #define LINE_BUF_SIZE 300 if (g_resume != 0) { Property changes on: trunk/src/lasieve4/gnfs-lasieve4e.c ___________________________________________________________________ Added: svn:keywords + Date Rev This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <brg...@us...> - 2010-05-27 13:22:06
|
Revision: 389 http://ggnfs.svn.sourceforge.net/ggnfs/?rev=389&view=rev Author: brgladman Date: 2010-05-27 13:22:00 +0000 (Thu, 27 May 2010) Log Message: ----------- Modified Paths: -------------- trunk/build.vc10/vsyasm.props Modified: trunk/build.vc10/vsyasm.props =================================================================== --- trunk/build.vc10/vsyasm.props 2010-05-27 08:45:55 UTC (rev 388) +++ trunk/build.vc10/vsyasm.props 2010-05-27 13:22:00 UTC (rev 389) @@ -9,13 +9,16 @@ <YASMDependsOn Condition="'$(ConfigurationType)' != 'Makefile'">_SelectedFiles;$(YASMDependsOn)</YASMDependsOn> </PropertyGroup> + <PropertyGroup> + <YasmPath Condition= "'$(YASMPATH)' == ''">C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\</YasmPath> + </PropertyGroup> <ItemDefinitionGroup> <YASM> <Debug>False</Debug> <ObjectFile>$(IntDir)</ObjectFile> <PreProc>0</PreProc> <Parser>0</Parser> - <CommandLineTemplate>"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\vsyasm" -Xvc -f $(Platform) [AllOptions] [AdditionalOptions] [Inputs]</CommandLineTemplate> + <CommandLineTemplate>"$(YasmPath)"vsyasm.exe -Xvc -f $(Platform) [AllOptions] [AdditionalOptions] [Inputs]</CommandLineTemplate> <Outputs>%(ObjectFile)</Outputs> <ExecutionDescription>Assembling %(Filename)%(Extension)</ExecutionDescription> <ShowOnlyRuleProperties>false</ShowOnlyRuleProperties> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <brg...@us...> - 2010-05-27 08:46:04
|
Revision: 388 http://ggnfs.svn.sourceforge.net/ggnfs/?rev=388&view=rev Author: brgladman Date: 2010-05-27 08:45:55 +0000 (Thu, 27 May 2010) Log Message: ----------- adjust YASM rule files Modified Paths: -------------- trunk/build.vc10/vsyasm.xml Modified: trunk/build.vc10/vsyasm.xml =================================================================== --- trunk/build.vc10/vsyasm.xml 2010-05-24 09:23:25 UTC (rev 387) +++ trunk/build.vc10/vsyasm.xml 2010-05-27 08:45:55 UTC (rev 388) @@ -72,7 +72,6 @@ HelpContext="0" DisplayName="Include Paths" Description="Set the paths for any additional include files" - Separator=";" Switch="-i "[value]"" /> <StringListProperty @@ -82,7 +81,6 @@ HelpContext="0" DisplayName="Defined Symbols" Description="Specify pre-defined symbols ('symbol' or 'symbol = value') " - Separator=";" Switch="-d "[value]"" /> <StringListProperty @@ -92,7 +90,6 @@ HelpContext="0" DisplayName="Remove Symbols" Description="Remove pre-defined symbols " - Separator=";" Switch="-u "[value]"" /> <StringProperty This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <brg...@us...> - 2010-05-24 09:23:32
|
Revision: 387 http://ggnfs.svn.sourceforge.net/ggnfs/?rev=387&view=rev Author: brgladman Date: 2010-05-24 09:23:25 +0000 (Mon, 24 May 2010) Log Message: ----------- Add GGNFS build files for Visual Studio 2010 Added Paths: ----------- trunk/build.vc10/ trunk/build.vc10/file_copy.bat trunk/build.vc10/fnmatch.c trunk/build.vc10/fnmatch.h trunk/build.vc10/getline.c trunk/build.vc10/getline.h trunk/build.vc10/getopt.c trunk/build.vc10/getopt.h trunk/build.vc10/ggnfs.sln trunk/build.vc10/ggnfslib/ trunk/build.vc10/ggnfslib/ggnfslib.vcxproj trunk/build.vc10/ggnfslib/ggnfslib.vcxproj.filters trunk/build.vc10/gmp.h trunk/build.vc10/gnfs-lasieve4I11e/ trunk/build.vc10/gnfs-lasieve4I11e/gnfs-lasieve4I11e.vcxproj trunk/build.vc10/gnfs-lasieve4I11e/gnfs-lasieve4I11e.vcxproj.filters trunk/build.vc10/gnfs-lasieve4I11e/gnfs-lasieve4I11e.vcxproj.user trunk/build.vc10/gnfs-lasieve4I12e/ trunk/build.vc10/gnfs-lasieve4I12e/gnfs-lasieve4I12e.vcxproj trunk/build.vc10/gnfs-lasieve4I12e/gnfs-lasieve4I12e.vcxproj.filters trunk/build.vc10/gnfs-lasieve4I13e/ trunk/build.vc10/gnfs-lasieve4I13e/gnfs-lasieve4I13e.vcxproj trunk/build.vc10/gnfs-lasieve4I13e/gnfs-lasieve4I13e.vcxproj.filters trunk/build.vc10/gnfs-lasieve4I14e/ trunk/build.vc10/gnfs-lasieve4I14e/gnfs-lasieve4I14e.vcxproj trunk/build.vc10/gnfs-lasieve4I14e/gnfs-lasieve4I14e.vcxproj.filters trunk/build.vc10/gnfs-lasieve4I15e/ trunk/build.vc10/gnfs-lasieve4I15e/gnfs-lasieve4I15e.vcxproj trunk/build.vc10/gnfs-lasieve4I15e/gnfs-lasieve4I15e.vcxproj.filters trunk/build.vc10/gnfs-lasieve4I16e/ trunk/build.vc10/gnfs-lasieve4I16e/gnfs-lasieve4I16e.vcxproj trunk/build.vc10/gnfs-lasieve4I16e/gnfs-lasieve4I16e.vcxproj.filters trunk/build.vc10/makefb/ trunk/build.vc10/makefb/makefb.vcxproj trunk/build.vc10/makefb/makefb.vcxproj.filters trunk/build.vc10/matbuild/ trunk/build.vc10/matbuild/matbuild.vcxproj trunk/build.vc10/matbuild/matbuild.vcxproj.filters trunk/build.vc10/matbuild-tpie/ trunk/build.vc10/matbuild-tpie/matbuild-tpie.vcxproj trunk/build.vc10/matbuild-tpie/matbuild-tpie.vcxproj.filters trunk/build.vc10/matprune/ trunk/build.vc10/matprune/matprune.vcxproj trunk/build.vc10/matprune/matprune.vcxproj.filters trunk/build.vc10/matsolve/ trunk/build.vc10/matsolve/matsolve.vcxproj trunk/build.vc10/matsolve/matsolve.vcxproj.filters trunk/build.vc10/modinv1002.c trunk/build.vc10/mp_lib.props trunk/build.vc10/mp_lib.vsprops trunk/build.vc10/mulmod32.asm trunk/build.vc10/pol51m0b/ trunk/build.vc10/pol51m0b/pol51m0b.vcxproj trunk/build.vc10/pol51m0b/pol51m0b.vcxproj.filters trunk/build.vc10/pol51m0bx/ trunk/build.vc10/pol51m0bx/pol51m0bx.vcxproj trunk/build.vc10/pol51m0bx/pol51m0bx.vcxproj.filters trunk/build.vc10/pol51m0n/ trunk/build.vc10/pol51m0n/pol51m0n.vcxproj trunk/build.vc10/pol51m0n/pol51m0n.vcxproj.filters trunk/build.vc10/pol51opt/ trunk/build.vc10/pol51opt/pol51opt.vcxproj trunk/build.vc10/pol51opt/pol51opt.vcxproj.filters trunk/build.vc10/pol51optx/ trunk/build.vc10/pol51optx/pol51optx.vcxproj trunk/build.vc10/pol51optx/pol51optx.vcxproj.filters trunk/build.vc10/polyselect/ trunk/build.vc10/polyselect/polyselect.vcxproj trunk/build.vc10/polyselect/polyselect.vcxproj.filters trunk/build.vc10/procrels/ trunk/build.vc10/procrels/procrels.vcxproj trunk/build.vc10/procrels/procrels.vcxproj.filters trunk/build.vc10/rint.c trunk/build.vc10/rint.h trunk/build.vc10/run.bat trunk/build.vc10/sieve/ trunk/build.vc10/sieve/sieve.vcxproj trunk/build.vc10/sieve/sieve.vcxproj.filters trunk/build.vc10/sqrt/ trunk/build.vc10/sqrt/sqrt.vcxproj trunk/build.vc10/sqrt/sqrt.vcxproj.filters trunk/build.vc10/unistd.h trunk/build.vc10/vsyasm.props trunk/build.vc10/vsyasm.targets trunk/build.vc10/vsyasm.xml Added: trunk/build.vc10/file_copy.bat =================================================================== --- trunk/build.vc10/file_copy.bat (rev 0) +++ trunk/build.vc10/file_copy.bat 2010-05-24 09:23:25 UTC (rev 387) @@ -0,0 +1,8 @@ +if not exist %1 goto exit +if not exist %2 goto copy +fc %1 %2 > nul +if not %errorlevel 1 goto exit +:copy +echo copying %1 to %2 +copy %1 %2 +:exit Added: trunk/build.vc10/fnmatch.c =================================================================== --- trunk/build.vc10/fnmatch.c (rev 0) +++ trunk/build.vc10/fnmatch.c 2010-05-24 09:23:25 UTC (rev 387) @@ -0,0 +1,209 @@ +/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. + +NOTE: The canonical source of this file is maintained with the GNU C Library. +Bugs can be reported to bug...@pr.... + +This program 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 2, or (at your option) any +later version. + +This program 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 this program; if not, write to the Free Software +Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ + +#ifdef HAVE_CONFIG_H +#if defined (CONFIG_BROKETS) +/* We use <config.h> instead of "config.h" so that a compilation + using -I. -I$srcdir will use ./config.h rather than $srcdir/config.h + (which it would do because it found this file in $srcdir). */ +#include <config.h> +#else +#include "config.h" +#endif +#endif + +#include <errno.h> +#include <fnmatch.h> +#include <ctype.h> + + +/* Comment out all this code if we are using the GNU C Library, and are not + actually compiling the library itself. This code is part of the GNU C + Library, but also included in many other GNU distributions. Compiling + and linking in this code is a waste when using the GNU C library + (especially if it is a shared library). Rather than having every GNU + program understand `configure --with-gnu-libc' and omit the object files, + it is simpler to just do this in the source for each such file. */ + +#if defined (_LIBC) || !defined (__GNU_LIBRARY__) + + +#if !defined(__GNU_LIBRARY__) && !defined(STDC_HEADERS) +extern int errno; +#endif + +/* Match STRING against the filename pattern PATTERN, returning zero if + it matches, nonzero if not. */ +int +fnmatch (pattern, string, flags) + const char *pattern; + const char *string; + int flags; +{ + register const char *p = pattern, *n = string; + register char c; + +/* Note that this evalutes C many times. */ +#define FOLD(c) ((flags & FNM_CASEFOLD) && isupper (c) ? tolower (c) : (c)) + + while ((c = *p++) != '\0') + { + c = FOLD (c); + + switch (c) + { + case '?': + if (*n == '\0') + return FNM_NOMATCH; + else if ((flags & FNM_FILE_NAME) && *n == '/') + return FNM_NOMATCH; + else if ((flags & FNM_PERIOD) && *n == '.' && + (n == string || ((flags & FNM_FILE_NAME) && n[-1] == '/'))) + return FNM_NOMATCH; + break; + + case '\\': + if (!(flags & FNM_NOESCAPE)) + { + c = *p++; + c = FOLD (c); + } + if (FOLD (*n) != c) + return FNM_NOMATCH; + break; + + case '*': + if ((flags & FNM_PERIOD) && *n == '.' && + (n == string || ((flags & FNM_FILE_NAME) && n[-1] == '/'))) + return FNM_NOMATCH; + + for (c = *p++; c == '?' || c == '*'; c = *p++, ++n) + if (((flags & FNM_FILE_NAME) && *n == '/') || + (c == '?' && *n == '\0')) + return FNM_NOMATCH; + + if (c == '\0') + return 0; + + { + char c1 = (!(flags & FNM_NOESCAPE) && c == '\\') ? *p : c; + c1 = FOLD (c1); + for (--p; *n != '\0'; ++n) + if ((c == '[' || FOLD (*n) == c1) && + fnmatch (p, n, flags & ~FNM_PERIOD) == 0) + return 0; + return FNM_NOMATCH; + } + + case '[': + { + /* Nonzero if the sense of the character class is inverted. */ + register int not; + + if (*n == '\0') + return FNM_NOMATCH; + + if ((flags & FNM_PERIOD) && *n == '.' && + (n == string || ((flags & FNM_FILE_NAME) && n[-1] == '/'))) + return FNM_NOMATCH; + + not = (*p == '!' || *p == '^'); + if (not) + ++p; + + c = *p++; + for (;;) + { + register char cstart = c, cend = c; + + if (!(flags & FNM_NOESCAPE) && c == '\\') + cstart = cend = *p++; + + cstart = cend = FOLD (cstart); + + if (c == '\0') + /* [ (unterminated) loses. */ + return FNM_NOMATCH; + + c = *p++; + c = FOLD (c); + + if ((flags & FNM_FILE_NAME) && c == '/') + /* [/] can never match. */ + return FNM_NOMATCH; + + if (c == '-' && *p != ']') + { + cend = *p++; + if (!(flags & FNM_NOESCAPE) && cend == '\\') + cend = *p++; + if (cend == '\0') + return FNM_NOMATCH; + cend = FOLD (cend); + + c = *p++; + } + + if (FOLD (*n) >= cstart && FOLD (*n) <= cend) + goto matched; + + if (c == ']') + break; + } + if (!not) + return FNM_NOMATCH; + break; + + matched:; + /* Skip the rest of the [...] that already matched. */ + while (c != ']') + { + if (c == '\0') + /* [... (unterminated) loses. */ + return FNM_NOMATCH; + + c = *p++; + if (!(flags & FNM_NOESCAPE) && c == '\\') + /* XXX 1003.2d11 is unclear if this is right. */ + ++p; + } + if (not) + return FNM_NOMATCH; + } + break; + + default: + if (c != FOLD (*n)) + return FNM_NOMATCH; + } + + ++n; + } + + if (*n == '\0') + return 0; + + if ((flags & FNM_LEADING_DIR) && *n == '/') + /* The FNM_LEADING_DIR flag says that "foo*" matches "foobar/frobozz". */ + return 0; + + return FNM_NOMATCH; +} + +#endif /* _LIBC or not __GNU_LIBRARY__. */ Added: trunk/build.vc10/fnmatch.h =================================================================== --- trunk/build.vc10/fnmatch.h (rev 0) +++ trunk/build.vc10/fnmatch.h 2010-05-24 09:23:25 UTC (rev 387) @@ -0,0 +1,69 @@ +/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. + +NOTE: The canonical source of this file is maintained with the GNU C Library. +Bugs can be reported to bug...@pr.... + +This program 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 2, or (at your option) any +later version. + +This program 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 this program; if not, write to the Free Software +Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ + +#ifndef _FNMATCH_H + +#define _FNMATCH_H 1 + +#ifdef __cplusplus +extern "C" { +#endif + +#if defined (__cplusplus) || (defined (__STDC__) && __STDC__) +#undef __P +#define __P(args) args +#else /* Not C++ or ANSI C. */ +#undef __P +#define __P(args) () +/* We can get away without defining `const' here only because in this file + it is used only inside the prototype for `fnmatch', which is elided in + non-ANSI C where `const' is problematical. */ +#endif /* C++ or ANSI C. */ + + +/* We #undef these before defining them because some losing systems + (HP-UX A.08.07 for example) define these in <unistd.h>. */ +#undef FNM_PATHNAME +#undef FNM_NOESCAPE +#undef FNM_PERIOD + +/* Bits set in the FLAGS argument to `fnmatch'. */ +#define FNM_PATHNAME (1 << 0) /* No wildcard can ever match `/'. */ +#define FNM_NOESCAPE (1 << 1) /* Backslashes don't quote special chars. */ +#define FNM_PERIOD (1 << 2) /* Leading `.' is matched only explicitly. */ + +#if !defined (_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 2 || defined (_GNU_SOURCE) +#define FNM_FILE_NAME FNM_PATHNAME /* Preferred GNU name. */ +#define FNM_LEADING_DIR (1 << 3) /* Ignore `/...' after a match. */ +#define FNM_CASEFOLD (1 << 4) /* Compare without regard to case. */ +#endif + +/* Value returned by `fnmatch' if STRING does not match PATTERN. */ +#define FNM_NOMATCH 1 + +/* Match STRING against the filename pattern PATTERN, + returning zero if it matches, FNM_NOMATCH if not. */ +extern int fnmatch __P ((const char *__pattern, const char *__string, + int __flags)); + +#ifdef __cplusplus +} +#endif + +#endif /* fnmatch.h */ Added: trunk/build.vc10/getline.c =================================================================== --- trunk/build.vc10/getline.c (rev 0) +++ trunk/build.vc10/getline.c 2010-05-24 09:23:25 UTC (rev 387) @@ -0,0 +1,159 @@ +/* +getline.c -- Replacement for GNU C library function getline + +Copyright (C) 1993 Free Software Foundation, Inc. + +This program 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 2 of the +License, or (at your option) any later version. + +This program 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. */ + +/* Written by Jan Brittenson, bs...@gn.... */ + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#include <sys/types.h> +#include <stdio.h> +#include <assert.h> +#include <errno.h> +#include "getline.h" + +#if STDC_HEADERS +#include <stdlib.h> +#else +char *malloc (), *realloc (); +#endif + +/* Always add at least this many bytes when extending the buffer. */ +#define MIN_CHUNK 64 + +/* Read up to (and including) a TERMINATOR from STREAM into *LINEPTR + + OFFSET (and null-terminate it). If LIMIT is non-negative, then + read no more than LIMIT chars. + + *LINEPTR is a pointer returned from malloc (or NULL), pointing to + *N characters of space. It is realloc'd as necessary. + + Return the number of characters read (not including the null + terminator), or -1 on error or EOF. On a -1 return, the caller + should check feof(), if not then errno has been set to indicate the + error. */ + +int getstr (char **lineptr, size_t *n, FILE *stream, int terminator, int offset, int limit) +{ + int nchars_avail; /* Allocated but unused chars in *LINEPTR. */ + char *read_pos; /* Where we're reading into *LINEPTR. */ + int ret; + + if (!lineptr || !n || !stream) + { + errno = EINVAL; + return -1; + } + + if (!*lineptr) + { + *n = MIN_CHUNK; + *lineptr = malloc (*n); + if (!*lineptr) + { + errno = ENOMEM; + return -1; + } + *lineptr[0] = '\0'; + } + + nchars_avail = *n - offset; + read_pos = *lineptr + offset; + + for (;;) + { + int save_errno; + register int c; + + if (limit == 0) + break; + else + { + c = getc (stream); + + /* If limit is negative, then we shouldn't pay attention to + it, so decrement only if positive. */ + if (limit > 0) + limit--; + } + + save_errno = errno; + + /* We always want at least one char left in the buffer, since we + always (unless we get an error while reading the first char) + NUL-terminate the line buffer. */ + + assert((*lineptr + *n) == (read_pos + nchars_avail)); + if (nchars_avail < 2) + { + if (*n > MIN_CHUNK) + *n *= 2; + else + *n += MIN_CHUNK; + + nchars_avail = *n + *lineptr - read_pos; + *lineptr = realloc (*lineptr, *n); + if (!*lineptr) + { + errno = ENOMEM; + return -1; + } + read_pos = *n - nchars_avail + *lineptr; + assert((*lineptr + *n) == (read_pos + nchars_avail)); + } + + if (ferror (stream)) + { + /* Might like to return partial line, but there is no + place for us to store errno. And we don't want to just + lose errno. */ + errno = save_errno; + return -1; + } + + if (c == EOF) + { + /* Return partial line, if any. */ + if (read_pos == *lineptr) + return -1; + else + break; + } + + *read_pos++ = c; + nchars_avail--; + + if (c == terminator) + /* Return the line. */ + break; + } + + /* Done - NUL terminate and return the number of chars read. */ + *read_pos = '\0'; + + ret = read_pos - (*lineptr + offset); + return ret; +} + +int getline (char **lineptr, size_t *n, FILE *stream) +{ + return getstr (lineptr, n, stream, '\n', 0, GETLINE_NO_LIMIT); +} + +int getline_safe (char **lineptr, size_t *n, FILE *stream, int limit) +{ + return getstr (lineptr, n, stream, '\n', 0, limit); +} Added: trunk/build.vc10/getline.h =================================================================== --- trunk/build.vc10/getline.h (rev 0) +++ trunk/build.vc10/getline.h 2010-05-24 09:23:25 UTC (rev 387) @@ -0,0 +1,25 @@ + +#ifndef _getline_h_ +#define _getline_h_ 1 + +#include <stdio.h> + +#if defined (__GNUC__) || (defined (__STDC__) && __STDC__) +#define __PROTO(args) args +#else +#define __PROTO(args) () +#endif /* GCC. */ + +#define GETLINE_NO_LIMIT -1 + +int + getline __PROTO ((char **_lineptr, size_t *_n, FILE *_stream)); +int + getline_safe __PROTO ((char **_lineptr, size_t *_n, FILE *_stream, + int limit)); +int + getstr __PROTO ((char **_lineptr, size_t *_n, FILE *_stream, + int _terminator, int _offset, int limit)); + +#endif /* _getline_h_ */ + Added: trunk/build.vc10/getopt.c =================================================================== --- trunk/build.vc10/getopt.c (rev 0) +++ trunk/build.vc10/getopt.c 2010-05-24 09:23:25 UTC (rev 387) @@ -0,0 +1,1281 @@ +/* Getopt for GNU. + NOTE: getopt is now part of the C library, so if you don't know what + "Keep this file name-space clean" means, talk to dr...@gn... + before changing it! + Copyright (C) 1987,88,89,90,91,92,93,94,95,96,98,99,2000,2001,2002 + Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +/* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>. + Ditto for AIX 3.2 and <stdlib.h>. */ + +#define HAVE_STRING_H 1 + +#ifndef _NO_PROTO +# define _NO_PROTO +#endif + +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif + +#if !defined __STDC__ || !__STDC__ +/* This is a separate conditional since some stdc systems + reject `defined (const)'. */ +# ifndef const +# define const +# endif +#endif + +#include <stdio.h> + +/* Comment out all this code if we are using the GNU C Library, and are not + actually compiling the library itself. This code is part of the GNU C + Library, but also included in many other GNU distributions. Compiling + and linking in this code is a waste when using the GNU C library + (especially if it is a shared library). Rather than having every GNU + program understand `configure --with-gnu-libc' and omit the object files, + it is simpler to just do this in the source for each such file. */ + +#define GETOPT_INTERFACE_VERSION 2 +#if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2 +# include <gnu-versions.h> +# if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION +# define ELIDE_CODE +# endif +#endif + +#ifndef ELIDE_CODE + + +/* This needs to come after some library #include + to get __GNU_LIBRARY__ defined. */ +#ifdef __GNU_LIBRARY__ +/* Don't include stdlib.h for non-GNU C libraries because some of them + contain conflicting prototypes for getopt. */ +# include <stdlib.h> +# include <unistd.h> +#endif /* GNU C library. */ + +#ifdef VMS +# include <unixlib.h> +# if HAVE_STRING_H - 0 +# include <string.h> +# endif +#endif + +#ifndef _ +/* This is for other GNU distributions with internationalized messages. */ +# if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC +# include <libintl.h> +# ifndef _ +# define _(msgid) gettext (msgid) +# endif +# else +# define _(msgid) (msgid) +# endif +# if defined _LIBC && defined USE_IN_LIBIO +# include <wchar.h> +# endif +#endif + +#ifndef attribute_hidden +# define attribute_hidden +#endif + +/* This version of `getopt' appears to the caller like standard Unix `getopt' + but it behaves differently for the user, since it allows the user + to intersperse the options with the other arguments. + + As `getopt' works, it permutes the elements of ARGV so that, + when it is done, all the options precede everything else. Thus + all application programs are extended to handle flexible argument order. + + Setting the environment variable POSIXLY_CORRECT disables permutation. + Then the behavior is completely standard. + + GNU application programs can use a third alternative mode in which + they can distinguish the relative order of options and other arguments. */ + +#include "getopt.h" + +/* For communication from `getopt' to the caller. + When `getopt' finds an option that takes an argument, + the argument value is returned here. + Also, when `ordering' is RETURN_IN_ORDER, + each non-option ARGV-element is returned here. */ + +char *optarg; + +/* Index in ARGV of the next element to be scanned. + This is used for communication to and from the caller + and for communication between successive calls to `getopt'. + + On entry to `getopt', zero means this is the first call; initialize. + + When `getopt' returns -1, this is the index of the first of the + non-option elements that the caller should itself scan. + + Otherwise, `optind' communicates from one call to the next + how much of ARGV has been scanned so far. */ + +/* 1003.2 says this must be 1 before any call. */ +int optind = 1; + +/* Formerly, initialization of getopt depended on optind==0, which + causes problems with re-calling getopt as programs generally don't + know that. */ + +int __getopt_initialized attribute_hidden; + +/* The next char to be scanned in the option-element + in which the last option character we returned was found. + This allows us to pick up the scan where we left off. + + If this is zero, or a null string, it means resume the scan + by advancing to the next ARGV-element. */ + +static char *nextchar; + +/* Callers store zero here to inhibit the error message + for unrecognized options. */ + +int opterr = 1; + +/* Set to an option character which was unrecognized. + This must be initialized on some systems to avoid linking in the + system's own getopt implementation. */ + +int optopt = '?'; + +/* Describe how to deal with options that follow non-option ARGV-elements. + + If the caller did not specify anything, + the default is REQUIRE_ORDER if the environment variable + POSIXLY_CORRECT is defined, PERMUTE otherwise. + + REQUIRE_ORDER means don't recognize them as options; + stop option processing when the first non-option is seen. + This is what Unix does. + This mode of operation is selected by either setting the environment + variable POSIXLY_CORRECT, or using `+' as the first character + of the list of option characters. + + PERMUTE is the default. We permute the contents of ARGV as we scan, + so that eventually all the non-options are at the end. This allows options + to be given in any order, even with programs that were not written to + expect this. + + RETURN_IN_ORDER is an option available to programs that were written + to expect options and other ARGV-elements in any order and that care about + the ordering of the two. We describe each non-option ARGV-element + as if it were the argument of an option with character code 1. + Using `-' as the first character of the list of option characters + selects this mode of operation. + + The special argument `--' forces an end of option-scanning regardless + of the value of `ordering'. In the case of RETURN_IN_ORDER, only + `--' can cause `getopt' to return -1 with `optind' != ARGC. */ + +static enum +{ + REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER +} ordering; + +/* Value of POSIXLY_CORRECT environment variable. */ +static char *posixly_correct; + +#ifdef __GNU_LIBRARY__ +/* We want to avoid inclusion of string.h with non-GNU libraries + because there are many ways it can cause trouble. + On some systems, it contains special magic macros that don't work + in GCC. */ +# include <string.h> +# define my_index strchr +#else + +# if HAVE_STRING_H +# include <string.h> +# else +# include <strings.h> +# endif + +/* Avoid depending on library functions or files + whose names are inconsistent. */ + +#ifndef getenv +extern char *getenv (); +#endif + +static char * +my_index (str, chr) + const char *str; + int chr; +{ + while (*str) + { + if (*str == chr) + return (char *) str; + str++; + } + return 0; +} + +/* If using GCC, we can safely declare strlen this way. + If not using GCC, it is ok not to declare it. */ +#ifdef __GNUC__ +/* Note that Motorola Delta 68k R3V7 comes with GCC but not stddef.h. + That was relevant to code that was here before. */ +# if (!defined __STDC__ || !__STDC__) && !defined strlen +/* gcc with -traditional declares the built-in strlen to return int, + and has done so at least since version 2.4.5. -- rms. */ +extern int strlen (const char *); +# endif /* not __STDC__ */ +#endif /* __GNUC__ */ + +#endif /* not __GNU_LIBRARY__ */ + +/* Handle permutation of arguments. */ + +/* Describe the part of ARGV that contains non-options that have + been skipped. `first_nonopt' is the index in ARGV of the first of them; + `last_nonopt' is the index after the last of them. */ + +static int first_nonopt; +static int last_nonopt; + +#ifdef _LIBC +/* Stored original parameters. + XXX This is no good solution. We should rather copy the args so + that we can compare them later. But we must not use malloc(3). */ +extern int __libc_argc; +extern char **__libc_argv; + +/* Bash 2.0 gives us an environment variable containing flags + indicating ARGV elements that should not be considered arguments. */ + +# ifdef USE_NONOPTION_FLAGS +/* Defined in getopt_init.c */ +extern char *__getopt_nonoption_flags; + +static int nonoption_flags_max_len; +static int nonoption_flags_len; +# endif + +# ifdef USE_NONOPTION_FLAGS +# define SWAP_FLAGS(ch1, ch2) \ + if (nonoption_flags_len > 0) \ + { \ + char __tmp = __getopt_nonoption_flags[ch1]; \ + __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \ + __getopt_nonoption_flags[ch2] = __tmp; \ + } +# else +# define SWAP_FLAGS(ch1, ch2) +# endif +#else /* !_LIBC */ +# define SWAP_FLAGS(ch1, ch2) +#endif /* _LIBC */ + +/* Exchange two adjacent subsequences of ARGV. + One subsequence is elements [first_nonopt,last_nonopt) + which contains all the non-options that have been skipped so far. + The other is elements [last_nonopt,optind), which contains all + the options processed since those non-options were skipped. + + `first_nonopt' and `last_nonopt' are relocated so that they describe + the new indices of the non-options in ARGV after they are moved. */ + +#if defined __STDC__ && __STDC__ +static void exchange (char **); +#endif + +static void +exchange (argv) + char **argv; +{ + int bottom = first_nonopt; + int middle = last_nonopt; + int top = optind; + char *tem; + + /* Exchange the shorter segment with the far end of the longer segment. + That puts the shorter segment into the right place. + It leaves the longer segment in the right place overall, + but it consists of two parts that need to be swapped next. */ + +#if defined _LIBC && defined USE_NONOPTION_FLAGS + /* First make sure the handling of the `__getopt_nonoption_flags' + string can work normally. Our top argument must be in the range + of the string. */ + if (nonoption_flags_len > 0 && top >= nonoption_flags_max_len) + { + /* We must extend the array. The user plays games with us and + presents new arguments. */ + char *new_str = malloc (top + 1); + if (new_str == NULL) + nonoption_flags_len = nonoption_flags_max_len = 0; + else + { + memset (__mempcpy (new_str, __getopt_nonoption_flags, + nonoption_flags_max_len), + '\0', top + 1 - nonoption_flags_max_len); + nonoption_flags_max_len = top + 1; + __getopt_nonoption_flags = new_str; + } + } +#endif + + while (top > middle && middle > bottom) + { + if (top - middle > middle - bottom) + { + /* Bottom segment is the short one. */ + int len = middle - bottom; + register int i; + + /* Swap it with the top part of the top segment. */ + for (i = 0; i < len; i++) + { + tem = argv[bottom + i]; + argv[bottom + i] = argv[top - (middle - bottom) + i]; + argv[top - (middle - bottom) + i] = tem; + SWAP_FLAGS (bottom + i, top - (middle - bottom) + i); + } + /* Exclude the moved bottom segment from further swapping. */ + top -= len; + } + else + { + /* Top segment is the short one. */ + int len = top - middle; + register int i; + + /* Swap it with the bottom part of the bottom segment. */ + for (i = 0; i < len; i++) + { + tem = argv[bottom + i]; + argv[bottom + i] = argv[middle + i]; + argv[middle + i] = tem; + SWAP_FLAGS (bottom + i, middle + i); + } + /* Exclude the moved top segment from further swapping. */ + bottom += len; + } + } + + /* Update records for the slots the non-options now occupy. */ + + first_nonopt += (optind - last_nonopt); + last_nonopt = optind; +} + +/* Initialize the internal data when the first call is made. */ + +#if defined __STDC__ && __STDC__ +static const char *_getopt_initialize (int, char *const *, const char *); +#endif +static const char * +_getopt_initialize (argc, argv, optstring) + int argc; + char *const *argv; + const char *optstring; +{ + /* Start processing options with ARGV-element 1 (since ARGV-element 0 + is the program name); the sequence of previously skipped + non-option ARGV-elements is empty. */ + + first_nonopt = last_nonopt = optind; + + nextchar = NULL; + + posixly_correct = getenv ("POSIXLY_CORRECT"); + + /* Determine how to handle the ordering of options and nonoptions. */ + + if (optstring[0] == '-') + { + ordering = RETURN_IN_ORDER; + ++optstring; + } + else if (optstring[0] == '+') + { + ordering = REQUIRE_ORDER; + ++optstring; + } + else if (posixly_correct != NULL) + ordering = REQUIRE_ORDER; + else + ordering = PERMUTE; + +#if defined _LIBC && defined USE_NONOPTION_FLAGS + if (posixly_correct == NULL + && argc == __libc_argc && argv == __libc_argv) + { + if (nonoption_flags_max_len == 0) + { + if (__getopt_nonoption_flags == NULL + || __getopt_nonoption_flags[0] == '\0') + nonoption_flags_max_len = -1; + else + { + const char *orig_str = __getopt_nonoption_flags; + int len = nonoption_flags_max_len = strlen (orig_str); + if (nonoption_flags_max_len < argc) + nonoption_flags_max_len = argc; + __getopt_nonoption_flags = + (char *) malloc (nonoption_flags_max_len); + if (__getopt_nonoption_flags == NULL) + nonoption_flags_max_len = -1; + else + memset (__mempcpy (__getopt_nonoption_flags, orig_str, len), + '\0', nonoption_flags_max_len - len); + } + } + nonoption_flags_len = nonoption_flags_max_len; + } + else + nonoption_flags_len = 0; +#endif + + return optstring; +} + +/* Scan elements of ARGV (whose length is ARGC) for option characters + given in OPTSTRING. + + If an element of ARGV starts with '-', and is not exactly "-" or "--", + then it is an option element. The characters of this element + (aside from the initial '-') are option characters. If `getopt' + is called repeatedly, it returns successively each of the option characters + from each of the option elements. + + If `getopt' finds another option character, it returns that character, + updating `optind' and `nextchar' so that the next call to `getopt' can + resume the scan with the following option character or ARGV-element. + + If there are no more option characters, `getopt' returns -1. + Then `optind' is the index in ARGV of the first ARGV-element + that is not an option. (The ARGV-elements have been permuted + so that those that are not options now come last.) + + OPTSTRING is a string containing the legitimate option characters. + If an option character is seen that is not listed in OPTSTRING, + return '?' after printing an error message. If you set `opterr' to + zero, the error message is suppressed but we still return '?'. + + If a char in OPTSTRING is followed by a colon, that means it wants an arg, + so the following text in the same ARGV-element, or the text of the following + ARGV-element, is returned in `optarg'. Two colons mean an option that + wants an optional arg; if there is text in the current ARGV-element, + it is returned in `optarg', otherwise `optarg' is set to zero. + + If OPTSTRING starts with `-' or `+', it requests different methods of + handling the non-option ARGV-elements. + See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above. + + Long-named options begin with `--' instead of `-'. + Their names may be abbreviated as long as the abbreviation is unique + or is an exact match for some defined option. If they have an + argument, it follows the option name in the same ARGV-element, separated + from the option name by a `=', or else the in next ARGV-element. + When `getopt' finds a long-named option, it returns 0 if that option's + `flag' field is nonzero, the value of the option's `val' field + if the `flag' field is zero. + + The elements of ARGV aren't really const, because we permute them. + But we pretend they're const in the prototype to be compatible + with other systems. + + LONGOPTS is a vector of `struct option' terminated by an + element containing a name which is zero. + + LONGIND returns the index in LONGOPT of the long-named option found. + It is only valid when a long-named option has been found by the most + recent call. + + If LONG_ONLY is nonzero, '-' as well as '--' can introduce + long-named options. */ + +int +_getopt_internal (argc, argv, optstring, longopts, longind, long_only) + int argc; + char *const *argv; + const char *optstring; + const struct option *longopts; + int *longind; + int long_only; +{ + int print_errors = opterr; + if (optstring[0] == ':') + print_errors = 0; + + if (argc < 1) + return -1; + + optarg = NULL; + + if (optind == 0 || !__getopt_initialized) + { + if (optind == 0) + optind = 1; /* Don't scan ARGV[0], the program name. */ + optstring = _getopt_initialize (argc, argv, optstring); + __getopt_initialized = 1; + } + + /* Test whether ARGV[optind] points to a non-option argument. + Either it does not have option syntax, or there is an environment flag + from the shell indicating it is not an option. The later information + is only used when the used in the GNU libc. */ +#if defined _LIBC && defined USE_NONOPTION_FLAGS +# define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0' \ + || (optind < nonoption_flags_len \ + && __getopt_nonoption_flags[optind] == '1')) +#else +# define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0') +#endif + + if (nextchar == NULL || *nextchar == '\0') + { + /* Advance to the next ARGV-element. */ + + /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been + moved back by the user (who may also have changed the arguments). */ + if (last_nonopt > optind) + last_nonopt = optind; + if (first_nonopt > optind) + first_nonopt = optind; + + if (ordering == PERMUTE) + { + /* If we have just processed some options following some non-options, + exchange them so that the options come first. */ + + if (first_nonopt != last_nonopt && last_nonopt != optind) + exchange ((char **) argv); + else if (last_nonopt != optind) + first_nonopt = optind; + + /* Skip any additional non-options + and extend the range of non-options previously skipped. */ + + while (optind < argc && NONOPTION_P) + optind++; + last_nonopt = optind; + } + + /* The special ARGV-element `--' means premature end of options. + Skip it like a null option, + then exchange with previous non-options as if it were an option, + then skip everything else like a non-option. */ + + if (optind != argc && !strcmp (argv[optind], "--")) + { + optind++; + + if (first_nonopt != last_nonopt && last_nonopt != optind) + exchange ((char **) argv); + else if (first_nonopt == last_nonopt) + first_nonopt = optind; + last_nonopt = argc; + + optind = argc; + } + + /* If we have done all the ARGV-elements, stop the scan + and back over any non-options that we skipped and permuted. */ + + if (optind == argc) + { + /* Set the next-arg-index to point at the non-options + that we previously skipped, so the caller will digest them. */ + if (first_nonopt != last_nonopt) + optind = first_nonopt; + return -1; + } + + /* If we have come to a non-option and did not permute it, + either stop the scan or describe it to the caller and pass it by. */ + + if (NONOPTION_P) + { + if (ordering == REQUIRE_ORDER) + return -1; + optarg = argv[optind++]; + return 1; + } + + /* We have found another option-ARGV-element. + Skip the initial punctuation. */ + + nextchar = (argv[optind] + 1 + + (longopts != NULL && argv[optind][1] == '-')); + } + + /* Decode the current option-ARGV-element. */ + + /* Check whether the ARGV-element is a long option. + + If long_only and the ARGV-element has the form "-f", where f is + a valid short option, don't consider it an abbreviated form of + a long option that starts with f. Otherwise there would be no + way to give the -f short option. + + On the other hand, if there's a long option "fubar" and + the ARGV-element is "-fu", do consider that an abbreviation of + the long option, just like "--fu", and not "-f" with arg "u". + + This distinction seems to be the most useful approach. */ + + if (longopts != NULL + && (argv[optind][1] == '-' + || (long_only && (argv[optind][2] || !my_index (optstring, argv[optind][1]))))) + { + char *nameend; + const struct option *p; + const struct option *pfound = NULL; + int exact = 0; + int ambig = 0; + int indfound = -1; + int option_index; + + for (nameend = nextchar; *nameend && *nameend != '='; nameend++) + /* Do nothing. */ ; + + /* Test all long options for either exact match + or abbreviated matches. */ + for (p = longopts, option_index = 0; p->name; p++, option_index++) + if (!strncmp (p->name, nextchar, nameend - nextchar)) + { + if ((unsigned int) (nameend - nextchar) + == (unsigned int) strlen (p->name)) + { + /* Exact match found. */ + pfound = p; + indfound = option_index; + exact = 1; + break; + } + else if (pfound == NULL) + { + /* First nonexact match found. */ + pfound = p; + indfound = option_index; + } + else if (long_only + || pfound->has_arg != p->has_arg + || pfound->flag != p->flag + || pfound->val != p->val) + /* Second or later nonexact match found. */ + ambig = 1; + } + + if (ambig && !exact) + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + if (__asprintf (&buf, _("%s: option `%s' is ambiguous\n"), + argv[0], argv[optind]) >= 0) + { + + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); + } +#else + fprintf (stderr, _("%s: option `%s' is ambiguous\n"), + argv[0], argv[optind]); +#endif + } + nextchar += strlen (nextchar); + optind++; + optopt = 0; + return '?'; + } + + if (pfound != NULL) + { + option_index = indfound; + optind++; + if (*nameend) + { + /* Don't test has_arg with >, because some C compilers don't + allow it to be used on enums. */ + if (pfound->has_arg) + optarg = nameend + 1; + else + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + int n; +#endif + + if (argv[optind - 1][1] == '-') + { + /* --option */ +#if defined _LIBC && defined USE_IN_LIBIO + n = __asprintf (&buf, _("\ +%s: option `--%s' doesn't allow an argument\n"), + argv[0], pfound->name); +#else + fprintf (stderr, _("\ +%s: option `--%s' doesn't allow an argument\n"), + argv[0], pfound->name); +#endif + } + else + { + /* +option or -option */ +#if defined _LIBC && defined USE_IN_LIBIO + n = __asprintf (&buf, _("\ +%s: option `%c%s' doesn't allow an argument\n"), + argv[0], argv[optind - 1][0], + pfound->name); +#else + fprintf (stderr, _("\ +%s: option `%c%s' doesn't allow an argument\n"), + argv[0], argv[optind - 1][0], pfound->name); +#endif + } + +#if defined _LIBC && defined USE_IN_LIBIO + if (n >= 0) + { + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); + } +#endif + } + + nextchar += strlen (nextchar); + + optopt = pfound->val; + return '?'; + } + } + else if (pfound->has_arg == 1) + { + if (optind < argc) + optarg = argv[optind++]; + else + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + if (__asprintf (&buf, _("\ +%s: option `%s' requires an argument\n"), + argv[0], argv[optind - 1]) >= 0) + { + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); + } +#else + fprintf (stderr, + _("%s: option `%s' requires an argument\n"), + argv[0], argv[optind - 1]); +#endif + } + nextchar += strlen (nextchar); + optopt = pfound->val; + return optstring[0] == ':' ? ':' : '?'; + } + } + nextchar += strlen (nextchar); + if (longind != NULL) + *longind = option_index; + if (pfound->flag) + { + *(pfound->flag) = pfound->val; + return 0; + } + return pfound->val; + } + + /* Can't find it as a long option. If this is not getopt_long_only, + or the option starts with '--' or is not a valid short + option, then it's an error. + Otherwise interpret it as a short option. */ + if (!long_only || argv[optind][1] == '-' + || my_index (optstring, *nextchar) == NULL) + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + int n; +#endif + + if (argv[optind][1] == '-') + { + /* --option */ +#if defined _LIBC && defined USE_IN_LIBIO + n = __asprintf (&buf, _("%s: unrecognized option `--%s'\n"), + argv[0], nextchar); +#else + fprintf (stderr, _("%s: unrecognized option `--%s'\n"), + argv[0], nextchar); +#endif + } + else + { + /* +option or -option */ +#if defined _LIBC && defined USE_IN_LIBIO + n = __asprintf (&buf, _("%s: unrecognized option `%c%s'\n"), + argv[0], argv[optind][0], nextchar); +#else + fprintf (stderr, _("%s: unrecognized option `%c%s'\n"), + argv[0], argv[optind][0], nextchar); +#endif + } + +#if defined _LIBC && defined USE_IN_LIBIO + if (n >= 0) + { + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); + } +#endif + } + nextchar = (char *) ""; + optind++; + optopt = 0; + return '?'; + } + } + + /* Look at and handle the next short option-character. */ + + { + char c = *nextchar++; + char *temp = my_index (optstring, c); + + /* Increment `optind' when we start to process its last character. */ + if (*nextchar == '\0') + ++optind; + + if (temp == NULL || c == ':') + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + int n; +#endif + + if (posixly_correct) + { + /* 1003.2 specifies the format of this message. */ +#if defined _LIBC && defined USE_IN_LIBIO + n = __asprintf (&buf, _("%s: illegal option -- %c\n"), + argv[0], c); +#else + fprintf (stderr, _("%s: illegal option -- %c\n"), argv[0], c); +#endif + } + else + { +#if defined _LIBC && defined USE_IN_LIBIO + n = __asprintf (&buf, _("%s: invalid option -- %c\n"), + argv[0], c); +#else + fprintf (stderr, _("%s: invalid option -- %c\n"), argv[0], c); +#endif + } + +#if defined _LIBC && defined USE_IN_LIBIO + if (n >= 0) + { + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); + } +#endif + } + optopt = c; + return '?'; + } + /* Convenience. Treat POSIX -W foo same as long option --foo */ + if (temp[0] == 'W' && temp[1] == ';') + { + char *nameend; + const struct option *p; + const struct option *pfound = NULL; + int exact = 0; + int ambig = 0; + int indfound = 0; + int option_index; + + /* This is an option that requires an argument. */ + if (*nextchar != '\0') + { + optarg = nextchar; + /* If we end this ARGV-element by taking the rest as an arg, + we must advance to the next element now. */ + optind++; + } + else if (optind == argc) + { + if (print_errors) + { + /* 1003.2 specifies the format of this message. */ +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + if (__asprintf (&buf, + _("%s: option requires an argument -- %c\n"), + argv[0], c) >= 0) + { + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); + } +#else + fprintf (stderr, _("%s: option requires an argument -- %c\n"), + argv[0], c); +#endif + } + optopt = c; + if (optstring[0] == ':') + c = ':'; + else + c = '?'; + return c; + } + else + /* We already incremented `optind' once; + increment it again when taking next ARGV-elt as argument. */ + optarg = argv[optind++]; + + /* optarg is now the argument, see if it's in the + table of longopts. */ + + for (nextchar = nameend = optarg; *nameend && *nameend != '='; nameend++) + /* Do nothing. */ ; + + /* Test all long options for either exact match + or abbreviated matches. */ + for (p = longopts, option_index = 0; p->name; p++, option_index++) + if (!strncmp (p->name, nextchar, nameend - nextchar)) + { + if ((unsigned int) (nameend - nextchar) == strlen (p->name)) + { + /* Exact match found. */ + pfound = p; + indfound = option_index; + exact = 1; + break; + } + else if (pfound == NULL) + { + /* First nonexact match found. */ + pfound = p; + indfound = option_index; + } + else + /* Second or later nonexact match found. */ + ambig = 1; + } + if (ambig && !exact) + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + if (__asprintf (&buf, _("%s: option `-W %s' is ambiguous\n"), + argv[0], argv[optind]) >= 0) + { + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); + } +#else + fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"), + argv[0], argv[optind]); +#endif + } + nextchar += strlen (nextchar); + optind++; + return '?'; + } + if (pfound != NULL) + { + option_index = indfound; + if (*nameend) + { + /* Don't test has_arg with >, because some C compilers don't + allow it to be used on enums. */ + if (pfound->has_arg) + optarg = nameend + 1; + else + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + if (__asprintf (&buf, _("\ +%s: option `-W %s' doesn't allow an argument\n"), + argv[0], pfound->name) >= 0) + { + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); + } +#else + fprintf (stderr, _("\ +%s: option `-W %s' doesn't allow an argument\n"), + argv[0], pfound->name); +#endif + } + + nextchar += strlen (nextchar); + return '?'; + } + } + else if (pfound->has_arg == 1) + { + if (optind < argc) + optarg = argv[optind++]; + else + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + if (__asprintf (&buf, _("\ +%s: option `%s' requires an argument\n"), + argv[0], argv[optind - 1]) >= 0) + { + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); + } +#else + fprintf (stderr, + _("%s: option `%s' requires an argument\n"), + argv[0], argv[optind - 1]); +#endif + } + nextchar += strlen (nextchar); + return optstring[0] == ':' ? ':' : '?'; + } + } + nextchar += strlen (nextchar); + if (longind != NULL) + *longind = option_index; + if (pfound->flag) + { + *(pfound->flag) = pfound->val; + return 0; + } + return pfound->val; + } + nextchar = NULL; + return 'W'; /* Let the application handle it. */ + } + if (temp[1] == ':') + { + if (temp[2] == ':') + { + /* This is an option that accepts an argument optionally. */ + if (*nextchar != '\0') + { + optarg = nextchar; + optind++; + } + else + optarg = NULL; + nextchar = NULL; + } + else + { + /* This is an option that requires an argument. */ + if (*nextchar != '\0') + { + optarg = nextchar; + /* If we end this ARGV-element by taking the rest as an arg, + we must advance to the next element now. */ + optind++; + } + else if (optind == argc) + { + if (print_errors) + { + /* 1003.2 specifies the format of this message. */ +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + if (__asprintf (&buf, _("\ +%s: option requires an argument -- %c\n"), + argv[0], c) >= 0) + { + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); + } +#else + fprintf (stderr, + _("%s: option requires an argument -- %c\n"), + argv[0], c); +#endif + } + optopt = c; + if (optstring[0] == ':') + c = ':'; + else + c = '?'; + } + else + /* We already incremented `optind' once; + increment it again when taking next ARGV-elt as argument. */ + optarg = argv[optind++]; + nextchar = NULL; + } + } + return c; + } +} + +int +getopt (argc, argv, optstring) + int argc; + char *const *argv; + const char *optstring; +{ + return _getopt_internal (argc, argv, optstring, + (const struct option *) 0, + (int *) 0, + 0); +} + +#endif /* Not ELIDE_CODE. */ + +#ifdef TEST + +/* Compile with -DTEST to make an executable for use in testing + the above definition of `getopt'. */ + +int +main (argc, argv) + int argc; + char **argv; +{ + int c; + int digit_optind = 0; + + while (1) + { + int this_option_optind = optind ? optind : 1; + + c = getopt (argc, argv, "abc:d:0123456789"); + if (c == -1) + break; + + switch (c) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + if (digit_optind != 0 && digit_optind != this_option_optind) + printf ("digits occur in two different argv-elements.\n"); + digit_optind = this_option_optind; + printf ("option %c\n", c); + break; + + case 'a': + printf ("option a\n"); + break; + + case 'b': + printf ("option b\n"); + break; + + case 'c': + printf ("option c with value `%s'\n", optarg); + break; + + case '?': + break; + + default: + printf ("?? getopt returned character code 0%o ??\n", c); + } + } + + if (optind < argc) + { + printf ("non-option ARGV-elements: "); + while (optind < argc) + printf ("%s ", argv[optind++]); + printf ("\n"); + } + + exit (0); +} + +#endif /* TEST */ + Added: trunk/build.vc10/getopt.h =================================================================== --- trunk/build.vc10/getopt.h (rev 0) +++ trunk/build.vc10/getopt.h 2010-05-24 09:23:25 UTC (rev 387) @@ -0,0 +1,182 @@ +/* Declarations for getopt. + Copyright (C) 1989-1994, 1996-1999, 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifndef _GETOPT_H + +#ifndef __need_getopt +# define _GETOPT_H 1 +#endif + +/* If __GNU_LIBRARY__ is not already defined, either we are being used + standalone, or this is the first header included in the source file. + If we are being used with glibc, we need to include <features.h>, but + that does not exist if we are standalone. So: if __GNU_LIBRARY__ is + not defined, include <ctype.h>, which will pull in <features.h> for us + if it's from glibc. (Why ctype.h? It's guaranteed to exist and it + doesn't flood the namespace with stuff the way some other headers do.) */ +#if !defined __GNU_LIBRARY__ +# include <ctype.h> +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* For communication from `getopt' to the caller. + When `getopt' finds an option that takes an argument, + the argument value is returned here. + Also, when `ordering' is RETURN_IN_ORDER, + each non-option ARGV-element is returned here. */ + +extern char *optarg; + +/* Index in ARGV of the next element to be scanned. + This is used for communication to and from the caller + and for communication between successive calls to `getopt'. + + On entry to `getopt', zero means this is the first call; initialize. + + When `getopt' returns -1, this is the index of the first of the + non-option elements that the caller should itself scan. + + Otherwise, `optind' communicates from one call to the next + how much of ARGV has been scanned so far. */ + +extern int optind; + +/* Callers store zero here to inhibit the error message `getopt' prints + for unrecognized options. */ + +extern int opterr; + +/* Set to an option character which was unrecognized. */ + +extern int optopt; + +#ifndef __need_getopt +/* Describe the long-named options requested by the application. + The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector + of `struct option' terminated by an element containing a name which is + zero. + + The field `has_arg' is: + no_argument (or 0) if the option does not take an argument, + required_argument (or 1) if the option requires an argument, + optional_argument (or 2) if the option takes an optional argument. + + If the field `flag' is not NULL, it points to a variable that is set + to the value given in the field `val' when the option is found, but + left unchanged if the option is not found. + + To have a long-named option do something other than set an `int' to + a compiled-in constant, such as set a value from `optarg', set the + option's `flag' field to zero and its `val' field to a nonzero + value (the equivalent single-letter option character, if there is + one). For long options that have a zero `flag' field, `getopt' + returns the contents of the `val' field. */ + +struct option +{ +# if (defined __STDC__ && __STDC__) || defined __cplusplus + const char *name; +# else + char *name; +# endif + /* has_arg can't be an enum because some compilers complain about + type mismatches in all the code that assumes it is an int. */ + int has_arg; + int *flag; + int val; +}; + +/* Names for the values of the `has_arg' field of `struct option'. */ + +# define no_argument 0 +# define required_argument 1 +# define optional_argument 2 +#endif /* need getopt */ + + +/* Get definitions and prototypes for functions to process the + arguments in ARGV (ARGC of them, minus the program name) for + options given in OPTS. + + Return the option character from OPTS just read. Return -1 when + there are no more options. For unrecognized options, or options + missing arguments, `optopt' is set to the option letter, and '?' is + returned. + + The OPTS string is a list of characters which are recognized option + letters, optionally followed by colons, specifying that that letter + takes an argument, to be placed in `optarg'. + + If a letter in OPTS is followed by two colons, its argument is + optional. This behavior is specific to the GNU `getopt'. + + The argument `--' causes premature termination of argument + scanning, explicitly telling `getopt' that there are no more + options. + + If OPTS begins with `--', then non-option arguments are treated as + arguments to the option '\0'. This behavior is specific to the GNU + `getopt'. */ + +#if (defined __STDC__ && __STDC__) || defined __cplusplus +# ifdef __GNU_LIBRARY__ +/* Many other libraries have conflicting prototypes for getopt, with + differences in the consts, in stdlib.h. To avoid compilation + errors, only prototype getopt for the GNU C library. */ +extern int getopt (int ___argc, char *const *___argv, const char *__shortopts); +# else /* not __GNU_LIBRARY__ */ +extern int getopt (); +# endif /* __GNU_LIBRARY__ */ + +# ifndef __need_getopt +extern int getopt_long (int ___argc, char *const *___argv, + const char *__shortopts, + const struct option *__longopts, int *__longind); +extern int getopt_long_only (int ___argc, char *const *___argv, + const char *__shortopts, + const struct option *__longopts, int *__longind); + +/* Internal only. Users should not call this directly. */ +extern int _getopt... [truncated message content] |
From: <Ba...@us...> - 2010-04-26 20:49:15
|
Revision: 386 http://ggnfs.svn.sourceforge.net/ggnfs/?rev=386&view=rev Author: Batalov Date: 2010-04-26 20:49:09 +0000 (Mon, 26 Apr 2010) Log Message: ----------- cweave'd documented source Added Paths: ----------- trunk/src/lasieve4/gnfs-lasieve4e.pdf Added: trunk/src/lasieve4/gnfs-lasieve4e.pdf =================================================================== (Binary files differ) Property changes on: trunk/src/lasieve4/gnfs-lasieve4e.pdf ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ba...@us...> - 2010-03-28 04:13:56
|
Revision: 385 http://ggnfs.svn.sourceforge.net/ggnfs/?rev=385&view=rev Author: Batalov Date: 2010-03-28 04:13:50 +0000 (Sun, 28 Mar 2010) Log Message: ----------- patch only for 16e siever and L1_BITS=16 Modified Paths: -------------- trunk/src/experimental/lasieve4_64/gnfs-lasieve4e.c Modified: trunk/src/experimental/lasieve4_64/gnfs-lasieve4e.c =================================================================== --- trunk/src/experimental/lasieve4_64/gnfs-lasieve4e.c 2010-01-17 20:53:51 UTC (rev 384) +++ trunk/src/experimental/lasieve4_64/gnfs-lasieve4e.c 2010-03-28 04:13:50 UTC (rev 385) @@ -695,7 +695,7 @@ } if(FB_bound[special_q_side]> first_spq) { FB_bound[special_q_side]=(float) first_spq-1; - printf("Warning: lowering FB_bound to %u.\n",first_spq-1); + if(verbose) printf("Warning: lowering FB_bound to %u.\n",first_spq-1); //complain("Special q lower bound %u below rFB bound %g\n", //first_spq,FB_bound[special_q_side]); } @@ -2285,15 +2285,23 @@ p= x[0]; l= x[1]; d= x[2]; -#if I_bits<=L1_BITS +#if I_bits==L1_BITS + // j_per_strip = 2 here, and p is rarely 0 (which is a bug) + if(d<2) horizontal_sievesums[d]+= l; + if(p==0) x[0]=USHRT_MAX-1; // otherwise will crash in trial_divide() + else if((d+=p)<2) horizontal_sievesums[d]+= l; +#else +#if I_bits<L1_BITS while(d<j_per_strip) { horizontal_sievesums[d]+= l; d+= p; } #else + // j_per_strip = 1 here, and p is rarely 0 (which is a bug) if(d==0) *horizontal_sievesums += l; #endif +#endif #if 0 x[2]= d-j_per_strip; #endif @@ -2708,9 +2716,11 @@ tNow = sTime(); if (tNow > lastReport + 5.0) { lastReport = tNow; - fprintf(stderr, "\rtotal yield: %u, q=%u (%1.5lf sec/rel) ", + if(verbose) { + fprintf(stderr, "\rtotal yield: %u, q=%u (%1.5lf sec/rel) ", (unsigned int)yield, (unsigned int)special_q, (tNow - tStart)/yield); - fflush(stderr); + fflush(stderr); + } } } fprintf(stderr, "\rtotal yield: %u, q=%u (%1.5lf sec/rel) \n", This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ba...@us...> - 2010-01-17 20:54:17
|
Revision: 384 http://ggnfs.svn.sourceforge.net/ggnfs/?rev=384&view=rev Author: Batalov Date: 2010-01-17 20:53:51 +0000 (Sun, 17 Jan 2010) Log Message: ----------- adding 11e Modified Paths: -------------- trunk/src/lasieve4/Makefile Modified: trunk/src/lasieve4/Makefile =================================================================== --- trunk/src/lasieve4/Makefile 2009-12-21 08:44:06 UTC (rev 383) +++ trunk/src/lasieve4/Makefile 2010-01-17 20:53:51 UTC (rev 384) @@ -39,7 +39,7 @@ all : $(BINDIR)/gnfs-lasieve4I12e $(BINDIR)/gnfs-lasieve4I13e \ $(BINDIR)/gnfs-lasieve4I14e $(BINDIR)/gnfs-lasieve4I15e \ - $(BINDIR)/gnfs-lasieve4I16e + $(BINDIR)/gnfs-lasieve4I16e $(BINDIR)/gnfs-lasieve4I11e asm/%: $(MAKE) -C asm $* This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ba...@us...> - 2009-12-21 08:44:14
|
Revision: 383 http://ggnfs.svn.sourceforge.net/ggnfs/?rev=383&view=rev Author: Batalov Date: 2009-12-21 08:44:06 +0000 (Mon, 21 Dec 2009) Log Message: ----------- define L1_BITS 15; for k8+ CPUs read INSTALL Modified Paths: -------------- trunk/src/experimental/lasieve4_64/INSTALL trunk/src/experimental/lasieve4_64/athlon64/ls-defs.asm trunk/src/experimental/lasieve4_64/athlon64/siever-config.h Modified: trunk/src/experimental/lasieve4_64/INSTALL =================================================================== --- trunk/src/experimental/lasieve4_64/INSTALL 2009-11-06 23:57:07 UTC (rev 382) +++ trunk/src/experimental/lasieve4_64/INSTALL 2009-12-21 08:44:06 UTC (rev 383) @@ -3,11 +3,20 @@ These should build and run on Athlon64, or Core2 cpus. ****************************** -NOTE: on Core2 replace in athlon64/ls-defs.asm -- define(l1_bits,16)dnl -+ define(l1_bits,15)dnl -****************************** (don't know how to automate this) +NOTE for Phenom/K8 users: replace in athlon64/ls-defs.asm + define(l1_bits,15)dnl +=> + define(l1_bits,16)dnl +and in athlon64/siever-config.h +#define L1_BITS 15 +=> +#define L1_BITS 16 + +This may add 5-10% speed to your sieving speed. +But try it both ways and decide for yourself. Caveat emptor! +****************************** + Prerequisites: gmp.h libgmp cd athlon64 Modified: trunk/src/experimental/lasieve4_64/athlon64/ls-defs.asm =================================================================== --- trunk/src/experimental/lasieve4_64/athlon64/ls-defs.asm 2009-11-06 23:57:07 UTC (rev 382) +++ trunk/src/experimental/lasieve4_64/athlon64/ls-defs.asm 2009-12-21 08:44:06 UTC (rev 383) @@ -1,4 +1,4 @@ -define(l1_bits,16)dnl +define(l1_bits,15)dnl define(n_i,eval(2**n_i_bits))dnl define(n_i_mask,eval(n_i-1))dnl define(l1_size,eval(2**l1_bits))dnl Modified: trunk/src/experimental/lasieve4_64/athlon64/siever-config.h =================================================================== --- trunk/src/experimental/lasieve4_64/athlon64/siever-config.h 2009-11-06 23:57:07 UTC (rev 382) +++ trunk/src/experimental/lasieve4_64/athlon64/siever-config.h 2009-12-21 08:44:06 UTC (rev 383) @@ -6,15 +6,12 @@ #include <stddef.h> #include <limits.h> -#if defined(__amdfam10__) || defined(__k8__) || defined(__athlon__) -#define L1_BITS 16 -#else #define L1_BITS 15 +/* ===if you change L1_BITS here, change l1_bits define in ls-defs.asm ===*/ /* L1_BITS 15 for Intel Core2 (32Kb L1 data cache), AMD K6 */ /* L1_BITS 16 for Phenom/Opteron... AMD K7 and up */ /* L1_BITS 14 was here before. PentiumIII had 16Kb */ /* L1_BITS 13 for Pentium4 ? (only 8Kb L1 Dcache) */ -#endif #define ULONG_RI typedef unsigned u32_t; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ba...@us...> - 2009-11-06 23:57:21
|
Revision: 382 http://ggnfs.svn.sourceforge.net/ggnfs/?rev=382&view=rev Author: Batalov Date: 2009-11-06 23:57:07 +0000 (Fri, 06 Nov 2009) Log Message: ----------- better L1_BITS definition Modified Paths: -------------- trunk/src/experimental/lasieve4_64/INSTALL trunk/src/experimental/lasieve4_64/gnfs-lasieve4e.c Modified: trunk/src/experimental/lasieve4_64/INSTALL =================================================================== --- trunk/src/experimental/lasieve4_64/INSTALL 2009-11-06 23:52:37 UTC (rev 381) +++ trunk/src/experimental/lasieve4_64/INSTALL 2009-11-06 23:57:07 UTC (rev 382) @@ -2,6 +2,12 @@ follow these steps to build the binaries on a 64-bit machine. These should build and run on Athlon64, or Core2 cpus. +****************************** +NOTE: on Core2 replace in athlon64/ls-defs.asm +- define(l1_bits,16)dnl ++ define(l1_bits,15)dnl +****************************** (don't know how to automate this) + Prerequisites: gmp.h libgmp cd athlon64 Modified: trunk/src/experimental/lasieve4_64/gnfs-lasieve4e.c =================================================================== --- trunk/src/experimental/lasieve4_64/gnfs-lasieve4e.c 2009-11-06 23:52:37 UTC (rev 381) +++ trunk/src/experimental/lasieve4_64/gnfs-lasieve4e.c 2009-11-06 23:57:07 UTC (rev 382) @@ -147,7 +147,7 @@ u32_t fbis[2]; -#if I_bits<17 +#if I_bits<=L1_BITS static u32_t j_per_strip,jps_bits; #else #define j_per_strip 1 @@ -1002,7 +1002,7 @@ tiny_sieve_buffer= xmalloc(TINY_SIEVEBUFFER_SIZE); if(n_i> L1_SIZE) complain("Strip length %u exceeds L1 size %u\n",n_i,L1_SIZE); -#if I_bits<17 +#if I_bits<=L1_BITS j_per_strip= L1_SIZE/n_i; jps_bits= L1_BITS-i_bits; #endif @@ -2285,7 +2285,7 @@ p= x[0]; l= x[1]; d= x[2]; -#if I_bits<17 +#if I_bits<=L1_BITS while(d<j_per_strip) { horizontal_sievesums[d]+= l; d+= p; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ba...@us...> - 2009-11-06 23:52:48
|
Revision: 381 http://ggnfs.svn.sourceforge.net/ggnfs/?rev=381&view=rev Author: Batalov Date: 2009-11-06 23:52:37 +0000 (Fri, 06 Nov 2009) Log Message: ----------- better L1_BITS definition Modified Paths: -------------- trunk/src/experimental/lasieve4_64/athlon64/siever-config.h trunk/src/experimental/lasieve4_64/mpqs.c trunk/src/lasieve4/piii/siever-config.h Modified: trunk/src/experimental/lasieve4_64/athlon64/siever-config.h =================================================================== --- trunk/src/experimental/lasieve4_64/athlon64/siever-config.h 2009-11-04 20:34:58 UTC (rev 380) +++ trunk/src/experimental/lasieve4_64/athlon64/siever-config.h 2009-11-06 23:52:37 UTC (rev 381) @@ -5,7 +5,17 @@ #define __SIEVER_CONFIG_H__ #include <stddef.h> #include <limits.h> + +#if defined(__amdfam10__) || defined(__k8__) || defined(__athlon__) #define L1_BITS 16 +#else +#define L1_BITS 15 +/* L1_BITS 15 for Intel Core2 (32Kb L1 data cache), AMD K6 */ +/* L1_BITS 16 for Phenom/Opteron... AMD K7 and up */ +/* L1_BITS 14 was here before. PentiumIII had 16Kb */ +/* L1_BITS 13 for Pentium4 ? (only 8Kb L1 Dcache) */ +#endif + #define ULONG_RI typedef unsigned u32_t; typedef int i32_t; Modified: trunk/src/experimental/lasieve4_64/mpqs.c =================================================================== --- trunk/src/experimental/lasieve4_64/mpqs.c 2009-11-04 20:34:58 UTC (rev 380) +++ trunk/src/experimental/lasieve4_64/mpqs.c 2009-11-06 23:52:37 UTC (rev 381) @@ -42,7 +42,7 @@ #define MPQS_MAX_FBSIZE 512 #define MPQS_MIN_EXCESS 10 #define MPQS_MAX_ADIV_ALL 6 -#define MPQS_SIEVELEN (1<<15) +#define MPQS_SIEVELEN (1<<(L1_BITS<15?L1_BITS:15)) #define MPQS_REL_ENTRIES 32 #define MPQS_TD_MAX_NDIV (MPQS_REL_ENTRIES-5) #define MPQS_MAX_NRELS 256 /* ??? */ Modified: trunk/src/lasieve4/piii/siever-config.h =================================================================== --- trunk/src/lasieve4/piii/siever-config.h 2009-11-04 20:34:58 UTC (rev 380) +++ trunk/src/lasieve4/piii/siever-config.h 2009-11-06 23:52:37 UTC (rev 381) @@ -20,11 +20,15 @@ #include "ggnfs.h" #include "if.h" +#if defined(__amdfam10__) || defined(__k8__) || defined(__athlon__) +#define L1_BITS 16 +#else #define L1_BITS 15 /* L1_BITS 15 for Intel Core2 (32Kb L1 data cache), AMD K6 */ /* L1_BITS 16 for Phenom/Opteron... AMD K7 and up */ /* L1_BITS 14 was here before. PentiumIII had 16Kb */ /* L1_BITS 13 for Pentium4 ? (only 8Kb L1 Dcache) */ +#endif #define ULONG_RI #define HAVE_CMOV This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ba...@us...> - 2009-11-04 20:35:17
|
Revision: 380 http://ggnfs.svn.sourceforge.net/ggnfs/?rev=380&view=rev Author: Batalov Date: 2009-11-04 20:34:58 +0000 (Wed, 04 Nov 2009) Log Message: ----------- minor Modified Paths: -------------- trunk/src/lasieve4/mpqs.c Modified: trunk/src/lasieve4/mpqs.c =================================================================== --- trunk/src/lasieve4/mpqs.c 2009-11-04 19:46:53 UTC (rev 379) +++ trunk/src/lasieve4/mpqs.c 2009-11-04 20:34:58 UTC (rev 380) @@ -37,7 +37,7 @@ #define MPQS_MAX_FBSIZE 512 #define MPQS_MIN_EXCESS 10 #define MPQS_MAX_ADIV_ALL 6 -#define MPQS_SIEVELEN (1<<15) +#define MPQS_SIEVELEN (1<<(L1_BITS<15?L1_BITS:15)) #define MPQS_REL_ENTRIES 32 #define MPQS_TD_MAX_NDIV (MPQS_REL_ENTRIES-5) #define MPQS_MAX_NRELS 256 /* ??? */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ba...@us...> - 2009-11-04 19:47:05
|
Revision: 379 http://ggnfs.svn.sourceforge.net/ggnfs/?rev=379&view=rev Author: Batalov Date: 2009-11-04 19:46:53 +0000 (Wed, 04 Nov 2009) Log Message: ----------- L1_BITS 15 for Intel Core2, 16 for AMD K7+ Modified Paths: -------------- trunk/src/lasieve4/piii/siever-config.h trunk/src/lasieve4/ppc32/siever-config.h Modified: trunk/src/lasieve4/piii/siever-config.h =================================================================== --- trunk/src/lasieve4/piii/siever-config.h 2009-11-04 06:06:04 UTC (rev 378) +++ trunk/src/lasieve4/piii/siever-config.h 2009-11-04 19:46:53 UTC (rev 379) @@ -20,11 +20,12 @@ #include "ggnfs.h" #include "if.h" -#if 0 && I_bits>15 -#define L1_BITS (I_bits-1) -#else -#define L1_BITS 16 -#endif +#define L1_BITS 15 +/* L1_BITS 15 for Intel Core2 (32Kb L1 data cache), AMD K6 */ +/* L1_BITS 16 for Phenom/Opteron... AMD K7 and up */ +/* L1_BITS 14 was here before. PentiumIII had 16Kb */ +/* L1_BITS 13 for Pentium4 ? (only 8Kb L1 Dcache) */ + #define ULONG_RI #define HAVE_CMOV #if __SSE__ Modified: trunk/src/lasieve4/ppc32/siever-config.h =================================================================== --- trunk/src/lasieve4/ppc32/siever-config.h 2009-11-04 06:06:04 UTC (rev 378) +++ trunk/src/lasieve4/ppc32/siever-config.h 2009-11-04 19:46:53 UTC (rev 379) @@ -18,11 +18,11 @@ #include "ggnfs.h" -#if 0 && I_bits>15 -#define L1_BITS (I_bits-1) -#else -#define L1_BITS 16 -#endif +#define L1_BITS 15 +/* L1_BITS 15 for Intel Core2 (32Kb L1 data cache) */ +/* L1_BITS 16 for Phenom/Opteron... AMD K7 and up */ +/* L1_BITS 14 was here before. Pentium3-4 had 16Kb */ + #define ULONG_RI #define asm_modinv32 modinv32 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ba...@us...> - 2009-11-04 06:06:21
|
Revision: 378 http://ggnfs.svn.sourceforge.net/ggnfs/?rev=378&view=rev Author: Batalov Date: 2009-11-04 06:06:04 +0000 (Wed, 04 Nov 2009) Log Message: ----------- L1_BITS 16 for Jeff to test Modified Paths: -------------- trunk/src/lasieve4/gnfs-lasieve4e.c trunk/src/lasieve4/mpqs.c trunk/src/lasieve4/piii/siever-config.h trunk/src/lasieve4/ppc32/siever-config.h Modified: trunk/src/lasieve4/gnfs-lasieve4e.c =================================================================== --- trunk/src/lasieve4/gnfs-lasieve4e.c 2009-11-04 04:24:45 UTC (rev 377) +++ trunk/src/lasieve4/gnfs-lasieve4e.c 2009-11-04 06:06:04 UTC (rev 378) @@ -3209,7 +3209,7 @@ schedules[s][i].n_strips = ns; #if I_bits<15 /* no change here, there were no sched.pathologies, and memory footprint is small */ -#define SCHED_PAD 32 +#define SCHED_PAD 48 #define SCHED_TOL 2 #else /* these values are experimental; report SCHED_PATHOLOGY to http://mersenneforum.org/showthread.php?t=11430 */ Modified: trunk/src/lasieve4/mpqs.c =================================================================== --- trunk/src/lasieve4/mpqs.c 2009-11-04 04:24:45 UTC (rev 377) +++ trunk/src/lasieve4/mpqs.c 2009-11-04 06:06:04 UTC (rev 378) @@ -37,7 +37,7 @@ #define MPQS_MAX_FBSIZE 512 #define MPQS_MIN_EXCESS 10 #define MPQS_MAX_ADIV_ALL 6 -#define MPQS_SIEVELEN (1<<L1_BITS) +#define MPQS_SIEVELEN (1<<15) #define MPQS_REL_ENTRIES 32 #define MPQS_TD_MAX_NDIV (MPQS_REL_ENTRIES-5) #define MPQS_MAX_NRELS 256 /* ??? */ @@ -1222,10 +1222,13 @@ i1=sv[s1]; i2=sv[s2]; sv+=p; if (i1||i2) { if (i1) { nr=rels[i1][4]; rels[i1][nr+5]=mpqs_nFBk_1+i; rels[i1][4]++; } - if (i2) { nr=rels[i2][4]; rels[i2][nr+5]=mpqs_nFBk_1+i; rels[i2][4]++; } } + if (i2) { nr=rels[i2][4]; rels[i2][nr+5]=mpqs_nFBk_1+i; rels[i2][4]++; } + } i1=sv[s1]; i2=sv[s2]; sv+=p; if (i1||i2) { - if (i1) { nr=rels[i1][4]; rels[i1][nr+5]=mpqs_nFBk_1+i; rels[i1][4]++; } if (i2) { nr=rels[i2][4]; rels[i2][nr+5]=mpqs_nFBk_1+i; rels[i2][4]++; } } + if (i1) { nr=rels[i1][4]; rels[i1][nr+5]=mpqs_nFBk_1+i; rels[i1][4]++; } + if (i2) { nr=rels[i2][4]; rels[i2][nr+5]=mpqs_nFBk_1+i; rels[i2][4]++; } + } } svend+=p; while (sv<svend) { Modified: trunk/src/lasieve4/piii/siever-config.h =================================================================== --- trunk/src/lasieve4/piii/siever-config.h 2009-11-04 04:24:45 UTC (rev 377) +++ trunk/src/lasieve4/piii/siever-config.h 2009-11-04 06:06:04 UTC (rev 378) @@ -20,10 +20,10 @@ #include "ggnfs.h" #include "if.h" -#if I_bits>15 +#if 0 && I_bits>15 #define L1_BITS (I_bits-1) #else -#define L1_BITS 14 +#define L1_BITS 16 #endif #define ULONG_RI #define HAVE_CMOV Modified: trunk/src/lasieve4/ppc32/siever-config.h =================================================================== --- trunk/src/lasieve4/ppc32/siever-config.h 2009-11-04 04:24:45 UTC (rev 377) +++ trunk/src/lasieve4/ppc32/siever-config.h 2009-11-04 06:06:04 UTC (rev 378) @@ -18,10 +18,10 @@ #include "ggnfs.h" -#if I_bits>15 +#if 0 && I_bits>15 #define L1_BITS (I_bits-1) #else -#define L1_BITS 14 +#define L1_BITS 16 #endif #define ULONG_RI #define asm_modinv32 modinv32 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ba...@us...> - 2009-11-04 04:24:53
|
Revision: 377 http://ggnfs.svn.sourceforge.net/ggnfs/?rev=377&view=rev Author: Batalov Date: 2009-11-04 04:24:45 +0000 (Wed, 04 Nov 2009) Log Message: ----------- if L1_BITS=16, use sievelen fitting u16_t (1<<15) Modified Paths: -------------- trunk/src/experimental/lasieve4_64/mpqs.c Modified: trunk/src/experimental/lasieve4_64/mpqs.c =================================================================== --- trunk/src/experimental/lasieve4_64/mpqs.c 2009-11-04 03:57:36 UTC (rev 376) +++ trunk/src/experimental/lasieve4_64/mpqs.c 2009-11-04 04:24:45 UTC (rev 377) @@ -42,7 +42,7 @@ #define MPQS_MAX_FBSIZE 512 #define MPQS_MIN_EXCESS 10 #define MPQS_MAX_ADIV_ALL 6 -#define MPQS_SIEVELEN (1<<L1_BITS) +#define MPQS_SIEVELEN (1<<15) #define MPQS_REL_ENTRIES 32 #define MPQS_TD_MAX_NDIV (MPQS_REL_ENTRIES-5) #define MPQS_MAX_NRELS 256 /* ??? */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ba...@us...> - 2009-11-04 03:57:57
|
Revision: 376 http://ggnfs.svn.sourceforge.net/ggnfs/?rev=376&view=rev Author: Batalov Date: 2009-11-04 03:57:36 +0000 (Wed, 04 Nov 2009) Log Message: ----------- faster sieving (up to 20%) Modified Paths: -------------- trunk/src/experimental/lasieve4_64/athlon64/ls-defs.asm trunk/src/experimental/lasieve4_64/athlon64/siever-config.h trunk/src/experimental/lasieve4_64/gnfs-lasieve4e.c trunk/src/experimental/lasieve4_64/mpqs.c Modified: trunk/src/experimental/lasieve4_64/athlon64/ls-defs.asm =================================================================== --- trunk/src/experimental/lasieve4_64/athlon64/ls-defs.asm 2009-11-01 21:30:54 UTC (rev 375) +++ trunk/src/experimental/lasieve4_64/athlon64/ls-defs.asm 2009-11-04 03:57:36 UTC (rev 376) @@ -1,4 +1,4 @@ -define(l1_bits,15)dnl +define(l1_bits,16)dnl define(n_i,eval(2**n_i_bits))dnl define(n_i_mask,eval(n_i-1))dnl define(l1_size,eval(2**l1_bits))dnl Modified: trunk/src/experimental/lasieve4_64/athlon64/siever-config.h =================================================================== --- trunk/src/experimental/lasieve4_64/athlon64/siever-config.h 2009-11-01 21:30:54 UTC (rev 375) +++ trunk/src/experimental/lasieve4_64/athlon64/siever-config.h 2009-11-04 03:57:36 UTC (rev 376) @@ -5,7 +5,7 @@ #define __SIEVER_CONFIG_H__ #include <stddef.h> #include <limits.h> -#define L1_BITS 15 +#define L1_BITS 16 #define ULONG_RI typedef unsigned u32_t; typedef int i32_t; Modified: trunk/src/experimental/lasieve4_64/gnfs-lasieve4e.c =================================================================== --- trunk/src/experimental/lasieve4_64/gnfs-lasieve4e.c 2009-11-01 21:30:54 UTC (rev 375) +++ trunk/src/experimental/lasieve4_64/gnfs-lasieve4e.c 2009-11-04 03:57:36 UTC (rev 376) @@ -147,7 +147,7 @@ u32_t fbis[2]; -#if I_bits<16 +#if I_bits<17 static u32_t j_per_strip,jps_bits; #else #define j_per_strip 1 @@ -1002,7 +1002,7 @@ tiny_sieve_buffer= xmalloc(TINY_SIEVEBUFFER_SIZE); if(n_i> L1_SIZE) complain("Strip length %u exceeds L1 size %u\n",n_i,L1_SIZE); -#if I_bits<16 +#if I_bits<17 j_per_strip= L1_SIZE/n_i; jps_bits= L1_BITS-i_bits; #endif @@ -2285,7 +2285,7 @@ p= x[0]; l= x[1]; d= x[2]; -#if I_bits<16 +#if I_bits<17 while(d<j_per_strip) { horizontal_sievesums[d]+= l; d+= p; Modified: trunk/src/experimental/lasieve4_64/mpqs.c =================================================================== --- trunk/src/experimental/lasieve4_64/mpqs.c 2009-11-01 21:30:54 UTC (rev 375) +++ trunk/src/experimental/lasieve4_64/mpqs.c 2009-11-04 03:57:36 UTC (rev 376) @@ -1227,10 +1227,13 @@ i1=sv[s1]; i2=sv[s2]; sv+=p; if (i1||i2) { if (i1) { nr=rels[i1][4]; rels[i1][nr+5]=mpqs_nFBk_1+i; rels[i1][4]++; } - if (i2) { nr=rels[i2][4]; rels[i2][nr+5]=mpqs_nFBk_1+i; rels[i2][4]++; } } + if (i2) { nr=rels[i2][4]; rels[i2][nr+5]=mpqs_nFBk_1+i; rels[i2][4]++; } + } i1=sv[s1]; i2=sv[s2]; sv+=p; if (i1||i2) { - if (i1) { nr=rels[i1][4]; rels[i1][nr+5]=mpqs_nFBk_1+i; rels[i1][4]++; } if (i2) { nr=rels[i2][4]; rels[i2][nr+5]=mpqs_nFBk_1+i; rels[i2][4]++; } } + if (i1) { nr=rels[i1][4]; rels[i1][nr+5]=mpqs_nFBk_1+i; rels[i1][4]++; } + if (i2) { nr=rels[i2][4]; rels[i2][nr+5]=mpqs_nFBk_1+i; rels[i2][4]++; } + } } svend+=p; while (sv<svend) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ba...@us...> - 2009-11-01 21:31:05
|
Revision: 375 http://ggnfs.svn.sourceforge.net/ggnfs/?rev=375&view=rev Author: Batalov Date: 2009-11-01 21:30:54 +0000 (Sun, 01 Nov 2009) Log Message: ----------- Found by Lars Dausch, removes the garbage output in the 64bit siever Modified Paths: -------------- trunk/src/experimental/lasieve4_64/mpqs.c Modified: trunk/src/experimental/lasieve4_64/mpqs.c =================================================================== --- trunk/src/experimental/lasieve4_64/mpqs.c 2009-11-01 21:23:42 UTC (rev 374) +++ trunk/src/experimental/lasieve4_64/mpqs.c 2009-11-01 21:30:54 UTC (rev 375) @@ -1474,7 +1474,7 @@ } if (ulqx<1048576) { /*printf("%d ",x);*/ /* !!! */ if (ulqx<=mpqs_pmax) { - printf("%d %lu %u ",x,qx,ulqx); + /*printf("%d %lu %u ",x,qx,ulqx);*/ /* removes garbage output from 64bit siever */ return -1; /* CJM, 11/30/04. */ complain("dec.2\n"); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Dig...@us...> - 2009-11-01 21:24:00
|
Revision: 374 http://ggnfs.svn.sourceforge.net/ggnfs/?rev=374&view=rev Author: DigitalParasite Date: 2009-11-01 21:23:42 +0000 (Sun, 01 Nov 2009) Log Message: ----------- Changes from Andi47 (mersenneforum.org) to add support for the 11e through 16e sievers. Modified Paths: -------------- trunk/tests/factMsieve.pl Modified: trunk/tests/factMsieve.pl =================================================================== --- trunk/tests/factMsieve.pl 2009-11-01 20:24:00 UTC (rev 373) +++ trunk/tests/factMsieve.pl 2009-11-01 21:23:42 UTC (rev 374) @@ -79,7 +79,7 @@ # If this is zero, the lattice siever will sieve q-values on the algebraic side. # Otherwise, it will sieve rational q-values. $LATSIEVE_SIDE=1; -# SB: rational for SNFS, algebraic for GNFS!! +# SB: 1 (rational) for SNFS, 0 (algebraic) for GNFS!! # If this is zero, the GGNFS polynomial selection code will be used (when needed). # But the Kleinjung/Franke code is better, so you should use it if you can. @@ -129,9 +129,12 @@ } } -$LATSIEVER_L1=$GGNFS_BIN_PATH."/gnfs-lasieve4I12e".$EXEC_SUFFIX; -$LATSIEVER_L2=$GGNFS_BIN_PATH."/gnfs-lasieve4I13e".$EXEC_SUFFIX; -$LATSIEVER_L3=$GGNFS_BIN_PATH."/gnfs-lasieve4I14e".$EXEC_SUFFIX; +$LATSIEVER_L1=$GGNFS_BIN_PATH."/gnfs-lasieve4I11e".$EXEC_SUFFIX; +$LATSIEVER_L2=$GGNFS_BIN_PATH."/gnfs-lasieve4I12e".$EXEC_SUFFIX; +$LATSIEVER_L3=$GGNFS_BIN_PATH."/gnfs-lasieve4I13e".$EXEC_SUFFIX; +$LATSIEVER_L4=$GGNFS_BIN_PATH."/gnfs-lasieve4I14e".$EXEC_SUFFIX; +$LATSIEVER_L5=$GGNFS_BIN_PATH."/gnfs-lasieve4I15e".$EXEC_SUFFIX; +$LATSIEVER_L6=$GGNFS_BIN_PATH."/gnfs-lasieve4I16e".$EXEC_SUFFIX; $LATSIEVER=$LATSIEVER_L1; # Just a default. #################################################################### @@ -469,14 +472,20 @@ $DEG = $paramDEG; printf "-> Selected default factorization parameters for $paramDIGS digit level.\n"; if ($type eq "gnfs") { - if ($realDIGS < 110) { $LATSIEVER=$LATSIEVER_L1; } - elsif ($realDIGS < 135) { $LATSIEVER=$LATSIEVER_L2; } - else { $LATSIEVER=$LATSIEVER_L3; } + if ($realDIGS < 95) { $LATSIEVER=$LATSIEVER_L1; } # just a guess + elsif ($realDIGS < 110) { $LATSIEVER=$LATSIEVER_L2; } # kept old value here + elsif ($realDIGS < 140) { $LATSIEVER=$LATSIEVER_L3; } # based on experience in mersenneforum + elsif ($realDIGS < 158) { $LATSIEVER=$LATSIEVER_L4; } # guess based on experience in mersenneforum + elsif ($realDIGS < 185) { $LATSIEVER=$LATSIEVER_L5; } # just a wild guess + else { $LATSIEVER=$LATSIEVER_L6; } } else { $realDIGS += $nonPrefDegAdjust if ($realDEG and ($paramDEG != $realDEG)); - if ($realDIGS < 150) { $LATSIEVER=$LATSIEVER_L1; } - elsif ($realDIGS < 180) { $LATSIEVER=$LATSIEVER_L2; } - else { $LATSIEVER=$LATSIEVER_L3; } + if ($realDIGS < 120) { $LATSIEVER=$LATSIEVER_L1 } # just a guess + elsif ($realDIGS < 150) { $LATSIEVER=$LATSIEVER_L2; } # kept old value here + elsif ($realDIGS < 195) { $LATSIEVER=$LATSIEVER_L3; } # based on experience in mersenneforum + elsif ($realDIGS < 240) { $LATSIEVER=$LATSIEVER_L4; } # guess based on experience in mersenneforum + elsif ($realDIGS < 275) { $LATSIEVER=$LATSIEVER_L5; } # guess based on experience in mersenneforum + else { $LATSIEVER=$LATSIEVER_L6; } } printf "-> Selected lattice siever: $LATSIEVER\n"; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Dig...@us...> - 2009-11-01 20:24:10
|
Revision: 373 http://ggnfs.svn.sourceforge.net/ggnfs/?rev=373&view=rev Author: DigitalParasite Date: 2009-11-01 20:24:00 +0000 (Sun, 01 Nov 2009) Log Message: ----------- Added gnfs-lasieve4I11e VS project which is 20% faster for small C85 jobs and 4% faster for C93 jobs than 12e siever. Modified Paths: -------------- trunk/build.vc/vc9/ggnfs.sln Added Paths: ----------- trunk/build.vc/vc9/gnfs-lasieve4I11e/ trunk/build.vc/vc9/gnfs-lasieve4I11e/gnfs-lasieve4I11e.vcproj Modified: trunk/build.vc/vc9/ggnfs.sln =================================================================== --- trunk/build.vc/vc9/ggnfs.sln 2009-11-01 11:08:25 UTC (rev 372) +++ trunk/build.vc/vc9/ggnfs.sln 2009-11-01 20:24:00 UTC (rev 373) @@ -102,6 +102,11 @@ {1BD758C0-741C-4E0A-AEBB-FE57A7882AB7} = {1BD758C0-741C-4E0A-AEBB-FE57A7882AB7} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gnfs-lasieve4I11e", "gnfs-lasieve4I11e\gnfs-lasieve4I11e.vcproj", "{C20D7F3F-FE26-40B7-BE5C-5D09C2AD35B9}" + ProjectSection(ProjectDependencies) = postProject + {1BD758C0-741C-4E0A-AEBB-FE57A7882AB7} = {1BD758C0-741C-4E0A-AEBB-FE57A7882AB7} + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -270,6 +275,14 @@ {26CDD177-12D7-4E75-92DF-CBC423F4F838}.Release|Win32.Build.0 = Release|Win32 {26CDD177-12D7-4E75-92DF-CBC423F4F838}.Release|x64.ActiveCfg = Release|x64 {26CDD177-12D7-4E75-92DF-CBC423F4F838}.Release|x64.Build.0 = Release|x64 + {C20D7F3F-FE26-40B7-BE5C-5D09C2AD35B9}.Debug|Win32.ActiveCfg = Debug|Win32 + {C20D7F3F-FE26-40B7-BE5C-5D09C2AD35B9}.Debug|Win32.Build.0 = Debug|Win32 + {C20D7F3F-FE26-40B7-BE5C-5D09C2AD35B9}.Debug|x64.ActiveCfg = Debug|x64 + {C20D7F3F-FE26-40B7-BE5C-5D09C2AD35B9}.Debug|x64.Build.0 = Debug|x64 + {C20D7F3F-FE26-40B7-BE5C-5D09C2AD35B9}.Release|Win32.ActiveCfg = Release|Win32 + {C20D7F3F-FE26-40B7-BE5C-5D09C2AD35B9}.Release|Win32.Build.0 = Release|Win32 + {C20D7F3F-FE26-40B7-BE5C-5D09C2AD35B9}.Release|x64.ActiveCfg = Release|x64 + {C20D7F3F-FE26-40B7-BE5C-5D09C2AD35B9}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE Added: trunk/build.vc/vc9/gnfs-lasieve4I11e/gnfs-lasieve4I11e.vcproj =================================================================== --- trunk/build.vc/vc9/gnfs-lasieve4I11e/gnfs-lasieve4I11e.vcproj (rev 0) +++ trunk/build.vc/vc9/gnfs-lasieve4I11e/gnfs-lasieve4I11e.vcproj 2009-11-01 20:24:00 UTC (rev 373) @@ -0,0 +1,1021 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="9.00" + Name="gnfs-lasieve4I11e" + ProjectGUID="{C20D7F3F-FE26-40B7-BE5C-5D09C2AD35B9}" + RootNamespace="gnfs-lasieve4I11e" + Keyword="Win32Proj" + TargetFrameworkVersion="131072" + > + <Platforms> + <Platform + Name="Win32" + /> + <Platform + Name="x64" + /> + </Platforms> + <ToolFiles> + <DefaultToolFile + FileName="yasm.rules" + /> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="$(PlatformName)\$(ConfigurationName)" + IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" + ConfigurationType="1" + InheritedPropertySheets="..\mp_lib.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + CommandLine="if not exist ..\..\..\include\version.h (echo #define GGNFS_VERSION "0.77.1-VC8(%DATE%)" >..\..\..\include\version.h)
set Wd=..\..\..\src\lasieve4
if not exist %Wd%\asm (echo creating %Wd%\asm && md %Wd%\asm)
call ..\file_copy %Wd%\piii\siever-config.h %Wd%\asm\siever-config.h
if exist %Wd%\asm\32bit.h (echo deleting %Wd%\asm\32bit.h && del %Wd%\asm\32bit.h)
" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="YASM" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + WholeProgramOptimization="false" + AdditionalIncludeDirectories="..\;..\..\..\include;..\..\..\src" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;I_bits=11" + MinimalRebuild="false" + BasicRuntimeChecks="3" + SmallerTypeCheck="true" + RuntimeLibrary="1" + UsePrecompiledHeader="0" + AssemblerListingLocation="$(IntDir)\" + ProgramDataBaseFileName="$(IntDir)\" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="3" + CompileAs="0" + DisableSpecificWarnings="4996;4101" + EnablePREfast="true" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="ws2_32.lib" + OutputFile="$(OutDir)\$(ProjectName).exe" + LinkIncremental="1" + GenerateDebugInformation="true" + ProgramDatabaseFile="$(OutDir)/latsieve12.pdb" + GenerateMapFile="true" + SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + CommandLine="if not exist ..\..\..\bin\$(OutDir) mkdir ..\..\..\bin\$(OutDir)
copy /b $(OutDir)\$(ProjectName).exe ..\..\..\bin\$(OutDir)
" + /> + </Configuration> + <Configuration + Name="Debug|x64" + OutputDirectory="$(PlatformName)\$(ConfigurationName)" + IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" + ConfigurationType="1" + InheritedPropertySheets="..\mp_lib.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + CommandLine="if not exist ..\..\..\include\version.h (echo #define GGNFS_VERSION "0.77.1-VC8(%DATE%)" >..\..\..\include\version.h)
set Wd=..\..\..\src\lasieve4
if not exist %Wd%\asm (echo creating %Wd%\asm && md %Wd%\asm)
call ..\file_copy %Wd%\ppc32\siever-config.h %Wd%\asm\siever-config.h
call ..\file_copy %Wd%\ppc32\32bit.h %Wd%\asm\32bit.h
" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="YASM" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + TargetEnvironment="3" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + WholeProgramOptimization="false" + AdditionalIncludeDirectories="..\;..\..\..\include;..\..\..\src" + PreprocessorDefinitions="_DEBUG;_CONSOLE;I_bits=11;WIN64;__x86_64__;GGNFS_HOST_GENERIC" + MinimalRebuild="true" + BasicRuntimeChecks="3" + SmallerTypeCheck="false" + RuntimeLibrary="1" + UsePrecompiledHeader="0" + AssemblerListingLocation="$(IntDir)\" + ProgramDataBaseFileName="$(IntDir)\" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="3" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="ws2_32.lib" + OutputFile="$(OutDir)\$(ProjectName).exe" + LinkIncremental="2" + GenerateDebugInformation="true" + ProgramDatabaseFile="$(OutDir)/latsieve12.pdb" + SubSystem="1" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="17" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + CommandLine="if not exist ..\..\..\bin\$(OutDir) mkdir ..\..\..\bin\$(OutDir)
copy /b $(OutDir)\$(ProjectName).exe ..\..\..\bin\$(OutDir)
" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="$(PlatformName)\$(ConfigurationName)" + IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" + ConfigurationType="1" + InheritedPropertySheets="..\mp_lib.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + CommandLine="if not exist ..\..\..\include\version.h (echo #define GGNFS_VERSION "0.77.1-VC8(%DATE%)" >..\..\..\include\version.h)
set Wd=..\..\..\src\lasieve4
if not exist %Wd%\asm (echo creating %Wd%\asm && md %Wd%\asm)
call ..\file_copy %Wd%\piii\siever-config.h %Wd%\asm\siever-config.h
if exist %Wd%\asm\32bit.h (echo deleting %Wd%\asm\32bit.h && del %Wd%\asm\32bit.h)
" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="YASM" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="3" + InlineFunctionExpansion="0" + EnableIntrinsicFunctions="true" + FavorSizeOrSpeed="1" + OmitFramePointers="true" + WholeProgramOptimization="false" + AdditionalIncludeDirectories="..\;..\..\..\include;..\..\..\src" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;I_bits=11" + RuntimeLibrary="0" + BufferSecurityCheck="false" + UsePrecompiledHeader="0" + AssemblerListingLocation="$(IntDir)\" + ProgramDataBaseFileName="$(IntDir)\" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="3" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="ws2_32.lib" + OutputFile="$(OutDir)\$(ProjectName).exe" + LinkIncremental="1" + GenerateDebugInformation="true" + SubSystem="1" + OptimizeReferences="2" + EnableCOMDATFolding="2" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + CommandLine="if not exist ..\..\..\bin\$(OutDir) mkdir ..\..\..\bin\$(OutDir)
copy /b $(OutDir)\$(ProjectName).exe ..\..\..\bin\$(OutDir)
" + /> + </Configuration> + <Configuration + Name="Release|x64" + OutputDirectory="$(PlatformName)\$(ConfigurationName)" + IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" + ConfigurationType="1" + InheritedPropertySheets="..\mp_lib.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + CommandLine="if not exist ..\..\..\include\version.h (echo #define GGNFS_VERSION "0.77.1-VC8(%DATE%)" >..\..\..\include\version.h)
set Wd=..\..\..\src\lasieve4
if not exist %Wd%\asm (echo creating %Wd%\asm && md %Wd%\asm)
call ..\file_copy %Wd%\ppc32\siever-config.h %Wd%\asm\siever-config.h
call ..\file_copy %Wd%\ppc32\32bit.h %Wd%\asm\32bit.h
" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="YASM" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + TargetEnvironment="3" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="3" + WholeProgramOptimization="false" + AdditionalIncludeDirectories="..\;..\..\..\include;..\..\..\src" + PreprocessorDefinitions="NDEBUG;_CONSOLE;I_bits=11;WIN64;__x86_64__;GGNFS_HOST_GENERIC" + RuntimeLibrary="0" + BufferSecurityCheck="false" + UsePrecompiledHeader="0" + AssemblerListingLocation="$(IntDir)\" + ProgramDataBaseFileName="$(IntDir)\" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="3" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="ws2_32.lib" + OutputFile="$(OutDir)\$(ProjectName).exe" + LinkIncremental="1" + GenerateDebugInformation="true" + SubSystem="1" + OptimizeReferences="2" + EnableCOMDATFolding="2" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="17" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + CommandLine="if not exist ..\..\..\bin\$(OutDir) mkdir ..\..\..\bin\$(OutDir)
copy /b $(OutDir)\$(ProjectName).exe ..\..\..\bin\$(OutDir)
" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Source Files" + > + <File + RelativePath="..\..\..\src\lasieve4\gmp-aux.c" + > + </File> + <File + RelativePath="..\..\..\src\lasieve4\gnfs-lasieve4e.c" + > + </File> + <File + RelativePath="..\..\..\src\lasieve4\input-poly.c" + > + </File> + <File + RelativePath="..\..\..\src\lasieve4\lasieve-prepn.c" + > + </File> + <File + RelativePath="..\..\..\src\lasieve4\mpqs.c" + > + <FileConfiguration + Name="Debug|x64" + > + <Tool + Name="VCCLCompilerTool" + WarningLevel="4" + /> + </FileConfiguration> + </File> + <File + RelativePath="..\..\..\src\lasieve4\prho.c" + > + </File> + <File + RelativePath="..\..\..\src\lasieve4\primgen32.c" + > + </File> + <File + RelativePath="..\..\..\src\lasieve4\real-poly-aux.c" + > + </File> + <File + RelativePath="..\..\..\src\lasieve4\recurrence6.c" + > + </File> + <File + RelativePath="..\..\..\src\lasieve4\redu2.c" + > + </File> + <Filter + Name="ppc32" + > + <File + RelativePath="..\..\..\src\lasieve4\ppc32\gcd32.c" + > + <FileConfiguration + Name="Debug|Win32" + ExcludedFromBuild="true" + > + <Tool + Name="VCCLCompilerTool" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32" + ExcludedFromBuild="true" + > + <Tool + Name="VCCLCompilerTool" + /> + </FileConfiguration> + </File> + <File + RelativePath="..\..\..\src\lasieve4\ppc32\lasched.c" + > + <FileConfiguration + Name="Debug|Win32" + ExcludedFromBuild="true" + > + <Tool + Name="VCCLCompilerTool" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32" + ExcludedFromBuild="true" + > + <Tool + Name="VCCLCompilerTool" + /> + </FileConfiguration> + </File> + <File + RelativePath="..\..\..\src\lasieve4\ppc32\medsched.c" + > + <FileConfiguration + Name="Debug|Win32" + ExcludedFromBuild="true" + > + <Tool + Name="VCCLCompilerTool" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32" + ExcludedFromBuild="true" + > + <Tool + Name="VCCLCompilerTool" + /> + </FileConfiguration> + </File> + <File + RelativePath="..\..\..\src\lasieve4\ppc32\modinv32.c" + > + <FileConfiguration + Name="Debug|Win32" + ExcludedFromBuild="true" + > + <Tool + Name="VCCLCompilerTool" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32" + ExcludedFromBuild="true" + > + <Tool + Name="VCCLCompilerTool" + /> + </FileConfiguration> + </File> + <File + RelativePath="..\..\..\src\lasieve4\ppc32\psp.c" + > + <FileConfiguration + Name="Debug|Win32" + ExcludedFromBuild="true" + > + <Tool + Name="VCCLCompilerTool" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32" + ExcludedFromBuild="true" + > + <Tool + Name="VCCLCompilerTool" + /> + </FileConfiguration> + </File> + </Filter> + <Filter + Name="piii" + > + <File + RelativePath="..\..\..\src\lasieve4\piii\basemath.c" + > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories="..\" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug|x64" + ExcludedFromBuild="true" + > + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories="..\" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32" + > + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories="..\" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|x64" + ExcludedFromBuild="true" + > + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories="..\" + /> + </FileConfiguration> + </File> + <File + RelativePath="..\..\..\src\lasieve4\piii\gcd32.c" + > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories="..\" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug|x64" + ExcludedFromBuild="true" + > + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories="..\" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32" + > + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories="..\" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|x64" + ExcludedFromBuild="true" + > + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories="..\" + /> + </FileConfiguration> + </File> + <File + RelativePath="..\..\..\src\lasieve4\piii\lasched.c" + > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories="..\" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug|x64" + ExcludedFromBuild="true" + > + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories="..\" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32" + > + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories="..\" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|x64" + ExcludedFromBuild="true" + > + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories="..\" + /> + </FileConfiguration> + </File> + <File + RelativePath="..\..\..\src\lasieve4\piii\medsched.c" + > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories="..\" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug|x64" + ExcludedFromBuild="true" + > + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories="..\" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32" + > + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories="..\" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|x64" + ExcludedFromBuild="true" + > + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories="..\" + /> + </FileConfiguration> + </File> + <File + RelativePath="..\..\..\src\lasieve4\piii\montgomery_mul.c" + > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories="..\" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug|x64" + ExcludedFromBuild="true" + > + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories="..\" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32" + > + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories="..\" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|x64" + ExcludedFromBuild="true" + > + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories="..\" + /> + </FileConfiguration> + </File> + <File + RelativePath="..\..\..\src\lasieve4\piii\psp.c" + > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories="..\" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug|x64" + ExcludedFromBuild="true" + > + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories="..\" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32" + > + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories="..\" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|x64" + ExcludedFromBuild="true" + > + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories="..\" + /> + </FileConfiguration> + </File> + <File + RelativePath="..\..\..\src\lasieve4\piii\siever-config.c" + > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories="..\" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug|x64" + ExcludedFromBuild="true" + > + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories="..\" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32" + > + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories="..\" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|x64" + ExcludedFromBuild="true" + > + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories="..\" + /> + </FileConfiguration> + </File> + </Filter> + </Filter> + <Filter + Name="Header Files" + > + <File + RelativePath="..\..\..\src\if.h" + > + </File> + <File + RelativePath="..\..\..\src\lasieve4\lasieve.h" + > + </File> + <File + RelativePath="..\..\..\src\lasieve4\piii\siever-config.h" + > + </File> + </Filter> + <Filter + Name="Assembler Files" + > + <File + RelativePath="..\..\..\src\lasieve4\piii\asm_mul128.asm" + > + <FileConfiguration + Name="Debug|x64" + ExcludedFromBuild="true" + > + <Tool + Name="YASM" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|x64" + ExcludedFromBuild="true" + > + <Tool + Name="YASM" + /> + </FileConfiguration> + </File> + <File + RelativePath="..\..\..\src\lasieve4\piii\asm_mul64.asm" + > + <FileConfiguration + Name="Debug|x64" + ExcludedFromBuild="true" + > + <Tool + Name="YASM" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|x64" + ExcludedFromBuild="true" + > + <Tool + Name="YASM" + /> + </FileConfiguration> + </File> + <File + RelativePath="..\..\..\src\lasieve4\piii\asm_mul96.asm" + > + <FileConfiguration + Name="Debug|x64" + ExcludedFromBuild="true" + > + <Tool + Name="YASM" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|x64" + ExcludedFromBuild="true" + > + <Tool + Name="YASM" + /> + </FileConfiguration> + </File> + <File + RelativePath="..\..\..\src\lasieve4\piii\modinv1002.asm" + > + <FileConfiguration + Name="Debug|x64" + ExcludedFromBuild="true" + > + <Tool + Name="YASM" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|x64" + ExcludedFromBuild="true" + > + <Tool + Name="YASM" + /> + </FileConfiguration> + </File> + <File + RelativePath="..\..\..\src\lasieve4\piii\mpqs_eval.asm" + > + <FileConfiguration + Name="Debug|x64" + ExcludedFromBuild="true" + > + <Tool + Name="YASM" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|x64" + ExcludedFromBuild="true" + > + <Tool + Name="YASM" + /> + </FileConfiguration> + </File> + <File + RelativePath="..\..\..\src\lasieve4\piii\mpqs_sieve.asm" + > + <FileConfiguration + Name="Debug|x64" + ExcludedFromBuild="true" + > + <Tool + Name="YASM" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|x64" + ExcludedFromBuild="true" + > + <Tool + Name="YASM" + /> + </FileConfiguration> + </File> + <File + RelativePath="..\..\..\src\lasieve4\piii\mpqs_td.asm" + > + <FileConfiguration + Name="Debug|x64" + ExcludedFromBuild="true" + > + <Tool + Name="YASM" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|x64" + ExcludedFromBuild="true" + > + <Tool + Name="YASM" + /> + </FileConfiguration> + </File> + <File + RelativePath="..\..\..\src\lasieve4\piii\ri-aux.asm" + > + <FileConfiguration + Name="Debug|x64" + ExcludedFromBuild="true" + > + <Tool + Name="YASM" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|x64" + ExcludedFromBuild="true" + > + <Tool + Name="YASM" + /> + </FileConfiguration> + </File> + <File + RelativePath="..\..\..\src\lasieve4\piii\sieve-from-sched.asm" + > + <FileConfiguration + Name="Debug|x64" + ExcludedFromBuild="true" + > + <Tool + Name="YASM" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|x64" + ExcludedFromBuild="true" + > + <Tool + Name="YASM" + /> + </FileConfiguration> + </File> + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Dig...@us...> - 2009-11-01 11:08:32
|
Revision: 372 http://ggnfs.svn.sourceforge.net/ggnfs/?rev=372&view=rev Author: DigitalParasite Date: 2009-11-01 11:08:25 +0000 (Sun, 01 Nov 2009) Log Message: ----------- Found by Lars Dausch, this finally removes the garbage output in the 64bit siever. Modified Paths: -------------- trunk/src/lasieve4/mpqs.c Modified: trunk/src/lasieve4/mpqs.c =================================================================== --- trunk/src/lasieve4/mpqs.c 2009-11-01 10:53:25 UTC (rev 371) +++ trunk/src/lasieve4/mpqs.c 2009-11-01 11:08:25 UTC (rev 372) @@ -1469,7 +1469,7 @@ } if (ulqx<1048576) { /*printf("%d ",x);*/ /* !!! */ if (ulqx<=mpqs_pmax) { - printf("%d %" PRIu64 " %u ",x,qx,ulqx); + /*printf("%d %" PRIu64 " %u ",x,qx,ulqx);*/ /* removes garbage output from 64bit siever */ return -1; /* CJM, 11/30/04. */ complain("dec.2\n"); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Dig...@us...> - 2009-11-01 10:53:35
|
Revision: 371 http://ggnfs.svn.sourceforge.net/ggnfs/?rev=371&view=rev Author: DigitalParasite Date: 2009-11-01 10:53:25 +0000 (Sun, 01 Nov 2009) Log Message: ----------- Updated so that 64bit Debug, 32bit Release & Debug ggnfslib projects to also use MPIR library instead of GMP for Windows VS build. Modified Paths: -------------- trunk/build.vc/vc9/ggnfslib/ggnfslib.vcproj Modified: trunk/build.vc/vc9/ggnfslib/ggnfslib.vcproj =================================================================== --- trunk/build.vc/vc9/ggnfslib/ggnfslib.vcproj 2009-10-30 02:07:48 UTC (rev 370) +++ trunk/build.vc/vc9/ggnfslib/ggnfslib.vcproj 2009-11-01 10:53:25 UTC (rev 371) @@ -77,7 +77,7 @@ /> <Tool Name="VCLibrarianTool" - AdditionalDependencies="..\..\..\..\gmp\build.vc9\lib\$(OutDir)\gmp.lib" + AdditionalDependencies="..\..\..\..\mpir\build.vc9\lib\$(OutDir)\mpir.lib" OutputFile="$(OutDir)\$(ProjectName).lib" /> <Tool @@ -152,7 +152,7 @@ /> <Tool Name="VCLibrarianTool" - AdditionalDependencies="..\..\..\..\gmp\build.vc9\lib\$(OutDir)\gmp.lib" + AdditionalDependencies="..\..\..\..\mpir\build.vc9\lib\$(OutDir)\mpir.lib" OutputFile="$(OutDir)\$(ProjectName).lib" /> <Tool @@ -225,7 +225,7 @@ /> <Tool Name="VCLibrarianTool" - AdditionalDependencies="..\..\..\..\gmp\build.vc9\lib\$(OutDir)\gmp.lib" + AdditionalDependencies="..\..\..\..\mpir\build.vc9\lib\$(OutDir)\mpir.lib" OutputFile="$(OutDir)\$(ProjectName).lib" AdditionalLibraryDirectories="" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ba...@us...> - 2009-10-30 02:07:57
|
Revision: 370 http://ggnfs.svn.sourceforge.net/ggnfs/?rev=370&view=rev Author: Batalov Date: 2009-10-30 02:07:48 +0000 (Fri, 30 Oct 2009) Log Message: ----------- mpqs will not fail on a prime square Modified Paths: -------------- trunk/src/experimental/lasieve4_64/athlon64/siever-config.h trunk/src/experimental/lasieve4_64/gnfs-lasieve4e.c Modified: trunk/src/experimental/lasieve4_64/athlon64/siever-config.h =================================================================== --- trunk/src/experimental/lasieve4_64/athlon64/siever-config.h 2009-10-29 05:23:37 UTC (rev 369) +++ trunk/src/experimental/lasieve4_64/athlon64/siever-config.h 2009-10-30 02:07:48 UTC (rev 370) @@ -20,7 +20,7 @@ void asm_getbc(u32_t,u32_t,u32_t,u32_t*,u32_t*,u32_t*,u32_t*); #define ASM_SCHEDSIEVE #define ASM_SCHEDTDSIEVE2 -u16_t**tdsieve_sched2buf(u16_t*,u16_t*,unsigned char*,u16_t**,u16_t**); +u16_t**tdsieve_sched2buf(u16_t**,u16_t*,unsigned char*,u16_t**,u16_t**); #define ASM_MPZ_TD #define PREINVERT Modified: trunk/src/experimental/lasieve4_64/gnfs-lasieve4e.c =================================================================== --- trunk/src/experimental/lasieve4_64/gnfs-lasieve4e.c 2009-10-29 05:23:37 UTC (rev 369) +++ trunk/src/experimental/lasieve4_64/gnfs-lasieve4e.c 2009-10-30 02:07:48 UTC (rev 370) @@ -2708,12 +2708,12 @@ tNow = sTime(); if (tNow > lastReport + 5.0) { lastReport = tNow; - fprintf(stderr, "\rtotal yield: %u, q=%u (%1.5lf sec/rel)", + fprintf(stderr, "\rtotal yield: %u, q=%u (%1.5lf sec/rel) ", (unsigned int)yield, (unsigned int)special_q, (tNow - tStart)/yield); fflush(stderr); } } - fprintf(stderr, "\rtotal yield: %u, q=%u (%1.5lf sec/rel)\n", + fprintf(stderr, "\rtotal yield: %u, q=%u (%1.5lf sec/rel) \n", (unsigned int)yield, (unsigned int)special_q, (sTime() - tStart)/yield); free(r); } @@ -3942,6 +3942,19 @@ mpz_neg(large_factors[s1],large_factors[s1]); if((nf= mpqs_factor(large_factors[s1],max_primebits[s1],&mf))<0) { + /* did it fail on a square? */ + mpz_sqrtrem(large_primes[s1][0],large_primes[s1][1],large_factors[s1]); + if(mpz_sgn(large_primes[s1][1]) == 0) { /* remainder == 0? */ + mpz_set(large_primes[s1][1],large_primes[s1][0]); + nlp[s1]= 2; + if(verbose) { + fprintf(stderr," mpqs on a prime square "); + mpz_out_str(stderr,10,large_primes[s1][0]); + fprintf(stderr,"^2 "); + } + continue; + } + if(verbose) { fprintf(stderr,"mpqs failed for "); mpz_out_str(stderr,10,large_factors[s1]); fprintf(stderr,"(a,b): "); @@ -3949,6 +3962,7 @@ fprintf(stderr," "); mpz_out_str(stderr,10,sr_b); fprintf(stderr,"\n"); + } n_mpqsfail[s1]++; break; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ba...@us...> - 2009-10-29 05:23:45
|
Revision: 369 http://ggnfs.svn.sourceforge.net/ggnfs/?rev=369&view=rev Author: Batalov Date: 2009-10-29 05:23:37 +0000 (Thu, 29 Oct 2009) Log Message: ----------- rint() is important. Read the source Modified Paths: -------------- trunk/src/experimental/lasieve4_64/redu2.c trunk/src/lasieve4/redu2.c Modified: trunk/src/experimental/lasieve4_64/redu2.c =================================================================== --- trunk/src/experimental/lasieve4_64/redu2.c 2009-09-16 02:54:59 UTC (rev 368) +++ trunk/src/experimental/lasieve4_64/redu2.c 2009-10-29 05:23:37 UTC (rev 369) @@ -11,7 +11,19 @@ { return x < 0.0 ? ceil(x) : floor(x); } + +__inline double rint(double x) +{ + double i, r = modf(x, &i); + if(r < 0.0) { + r += 1; i -= 1; + } + return (r > 0.5 || r == 0.5 && ((int)i & 1) ? i + 1.0 : i); +} #endif +/*=== IMPORTANT: rint() with a sentinel counter is safe */ +/* AND yields more relations than using trunc(). */ +/* A careful inspection is left as an excercise to the reader */ i32_t n_iter= 0; void @@ -34,7 +46,7 @@ if(a0sq<a1sq){ i32_t k; -k= (i32_t)trunc(s/a0sq); +k= (i32_t)rint(s/a0sq); if(k==0)break; a1-= k*a0; b1-= k*b0; @@ -43,7 +55,7 @@ }else{ i32_t k; -k= (i32_t)trunc(s/a1sq); +k= (i32_t)rint(s/a1sq); if(k==0)break; a0-= k*a1; b0-= k*b1; Modified: trunk/src/lasieve4/redu2.c =================================================================== --- trunk/src/lasieve4/redu2.c 2009-09-16 02:54:59 UTC (rev 368) +++ trunk/src/lasieve4/redu2.c 2009-10-29 05:23:37 UTC (rev 369) @@ -24,7 +24,19 @@ { return x < 0.0 ? ceil(x) : floor(x); } + +__inline double rint(double x) +{ + double i, r = modf(x, &i); + if(r < 0.0) { + r += 1; i -= 1; + } + return (r > 0.5 || r == 0.5 && ((int)i & 1) ? i + 1.0 : i); +} #endif +/*=== IMPORTANT: rint() with a sentinel counter is safe */ +/* AND yields more relations than using trunc(). */ +/* A careful inspection is left as an excercise to the reader */ i32_t n_iter = 0; @@ -49,7 +61,7 @@ i32_t k; assert(((s / a0sq) >= INT_MIN) && ((s / a0sq) <= INT_MAX)); - k = (i32_t)trunc(s / a0sq); + k = (i32_t)rint(s / a0sq); if (k == 0) break; a1 -= k * a0; @@ -60,7 +72,7 @@ i32_t k; assert(((s / a1sq) >= INT_MIN) && ((s / a1sq) <= INT_MAX)); - k = (i32_t)trunc(s / a1sq); + k = (i32_t)rint(s / a1sq); if (k == 0) break; a0 -= k * a1; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ba...@us...> - 2009-09-16 02:55:07
|
Revision: 368 http://ggnfs.svn.sourceforge.net/ggnfs/?rev=368&view=rev Author: Batalov Date: 2009-09-16 02:54:59 +0000 (Wed, 16 Sep 2009) Log Message: ----------- trunc patch to redu2.c Modified Paths: -------------- trunk/src/experimental/lasieve4_64/redu2.c Modified: trunk/src/experimental/lasieve4_64/redu2.c =================================================================== --- trunk/src/experimental/lasieve4_64/redu2.c 2009-09-16 02:10:41 UTC (rev 367) +++ trunk/src/experimental/lasieve4_64/redu2.c 2009-09-16 02:54:59 UTC (rev 368) @@ -6,6 +6,13 @@ #include "asm/siever-config.h" #include "redu2.h" +#ifdef _MSC_VER +__inline double trunc(double x) +{ + return x < 0.0 ? ceil(x) : floor(x); +} +#endif + i32_t n_iter= 0; void reduce2(i32_t*a0_ptr,i32_t*b0_ptr,i32_t*a1_ptr,i32_t*b1_ptr, @@ -27,7 +34,7 @@ if(a0sq<a1sq){ i32_t k; -k= rint(s/a0sq); +k= (i32_t)trunc(s/a0sq); if(k==0)break; a1-= k*a0; b1-= k*b0; @@ -36,7 +43,7 @@ }else{ i32_t k; -k= rint(s/a1sq); +k= (i32_t)trunc(s/a1sq); if(k==0)break; a0-= k*a1; b0-= k*b1; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Ba...@us...> - 2009-09-16 02:10:49
|
Revision: 367 http://ggnfs.svn.sourceforge.net/ggnfs/?rev=367&view=rev Author: Batalov Date: 2009-09-16 02:10:41 +0000 (Wed, 16 Sep 2009) Log Message: ----------- The forgotten patch for 16e Modified Paths: -------------- trunk/src/experimental/lasieve4_64/gnfs-lasieve4e.c Modified: trunk/src/experimental/lasieve4_64/gnfs-lasieve4e.c =================================================================== --- trunk/src/experimental/lasieve4_64/gnfs-lasieve4e.c 2009-08-30 15:16:53 UTC (rev 366) +++ trunk/src/experimental/lasieve4_64/gnfs-lasieve4e.c 2009-09-16 02:10:41 UTC (rev 367) @@ -147,7 +147,13 @@ u32_t fbis[2]; -static u32_t j_per_strip,jps_bits,jps_mask,n_strips; +#if I_bits<16 +static u32_t j_per_strip,jps_bits; +#else +#define j_per_strip 1 +#define jps_bits 0 +#endif +static u32_t n_strips; static struct schedule_struct{ u16_t***schedule; u32_t*fbi_bounds; @@ -996,9 +1002,10 @@ tiny_sieve_buffer= xmalloc(TINY_SIEVEBUFFER_SIZE); if(n_i> L1_SIZE) complain("Strip length %u exceeds L1 size %u\n",n_i,L1_SIZE); +#if I_bits<16 j_per_strip= L1_SIZE/n_i; jps_bits= L1_BITS-i_bits; - jps_mask= j_per_strip-1; +#endif if(j_per_strip!=1<<jps_bits) Schlendrian("Expected %u j per strip, calculated %u\n", j_per_strip,1<<jps_bits); @@ -2278,10 +2285,15 @@ p= x[0]; l= x[1]; d= x[2]; +#if I_bits<16 while(d<j_per_strip) { horizontal_sievesums[d]+= l; d+= p; } +#else + if(d==0) + *horizontal_sievesums += l; +#endif #if 0 x[2]= d-j_per_strip; #endif @@ -3715,8 +3727,8 @@ u16_t*x,j_step; j_step= j_per_strip-last_j; for(x= smallpsieve_aux[side];x<smallpsieve_aux_ub[side];x+= 3) { - modulo32= x[0]; - x[2]= modsub32(x[2],(j_step)%modulo32); + if((modulo32= x[0])) + x[2]= modsub32(x[2],(j_step)%modulo32); } } #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |