Skip to content

Commit 5e485df

Browse files
committed
GWnum 30.7
1 parent 89c620e commit 5e485df

File tree

8 files changed

+412
-369
lines changed

8 files changed

+412
-369
lines changed

src/Llr.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
/* Constants */
55

6-
#define LLR_VERSION "1.1.1"
7-
#define LLR_VERSIONC 1,1,1
6+
#define LLR_VERSION "1.2.0"
7+
#define LLR_VERSIONC 1,2,0
88

99
/* Global variables */
1010

src/gwnum/gwnum.h

Lines changed: 389 additions & 352 deletions
Large diffs are not rendered by default.

src/gwnum/gwtables.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
| This file contains various utility routines that may be used by gwnum
33
| setup.
44
|
5-
| Copyright 2011-2020 Mersenne Research, Inc. All rights reserved.
5+
| Copyright 2011-2021 Mersenne Research, Inc. All rights reserved.
66
+---------------------------------------------------------------------*/
77

88
#ifndef _GWTABLES_H
@@ -124,7 +124,7 @@ struct gwasm_data {
124124
void *sincos5;
125125
gwthread hyperthread_id; /* Thread ID of prefetching hyperthread */
126126
gwevent hyperthread_work_to_do; /* Event to signal hyperthread to begin prefetching */
127-
void *UNUSED_PTRS[1];
127+
void *SRC3ARG; /* Function argument */
128128
uint32_t *ASM_TIMERS; /* Timers used for optimizing code */
129129

130130
uint32_t COPYZERO[8]; /* Offsets to help in gwcopyzero */

src/gwnum/gwutil.h

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
| This file contains various utility routines that may be used by gwnum
33
| routines, prime95, or other consumers of gwnum.
44
|
5-
| Copyright 2004-2020 Mersenne Research, Inc. All rights reserved.
5+
| Copyright 2004-2021 Mersenne Research, Inc. All rights reserved.
66
+---------------------------------------------------------------------*/
77

88
#ifndef _GWUTIL_H
@@ -17,12 +17,12 @@ extern "C" {
1717

1818
/* Handy macros to improve readability */
1919

20-
#define CONST_LOG2 0.69314718055994530941723212145818
21-
#define CONST_ONE_OVER_LOG2 1.4426950408889634073599246810019
22-
#define log2(n) (log((double)(n)) * CONST_ONE_OVER_LOG2)
23-
#define log2f(n) (logf((float)(n)) * (float) CONST_ONE_OVER_LOG2)
24-
#define logb(n) (log((double)(n)) / log ((double)(b)))
25-
#define divide_rounding_up(a,b) ((a + (b) - 1) / (b))
20+
//These are now included in math.h
21+
//#define CONST_LOG2 0.69314718055994530941723212145818
22+
//#define CONST_ONE_OVER_LOG2 1.4426950408889634073599246810019
23+
//#define log2(n) (log((double)(n)) * CONST_ONE_OVER_LOG2)
24+
//#define log2f(n) (logf((float)(n)) * (float) CONST_ONE_OVER_LOG2)
25+
#define divide_rounding_up(a,b) (((a) + (b) - 1) / (b))
2626
#define divide_rounding_down(a,b) ((a) / (b))
2727
#define round_up_to_multiple_of(a,b) (divide_rounding_up (a, b) * (b))
2828
#define round_down_to_multiple_of(a,b) (divide_rounding_down (a, b) * (b))
@@ -39,11 +39,7 @@ extern "C" {
3939

4040
/* Align a pointer to the given boundary (boundary must be a power of 2) */
4141

42-
#ifdef _WIN64
43-
#define align_ptr(p,n) (void *) (((uint64_t)(p) + (n)-1) & ~((n)-1))
44-
#else
45-
#define align_ptr(p,n) (void *) (((long)(p) + (n)-1) & ~((n)-1))
46-
#endif
42+
#define align_ptr(p,n) (void *) (((intptr_t)(p) + (n)-1) & ~((n)-1))
4743

4844
/* Aligned malloc routines. MSVC 8 supports these in the C runtime library. */
4945
/* Emulate these routines for other ports. */
@@ -57,6 +53,9 @@ void aligned_free (void *ptr);
5753
int large_pages_supported ();
5854
void * large_pages_malloc (size_t size);
5955
void large_pages_free (void *ptr);
56+
void * aligned_offset_large_pages_malloc (size_t size, size_t alignment, size_t mod);
57+
void * aligned_large_pages_malloc (size_t size, size_t alignment);
58+
void aligned_large_pages_free (void *ptr);
6059

6160
/* Utility string routines */
6261

src/gwnum/linux64/gwnum.a

164 KB
Binary file not shown.

src/gwnum/win64/gwnum64.lib

69 KB
Binary file not shown.

src/lprime.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,13 @@ int main (
214214
(void)signal(SIGTERM, sigterm_handler);
215215
(void)signal(SIGINT, sigterm_handler);
216216

217+
/* suppress assert() window */
218+
219+
#if defined(_MSC_VER) && !defined(_DEBUG)
220+
_set_error_mode(_OUT_TO_STDERR);
221+
_set_abort_behavior(0, _CALL_REPORTFAULT);
222+
#endif
223+
217224
/* Process command line switches */
218225

219226
for (i = 1; i < argc; i++) {

src/test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2406,6 +2406,7 @@ struct KBNTest TestGFN13[] = {
24062406
{ 1, 995766, 8192, 0xE6BE4C71A27EB26AULL, 0x4A68173579E55EB1ULL },
24072407
{ 1, 1013856, 8192, 0x4980E196738F7945ULL, 0x2C2BF81690537DA9ULL },
24082408
{ 1, 1031814, 8192, 0xF69D385EFD328C4BULL, 0x528129EE0CADFEF1ULL },
2409+
{ 1, 1034546, 8192, 0x0AFF1BE76F82FB30ULL, 0x3EB5267EEDC5D167ULL },
24092410
{ 1, 1049514, 8192, 0xCA058B0C619A1903ULL, 0xA457E756C169D0BEULL },
24102411
{ 1, 1067244, 8192, 0x1907760B4930738AULL, 0x94E879324024C36CULL },
24112412
{ 1, 1085262, 8192, 0x9D6C61101B0DF559ULL, 0xFB3DB4FD3B6F3C1BULL },
@@ -3559,7 +3560,6 @@ struct KBNTest TestGFN13More[] = {
35593560
{ 1, 1030888, 8192, 0x10F896E076EA19C3ULL, 0xC1D5F4F0CE82E575ULL },
35603561
{ 1, 1032782, 8192, 0x6C09FBEDE87BC8FEULL, 0xDEF2DB895859ED27ULL },
35613562
{ 1, 1033652, 8192, 0xD185D5D616F05681ULL, 0xA0554D9C70856CA1ULL },
3562-
{ 1, 1034546, 8192, 0x0AFF1BE76F82FB30ULL, 0x3EB5267EEDC5D167ULL },
35633563
{ 1, 1035382, 8192, 0x6D0FB0E098E51713ULL, 0x478D96FAD297D6FEULL },
35643564
{ 1, 1036270, 8192, 0xE4E686B0636BE6DCULL, 0xA34D6218650966E4ULL },
35653565
{ 1, 1037160, 8192, 0x516F1BA93D5484ACULL, 0xFEDA55A08C79CBD3ULL },

0 commit comments

Comments
 (0)