Changeset 96c2b98 in sasmodels


Ignore:
Timestamp:
Nov 11, 2016 6:47:42 AM (8 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
b8ddf2e
Parents:
0e0e867
Message:

Allow for (rare) cases where the size of q_input is smaller than results. Fixes #794

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/kernelcl.py

    r6e5b2a7 r96c2b98  
    530530        self.queue = env.get_queue(dtype) 
    531531 
     532        q_size = max(len(self.result), q_input.global_size[0]) 
    532533        self.result_b = cl.Buffer(self.queue.context, mf.READ_WRITE, 
    533                                   q_input.global_size[0] * dtype.itemsize) 
     534                                  q_size * dtype.itemsize) 
    534535        self.q_input = q_input # allocated by GpuInput above 
    535536 
Note: See TracChangeset for help on using the changeset viewer.