satsolver
0.17.2
Main Page
Related Pages
Classes
Files
File List
File Members
src
poolarch.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2007, Novell Inc.
3
*
4
* This program is licensed under the BSD license, read LICENSE.BSD
5
* for further information
6
*/
7
8
#ifndef SATSOLVER_POOLARCH_H
9
#define SATSOLVER_POOLARCH_H
10
11
#include "
pool.h
"
12
13
extern
void
pool_setarch
(
Pool
*,
const
char
*);
14
extern
void
pool_setarchpolicy
(
Pool
*,
const
char
*);
15
extern
unsigned
char
pool_arch2color_slow
(
Pool
*pool,
Id
arch);
16
17
#define ARCHCOLOR_32 1
18
#define ARCHCOLOR_64 2
19
#define ARCHCOLOR_ALL 255
20
21
static
inline
unsigned
char
pool_arch2color
(
Pool
*pool,
Id
arch)
22
{
23
if
(arch > pool->
lastarch
)
24
return
ARCHCOLOR_ALL
;
25
if
(pool->
id2color
&& pool->
id2color
[arch])
26
return
pool->
id2color
[arch];
27
return
pool_arch2color_slow
(pool, arch);
28
}
29
30
static
inline
int
pool_colormatch
(
Pool
*pool,
Solvable
*s1,
Solvable
*s2)
31
{
32
if
(s1->
arch
== s2->
arch
)
33
return
1;
34
if
((
pool_arch2color
(pool, s1->
arch
) &
pool_arch2color
(pool, s2->
arch
)) != 0)
35
return
1;
36
return
0;
37
}
38
39
#endif
/* SATSOLVER_POOLARCH_H */
Generated by
1.8.4