Reorganize headers again

This commit is contained in:
Nils O. Selåsdal
2012-11-15 18:26:03 +01:00
parent 4dca24953f
commit 61eda493bf
23 changed files with 2341 additions and 0 deletions
+39
View File
@@ -0,0 +1,39 @@
#ifndef UCORE_MATH_H_
#define UCORE_MATH_H_
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
uint32_t
uc_gcd_32(uint32_t a, uint32_t b);
uint64_t
uc_gcd_64(uint64_t a, uint64_t b);
uint32_t
uc_phi_32(uint32_t N);
uint64_t
uc_phi_64(uint64_t N);
static inline uint32_t
uc_nextpow2(uint32_t x)
{
x--;
x |= x >> 1;
x |= x >> 2;
x |= x >> 4;
x |= x >> 8;
x |= x >> 16;
x++;
return x;
}
#ifdef __cplusplus
}
#endif
#endif