Changeset e589e9a in sasmodels for sasmodels/kernelcl.py
- Timestamp:
- Mar 5, 2019 12:36:34 PM (5 years ago)
- Branches:
- master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 3b6567f, bd91e8f, c11d09f, 9150036
- Parents:
- a8a1d48 (diff), 8064d5e (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - git-author:
- Paul Butler <butlerpd@…> (03/05/19 12:36:34)
- git-committer:
- GitHub <noreply@…> (03/05/19 12:36:34)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/kernelcl.py
rf872fd1 r8064d5e 58 58 import time 59 59 60 try: 61 from time import perf_counter as clock 62 except ImportError: # CRUFT: python < 3.3 63 import sys 64 if sys.platform.count("darwin") > 0: 65 from time import time as clock 66 else: 67 from time import clock 68 60 69 import numpy as np # type: ignore 61 62 70 63 71 # Attempt to setup opencl. This may fail if the pyopencl package is not … … 611 619 #Call kernel and retrieve results 612 620 wait_for = None 613 last_nap = time.clock()621 last_nap = clock() 614 622 step = 1000000//self.q_input.nq + 1 615 623 for start in range(0, call_details.num_eval, step): … … 622 630 # Allow other processes to run 623 631 wait_for[0].wait() 624 current_time = time.clock()632 current_time = clock() 625 633 if current_time - last_nap > 0.5: 626 634 time.sleep(0.001)
Note: See TracChangeset
for help on using the changeset viewer.