Changeset b093c1c in sasmodels for sasmodels/kernelcl.py
- Timestamp:
- Oct 30, 2018 8:53:04 AM (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:
- 8064d5e
- Parents:
- f31815d (diff), c6084f1 (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/kernelcl.py
rd86f0fc rf31815d 56 56 import time 57 57 58 try: 59 from time import perf_counter as clock 60 except ImportError: # CRUFT: python < 3.3 61 import sys 62 if sys.platform.count("darwin") > 0: 63 from time import time as clock 64 else: 65 from time import clock 66 58 67 import numpy as np # type: ignore 59 60 68 61 69 # Attempt to setup opencl. This may fail if the opencl package is not … … 575 583 # Call kernel and retrieve results 576 584 wait_for = None 577 last_nap = time.clock()585 last_nap = clock() 578 586 step = 1000000//self.q_input.nq + 1 579 587 for start in range(0, call_details.num_eval, step): … … 586 594 # Allow other processes to run 587 595 wait_for[0].wait() 588 current_time = time.clock()596 current_time = clock() 589 597 if current_time - last_nap > 0.5: 590 598 time.sleep(0.05)
Note: See TracChangeset
for help on using the changeset viewer.