diff options
Diffstat (limited to 'threadtest.py')
-rw-r--r-- | threadtest.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/threadtest.py b/threadtest.py index 08a1b42..0111bc7 100644 --- a/threadtest.py +++ b/threadtest.py @@ -12,7 +12,7 @@ jobs = Queue() output = Queue() def create_job(position=(0,0,0), nphotons=10000, max_steps=10): - positions = np.tile(gpuarray.vec.make_float3(*position), (nphotons,1)) + positions = np.tile(position, nphotons).reshape((nphotons, 3)) directions = uniform_sphere(nphotons) polarizations = uniform_sphere(nphotons) wavelengths = np.random.uniform(200, 800, size=nphotons) @@ -23,7 +23,6 @@ def create_job(position=(0,0,0), nphotons=10000, max_steps=10): return Job(positions, directions, wavelengths, polarizations, times, states, last_hit_triangles, max_steps) -#@profile def generate_event(position=(0,0,0), nphotons=10000): jobs.put(create_job(position, nphotons)) jobs.join() @@ -48,7 +47,6 @@ def generate_event(position=(0,0,0), nphotons=10000): return np.array(event_times) -#@profile def likelihood(event_times, position=(0,0,0), nphotons=10000, neval=100): for i in range(neval): jobs.put(create_job(position, nphotons)) |