3#include "factory/factoryconf.h"
8 const unsigned int b[] = {0x2, 0xC, 0xF0, 0xFF00, 0xFFFF0000};
9 const unsigned int S[] = {1, 2, 4, 8, 16};
12 if (
v &
b[4]) {
v >>= S[4]; r |= S[4]; }
13 if (
v &
b[3]) {
v >>= S[3]; r |= S[3]; }
14 if (
v &
b[2]) {
v >>= S[2]; r |= S[2]; }
15 if (
v &
b[1]) {
v >>= S[1]; r |= S[1]; }
16 if (
v &
b[0]) {
v >>= S[0]; r |= S[0]; }
20#define SI_LOG2_LONG(A) SI_LOG2(A)
24 const unsigned long b[] = {0x2, 0xC, 0xF0, 0xFF00, 0xFFFF0000, 0xFFFFFFFF00000000UL};
25 const unsigned int S[] = {1, 2, 4, 8, 16, 32};
28 if (
v &
b[5]) {
v >>= S[5]; r |= S[5]; }
29 if (
v &
b[4]) {
v >>= S[4]; r |= S[4]; }
30 if (
v &
b[3]) {
v >>= S[3]; r |= S[3]; }
31 if (
v &
b[2]) {
v >>= S[2]; r |= S[2]; }
32 if (
v &
b[1]) {
v >>= S[1]; r |= S[1]; }
33 if (
v &
b[0]) {
v >>= S[0]; r |= S[0]; }
const Variable & v
< [in] a sqrfree bivariate poly
static int SI_LOG2(int v)
static int SI_LOG2_LONG(long v)