Changeset 6a0d6aa in sasmodels
- Timestamp:
- Jul 21, 2016 5:42:33 PM (8 years ago)
- Branches:
- master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 9eb3632
- Parents:
- b966a96
- Location:
- sasmodels
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/kernel_template.c
r5efe850 r6a0d6aa 32 32 #define NEED_EXPM1 33 33 #define NEED_TGAMMA 34 #define NEED_ERF 34 35 #else 35 36 #define kernel extern "C" … … 50 51 #define NEED_EXPM1 51 52 #define NEED_TGAMMA 53 #define NEED_ERF 52 54 #else 53 55 #include <tgmath.h> // C99 type-generic math, so sin(float) => sinf -
sasmodels/sasview_model.py
r32e3c9b r6a0d6aa 503 503 to the card for each evaluation. 504 504 """ 505 #core.HAVE_OPENCL = False 505 506 if self._model is None: 506 507 self._model = core.build_model(self._model_info) … … 510 511 q_vectors = [np.asarray(qx)] 511 512 calculator = self._model.make_kernel(q_vectors) 512 pairs = [self._get_weights(p) 513 for p in self._model_info.parameters.call_parameters] 514 call_details, value = kernel.build_details(calculator, pairs) 515 result = calculator(call_details, value, cutoff=self.cutoff, magnetic=False) 513 parameters = self._model_info.parameters 514 pairs = [self._get_weights(p) for p in parameters.call_parameters] 515 call_details, values = kernel.build_details(calculator, pairs) 516 # TODO: should test for 2d? 517 magnetic = any(values[k]!=0 for k in parameters.magnetism_index) 518 result = calculator(call_details, values, cutoff=self.cutoff, 519 magnetic=magnetic) 516 520 calculator.release() 517 521 return result
Note: See TracChangeset
for help on using the changeset viewer.