Changeset b8ddf2e in sasmodels
- Timestamp:
- Feb 7, 2017 12:34:29 PM (8 years ago)
- Branches:
- master, core_shell_microgels, costrafo411, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- d2b939c
- Parents:
- 96c2b98
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/kernelcl.py
r96c2b98 rb8ddf2e 464 464 # architectures tested so far. 465 465 if self.is_2d: 466 # Note: 17 rather than 15 because results is 2 elements 467 # longer than input. 468 width = ((self.nq+17)//16)*16 466 # Note: 16 rather than 15 because result is 1 longer than input. 467 width = ((self.nq+16)//16)*16 469 468 self.q = np.empty((width, 2), dtype=dtype) 470 469 self.q[:self.nq, 0] = q_vectors[0] 471 470 self.q[:self.nq, 1] = q_vectors[1] 472 471 else: 473 # Note: 33 rather than 31 because results is 2 elements 474 # longer than input. 475 width = ((self.nq+33)//32)*32 472 # Note: 32 rather than 31 because result is 1 longer than input. 473 width = ((self.nq+32)//32)*32 476 474 self.q = np.empty(width, dtype=dtype) 477 475 self.q[:self.nq] = q_vectors[0] … … 523 521 self.dim = '2d' if q_input.is_2d else '1d' 524 522 # plus three for the normalization values 525 self.result = np.empty(q_input.nq+ 3, dtype)523 self.result = np.empty(q_input.nq+1, dtype) 526 524 527 525 # Inputs and outputs for each kernel call … … 530 528 self.queue = env.get_queue(dtype) 531 529 532 q_size = max(len(self.result), q_input.global_size[0])533 530 self.result_b = cl.Buffer(self.queue.context, mf.READ_WRITE, 534 q_ size* dtype.itemsize)531 q_input.global_size[0] * dtype.itemsize) 535 532 self.q_input = q_input # allocated by GpuInput above 536 533
Note: See TracChangeset
for help on using the changeset viewer.