PLASMA  2.4.5
PLASMA - Parallel Linear Algebra for Scalable Multi-core Architectures
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
primes.h
Go to the documentation of this file.
1 
19 #ifndef PRIMES_H
20 #define PRIMES_H
21 
22 #define IMBALANCE_THRESHOLD 10
23 #define PWR_MAXSIZE 32
24 #define PRIME_MAXSIZE 10
25 #define SIZE_MG 1024
26 #define SIZE_LEADERS 1023
27 
28 #ifndef min
29 #define min(a,b) ((a<b)?a:b)
30 #endif
31 
32 #ifndef max
33 #define max(a,b) ((a>b)?a:b)
34 #endif
35 
36 struct primedec
37 {
38  int p;
39  int e;
40  int pe;
41 };
42 
43 typedef struct primedec primedec_t;
44 
45 int lcm(int a, int b);
46 int gcd(int a, int b);
47 int modpow(int x, int n, int m);
48 void factor(int n, primedec_t *pr, int *nf);
49 
50 int minloc(int n, int *T);
51 int64_t maxval(int n, int *T);
52 int64_t sum (int n, int *T);
53 
54 #endif /* PRIMES_H */