# HG changeset patch
# User R. Andrew Ohana <andrew.ohana@gmail.com>
# Date 1338070846 25200
# Node ID 7a30f7caa8134874c8381cf0e20ec59cdd376945
# Parent 7e53dee0ce5cf2da112447be22b5ef2723b849d2
[mq]: dumb_code.patch
diff --git a/module_list.py b/module_list.py
a
|
b
|
|
2021 | 2021 | |
2022 | 2022 | Extension('sage.tests.cython', |
2023 | 2023 | sources = ['sage/tests/cython.pyx']), |
| 2024 | |
| 2025 | Extension('sage.dumb', sources=['sage/dumb.pyx'], extra_compile_args=['-fopenmp'], extra_link_args=['-fopenmp']), |
2024 | 2026 | |
2025 | 2027 | ################################ |
2026 | 2028 | ## |
diff --git a/sage/all.py b/sage/all.py
a
|
b
|
|
166 | 166 | |
167 | 167 | from sage.matroids.all import * |
168 | 168 | |
| 169 | from sage.dumb import * |
| 170 | |
169 | 171 | from copy import copy, deepcopy |
170 | 172 | |
171 | 173 | # The code executed here uses a large amount of Sage components |
diff --git a/sage/dumb.pyx b/sage/dumb.pyx
new file mode 100644
-
|
+
|
|
| 1 | from cython.parallel import prange |
| 2 | |
| 3 | include 'ext/interrupt.pxi' |
| 4 | |
| 5 | def dumb_function(): |
| 6 | cdef int i,x |
| 7 | sig_on() |
| 8 | while True: |
| 9 | for i in prange(1<<30,nogil=True): |
| 10 | x += i |
| 11 | sig_off() |
| 12 | return x |