MIDAPACK - MIcrowave Data Analysis PACKage
1.1b
Parallel software tools for high performance CMB DA analysis
bitop.c
Go to the documentation of this file.
1
13
int
is_pow_2
(
int
n) {
return
((n & -n) ^ n); }
14
15
16
int
pow_2
(
int
k) {
17
int
n = 1;
18
while
(k != 0) {
19
n = n << 1;
20
k--;
21
}
22
return
n;
23
}
24
25
26
int
log_2
(
int
n) {
27
int
k = 0;
28
while
(n != 1 && k < 32) {
29
n = n >> 1;
30
k++;
31
}
32
return
k;
33
}
is_pow_2
int is_pow_2(int n)
Definition:
bitop.c:13
pow_2
int pow_2(int k)
Definition:
bitop.c:16
log_2
int log_2(int n)
Definition:
bitop.c:26
algebra
src
mapmat
bitop.c
Generated on Mon Jul 29 2024 17:03:30 for MIDAPACK - MIcrowave Data Analysis PACKage by
1.9.1