39 {0x00000000, 0x00000001},
40 {0x00000000, 0x00000002},
41 {0x00000000, 0x00000004},
42 {0x00000000, 0x00000008},
43 {0x00000000, 0x00000010},
44 {0x00000000, 0x00000020},
45 {0x00000000, 0x00000040},
46 {0x00000000, 0x00000080},
47 {0x00000000, 0x00000100},
48 {0x00000000, 0x00000200},
49 {0x00000000, 0x00000400},
50 {0x00000000, 0x00000800},
51 {0x00000000, 0x00001000},
52 {0x00000000, 0x00002000},
53 {0x00000000, 0x00004000},
54 {0x00000000, 0x00008000},
55 {0x00000000, 0x00010000},
56 {0x00000000, 0x00020000},
57 {0x00000000, 0x00040000},
58 {0x00000000, 0x00080000},
59 {0x00000000, 0x00100000},
60 {0x00000000, 0x00200000},
61 {0x00000000, 0x00400000},
62 {0x00000000, 0x00800000},
63 {0x00000000, 0x01000000},
64 {0x00000000, 0x02000000},
65 {0x00000000, 0x04000000},
66 {0x00000000, 0x08000000},
67 {0x00000000, 0x10000000},
68 {0x00000000, 0x20000000},
69 {0x00000000, 0x40000000},
70 {0x00000000, 0x80000000}
76 assert(inp !=
NULL || count == 0);
77 assert(out !=
NULL || count == 0);
79 assert(packetsize == 32);
81 rest = count % packetsize;
84 for(
int i = 0; i < nfull; i += packetsize )
91 for(
int j = 0; j < packetsize; ++j )
92 assert(0 <= inp[j] && inp[j] <= 1);
96 mask[0][inp[0]] | mask[1][inp[1]] | mask[2][inp[2]] | mask[3][inp[3]]
97 | mask[4][inp[4]] | mask[5][inp[5]] | mask[6][inp[6]] | mask[7][inp[7]]
98 | mask[8][inp[8]] | mask[9][inp[9]] | mask[10][inp[10]] | mask[11][inp[11]]
99 | mask[12][inp[12]] | mask[13][inp[13]] | mask[14][inp[14]] | mask[15][inp[15]]
100 | mask[16][inp[16]] | mask[17][inp[17]] | mask[18][inp[18]] | mask[19][inp[19]]
101 | mask[20][inp[20]] | mask[21][inp[21]] | mask[22][inp[22]] | mask[23][inp[23]]
102 | mask[24][inp[24]] | mask[25][inp[25]] | mask[26][inp[26]] | mask[27][inp[27]]
103 | mask[28][inp[28]] | mask[29][inp[29]] | mask[30][inp[30]] | mask[31][inp[31]];
115 for(
int i = 0; i < rest; i++ )
116 m |= mask[i][inp[i]];
133 assert(inp !=
NULL || count == 0);
134 assert(out !=
NULL || count == 0);
139 nfull = count - rest;
220 for( i = 0; i < rest; i++ )
236 {0x00000000, 0x00000001, 0x00000002, 0x00000003},
237 {0x00000000, 0x00000004, 0x00000008, 0x0000000C},
238 {0x00000000, 0x00000010, 0x00000020, 0x00000030},
239 {0x00000000, 0x00000040, 0x00000080, 0x000000C0},
240 {0x00000000, 0x00000100, 0x00000200, 0x00000300},
241 {0x00000000, 0x00000400, 0x00000800, 0x00000C00},
242 {0x00000000, 0x00001000, 0x00002000, 0x00003000},
243 {0x00000000, 0x00004000, 0x00008000, 0x0000C000},
244 {0x00000000, 0x00010000, 0x00020000, 0x00030000},
245 {0x00000000, 0x00040000, 0x00080000, 0x000C0000},
246 {0x00000000, 0x00100000, 0x00200000, 0x00300000},
247 {0x00000000, 0x00400000, 0x00800000, 0x00C00000},
248 {0x00000000, 0x01000000, 0x02000000, 0x03000000},
249 {0x00000000, 0x04000000, 0x08000000, 0x0C000000},
250 {0x00000000, 0x10000000, 0x20000000, 0x30000000},
251 {0x00000000, 0x40000000, 0x80000000, 0xC0000000}
257 assert(inp !=
NULL || count == 0);
258 assert(out !=
NULL || count == 0);
260 assert(dualpacketsize == 16);
262 rest = count % dualpacketsize;
263 nfull = count - rest;
265 for(
int i = 0; i < nfull; i += dualpacketsize, inp += dualpacketsize )
272 for(
int j = 0; j < dualpacketsize; ++j )
273 assert(0 <= inp[j] && inp[j] <= 3);
277 mask[0][inp[0]] | mask[1][inp[1]] | mask[2][inp[2]] | mask[3][inp[3]]
278 | mask[4][inp[4]] | mask[5][inp[5]] | mask[6][inp[6]]
279 | mask[7][inp[7]] | mask[8][inp[8]] | mask[9][inp[9]]
280 | mask[10][inp[10]] | mask[11][inp[11]] | mask[12][inp[12]]
281 | mask[13][inp[13]] | mask[14][inp[14]] | mask[15][inp[15]];
292 for(
int i = 0; i < rest; i++ )
293 m |= mask[i][inp[i]];
310 assert(inp !=
NULL || count == 0);
311 assert(out !=
NULL || count == 0);
316 nfull = count - rest;
365 for( i = 0; i < rest; i++ )
void SCIPdecodeDualBit(const SCIP_DUALPACKET *inp, int *out, int count)
void SCIPencodeSingleBit(const int *inp, SCIP_SINGLEPACKET *out, int count)
packing single and dual bit values
void SCIPdecodeSingleBit(const SCIP_SINGLEPACKET *inp, int *out, int count)
void SCIPencodeDualBit(const int *inp, SCIP_DUALPACKET *out, int count)
unsigned int SCIP_DUALPACKET
#define SCIP_SINGLEPACKETSIZE
#define SCIP_DUALPACKETSIZE
unsigned int SCIP_SINGLEPACKET
common defines and data types used in all packages of SCIP