-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.h
56 lines (46 loc) · 1003 Bytes
/
main.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#ifndef INTERFACE_H
#define INTERFACE_H
//#include <stdio.h>
//#include <stdlib.h>
//#include <iostream>
#include <pari/pari.h>
#include <math.h>
// Macros
#ifndef MY_EXTERNAL_DEFINE
#define FASTPRECISION 4
#define THREADS 31576
#endif
// Allocation type
typedef enum n_type
{
COMPOSITE = 1,
PRIME = 0,
};
typedef struct {
GEN **a;
GEN *x;
GEN *q;
GEN *n;
int *results;
} c_arg_package;
// APIs
int aks(GEN n);
GEN smallestR(GEN n);
int divisibility_check(GEN n, GEN r);
int step5_rename(GEN n, GEN r);
int main(int argc, char* argv[]);
void* inc_thread_nr(void* arg);
void _maxthread();
#define max(a,b) \
({ \
__typeof__ (a) _a = (a); \
__typeof__ (b) _b = (b); \
_a > _b ? _a : _b; \
})
#define min(a,b) \
({ \
__typeof__ (a) _a = (a); \
__typeof__ (b) _b = (b); \
_a < _b ? _a : _b; \
})
#endif