mirror of
https://github.com/Z3Prover/z3
synced 2025-06-09 07:33:24 +00:00
Fix cygwin (with python 2.6) compilation problems.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
4a57050380
commit
3ae01cf619
2 changed files with 11 additions and 8 deletions
|
@ -1617,6 +1617,9 @@ PYG_GLOBALS = { 'UINT' : UINT, 'BOOL' : BOOL, 'DOUBLE' : DOUBLE, 'STRING' : STRI
|
||||||
'def_module_params' : def_module_params }
|
'def_module_params' : def_module_params }
|
||||||
|
|
||||||
def _execfile(file, globals=globals(), locals=locals()):
|
def _execfile(file, globals=globals(), locals=locals()):
|
||||||
|
if sys.version < "2.7":
|
||||||
|
execfile(file, globals, locals)
|
||||||
|
else:
|
||||||
with open(file, "r") as fh:
|
with open(file, "r") as fh:
|
||||||
exec(fh.read()+"\n", globals, locals)
|
exec(fh.read()+"\n", globals, locals)
|
||||||
|
|
||||||
|
|
|
@ -75,14 +75,14 @@ void mpz_matrix_manager::set(mpz_matrix & A, mpz_matrix const & B) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void mpz_matrix_manager::tensor_product(mpz_matrix const & A, mpz_matrix const & B, mpz_matrix & C) {
|
void mpz_matrix_manager::tensor_product(mpz_matrix const & A, mpz_matrix const & B, mpz_matrix & C) {
|
||||||
scoped_mpz_matrix _C(*this);
|
scoped_mpz_matrix CC(*this);
|
||||||
mk(A.m * B.m, A.n * B.n, _C);
|
mk(A.m * B.m, A.n * B.n, CC);
|
||||||
for (unsigned i = 0; i < _C.m(); i++)
|
for (unsigned i = 0; i < CC.m(); i++)
|
||||||
for (unsigned j = 0; j < _C.n(); j++)
|
for (unsigned j = 0; j < CC.n(); j++)
|
||||||
nm().mul(A(i / B.m, j / B.n),
|
nm().mul(A(i / B.m, j / B.n),
|
||||||
B(i % B.m, j % B.n),
|
B(i % B.m, j % B.n),
|
||||||
_C(i, j));
|
CC(i, j));
|
||||||
C.swap(_C);
|
C.swap(CC);
|
||||||
}
|
}
|
||||||
|
|
||||||
void mpz_matrix_manager::swap_rows(mpz_matrix & A, unsigned i, unsigned j) {
|
void mpz_matrix_manager::swap_rows(mpz_matrix & A, unsigned i, unsigned j) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue