@@ -34,7 +34,7 @@ typedef struct {
34
34
t_ = n1; n1 = n2; n2 = t_; \
35
35
t_ = m1; m1 = m2; m2 = t_; }
36
36
37
- static int is_admissible (uint32_t nc , uint32_t * cl ) {
37
+ static int is_admissible (uint32_t nc , const uint32_t * cl ) {
38
38
uint32_t i , j , c ;
39
39
char rset [sprimes [NSMALLPRIMES - 1 ]];
40
40
@@ -54,7 +54,7 @@ static int is_admissible(uint32_t nc, uint32_t* cl) {
54
54
}
55
55
56
56
/* Given p prime, is this a cluster? */
57
- static int is_cluster (UV p , uint32_t nc , uint32_t * cl ) {
57
+ static int is_cluster (UV p , uint32_t nc , const uint32_t * cl ) {
58
58
uint32_t c ;
59
59
for (c = 1 ; c < nc ; c ++ )
60
60
if (!is_prob_prime (p + cl [c ]))
@@ -63,7 +63,7 @@ static int is_cluster(UV p, uint32_t nc, uint32_t* cl) {
63
63
}
64
64
65
65
/* This is fine for small ranges. Low overhead. */
66
- UV * sieve_cluster_simple (UV beg , UV end , uint32_t nc , uint32_t * cl , UV * numret )
66
+ UV * sieve_cluster_simple (UV beg , UV end , uint32_t nc , const uint32_t * cl , UV * numret )
67
67
{
68
68
vlist retlist ;
69
69
@@ -108,7 +108,7 @@ UV* sieve_cluster_simple(UV beg, UV end, uint32_t nc, uint32_t* cl, UV* numret)
108
108
109
109
#define addmodded (r ,a ,b ,n ) do { r = a + b; if (r >= n) r -= n; } while(0)
110
110
111
- UV * sieve_cluster (UV low , UV high , uint32_t nc , uint32_t * cl , UV * numret )
111
+ UV * sieve_cluster (UV low , UV high , uint32_t nc , const uint32_t * cl , UV * numret )
112
112
{
113
113
vlist retlist ;
114
114
UV i , ppr , nres , allocres ;
0 commit comments