Changeset 0b082f3 in sasview


Ignore:
Timestamp:
Dec 8, 2011 4:50:20 PM (12 years ago)
Author:
Mathieu Doucet <doucetm@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
01de557
Parents:
0438933
Message:

Re #7 Enable openmp for all models

Location:
sansmodels
Files:
52 edited

Legend:

Unmodified
Added
Removed
  • sansmodels/setup.py

    rf9303b6 r0b082f3  
    55import sys 
    66import os 
     7import platform 
    78from numpy.distutils.misc_util import get_numpy_include_dirs 
    89numpy_incl_path = os.path.join(get_numpy_include_dirs()[0], "numpy") 
     
    6970    smearer_sources.append(os.path.join(igordir, "winFuncs.c")) 
    7071 
     72# Enable OpenMP 
     73extra_compile_args = [] 
     74extra_link_args = [] 
     75if sys.platform=='linux2' or (sys.platform=='darwin' and platform.architecture()[0]=='64bit'): 
     76    extra_compile_args = ['-fopenmp'] 
     77    extra_link_args = ['-lgomp'] 
     78elif os.name=='nt': 
     79    extra_compile_args = ['/openmp']     
     80 
    7181dist = setup( 
    7282    name="sansmodels", 
     
    90100     
    91101    ext_modules = [ Extension("sans.models.sans_extension.c_models", 
    92              sources=model_sources,                  
     102                              sources=model_sources,                  
    93103       
    94         include_dirs=[igordir, srcdir, c_model_dir, numpy_incl_path]),        
     104                              include_dirs=[igordir, srcdir, c_model_dir, numpy_incl_path],    
     105                              extra_compile_args=extra_compile_args, 
     106                              extra_link_args=extra_link_args 
     107                              ), 
     108     
    95109        # Smearer extension 
    96110        Extension("sans.models.sans_extension.smearer", 
     
    101115                                          "smearer2d_helper_module.cpp"), 
    102116                             os.path.join(smear_dir, "smearer2d_helper.cpp"),], 
    103                   include_dirs=[smear_dir,numpy_incl_path] 
     117                  include_dirs=[smear_dir,numpy_incl_path], 
     118                  extra_compile_args=extra_compile_args, 
     119                  extra_link_args=extra_link_args 
    104120        ) 
    105121        ] 
  • sansmodels/src/sans/models/ReflAdvModel.py

    rd760c0a r0b082f3  
    22 
    33############################################################################## 
    4 #    This software was developed by the University of Tennessee as part of the 
    5 #    Distributed Data Analysis of Neutron Scattering Experiments (DANSE) 
    6 #    project funded by the US National Science Foundation. 
     4#       This software was developed by the University of Tennessee as part of the 
     5#       Distributed Data Analysis of Neutron Scattering Experiments (DANSE) 
     6#       project funded by the US National Science Foundation. 
    77# 
    8 #    If you use DANSE applications to do scientific research that leads to 
    9 #    publication, we ask that you acknowledge the use of the software with the 
    10 #    following sentence: 
     8#       If you use DANSE applications to do scientific research that leads to 
     9#       publication, we ask that you acknowledge the use of the software with the 
     10#       following sentence: 
    1111# 
    12 #    "This work benefited from DANSE software developed under NSF award DMR-0520547." 
     12#       "This work benefited from DANSE software developed under NSF award DMR-0520547." 
    1313# 
    14 #    copyright 2008, University of Tennessee 
     14#       copyright 2008, University of Tennessee 
    1515############################################################################## 
    1616 
     
    127127        ## Model description 
    128128        self.description ="""Calculate neutron reflectivity using the Parratt iterative formula 
    129         Parameters: 
    130         background:background 
    131         scale: scale factor 
    132         sld_bottom0: the SLD of the substrate 
    133         sld_medium: the SLD of the incident medium 
    134         or superstrate 
    135         sld_flatN: the SLD of the flat region of 
    136         the N'th layer 
    137         thick_flatN: the thickness of the flat 
    138         region of the N'th layer 
    139         func_interN: the function used to describe 
    140         the interface of the N'th layer 
    141         nu_interN: the coefficient for the func_interN 
    142         thick_interN: the thickness of the interface 
    143         of the N'th layer 
    144         Note: the layer number starts to increase 
    145         from the bottom (substrate) to the top.""" 
     129                Parameters: 
     130                background:background 
     131                scale: scale factor 
     132                sld_bottom0: the SLD of the substrate 
     133                sld_medium: the SLD of the incident medium 
     134                or superstrate 
     135                sld_flatN: the SLD of the flat region of 
     136                the N'th layer 
     137                thick_flatN: the thickness of the flat 
     138                region of the N'th layer 
     139                func_interN: the function used to describe 
     140                the interface of the N'th layer 
     141                nu_interN: the coefficient for the func_interN 
     142                thick_interN: the thickness of the interface 
     143                of the N'th layer 
     144                Note: the layer number starts to increase 
     145                from the bottom (substrate) to the top.""" 
    146146        
    147147        ## Parameter details [units, min, max] 
     
    245245        """ Return a identical copy of self """ 
    246246        return self._clone(ReflAdvModel())    
    247             
     247         
    248248    
    249249    def run(self, x=0.0): 
  • sansmodels/src/sans/models/ReflModel.py

    r500be82 r0b082f3  
    22 
    33############################################################################## 
    4 #    This software was developed by the University of Tennessee as part of the 
    5 #    Distributed Data Analysis of Neutron Scattering Experiments (DANSE) 
    6 #    project funded by the US National Science Foundation. 
     4#       This software was developed by the University of Tennessee as part of the 
     5#       Distributed Data Analysis of Neutron Scattering Experiments (DANSE) 
     6#       project funded by the US National Science Foundation. 
    77# 
    8 #    If you use DANSE applications to do scientific research that leads to 
    9 #    publication, we ask that you acknowledge the use of the software with the 
    10 #    following sentence: 
     8#       If you use DANSE applications to do scientific research that leads to 
     9#       publication, we ask that you acknowledge the use of the software with the 
     10#       following sentence: 
    1111# 
    12 #    "This work benefited from DANSE software developed under NSF award DMR-0520547." 
     12#       "This work benefited from DANSE software developed under NSF award DMR-0520547." 
    1313# 
    14 #    copyright 2008, University of Tennessee 
     14#       copyright 2008, University of Tennessee 
    1515############################################################################## 
    1616 
     
    103103        ## Model description 
    104104        self.description ="""Calculate neutron reflectivity using the Parratt iterative formula 
    105         Parameters: 
    106         background:background 
    107         scale: scale factor 
    108         sld_bottom0: the SLD of the substrate 
    109         sld_medium: the SLD of the incident medium 
    110         or superstrate 
    111         sld_flatN: the SLD of the flat region of 
    112         the N'th layer 
    113         thick_flatN: the thickness of the flat 
    114         region of the N'th layer 
    115         func_interN: the function used to describe 
    116         the interface of the N'th layer 
    117         thick_interN: the thickness of the interface 
    118         of the N'th layer 
    119         Note: the layer number starts to increase 
    120         from the bottom (substrate) to the top.""" 
     105                Parameters: 
     106                background:background 
     107                scale: scale factor 
     108                sld_bottom0: the SLD of the substrate 
     109                sld_medium: the SLD of the incident medium 
     110                or superstrate 
     111                sld_flatN: the SLD of the flat region of 
     112                the N'th layer 
     113                thick_flatN: the thickness of the flat 
     114                region of the N'th layer 
     115                func_interN: the function used to describe 
     116                the interface of the N'th layer 
     117                thick_interN: the thickness of the interface 
     118                of the N'th layer 
     119                Note: the layer number starts to increase 
     120                from the bottom (substrate) to the top.""" 
    121121        
    122122        ## Parameter details [units, min, max] 
     
    196196        """ Return a identical copy of self """ 
    197197        return self._clone(ReflModel())    
    198             
     198         
    199199    
    200200    def run(self, x=0.0): 
  • sansmodels/src/sans/models/c_models/CBCCrystalModel.cpp

    r2605da22 r0b082f3  
    179179                return NULL; 
    180180        } 
     181#pragma omp parallel for 
    181182         for (int i = 0; i < q->dimensions[0]; i++){ 
    182183      double q_value  = *(double *)(q->data + i*q->strides[0]); 
     
    196197 { 
    197198    PyArrayObject *result; 
    198     int i, x_len, y_len, dims[1]; 
     199    int x_len, y_len, dims[1]; 
    199200    //check validity of input vectors 
    200201    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE 
     
    220221        
    221222        /* Do the calculation. */ 
    222         for ( i=0; i< x_len; i++) { 
     223#pragma omp parallel for 
     224        for (int i=0; i< x_len; i++) { 
    223225            double x_value = *(double *)(x->data + i*x->strides[0]); 
    224226                    double y_value = *(double *)(y->data + i*y->strides[0]); 
  • sansmodels/src/sans/models/c_models/CBarBellModel.cpp

    r2605da22 r0b082f3  
    181181                return NULL; 
    182182        } 
     183#pragma omp parallel for 
    183184         for (int i = 0; i < q->dimensions[0]; i++){ 
    184185      double q_value  = *(double *)(q->data + i*q->strides[0]); 
     
    198199 { 
    199200    PyArrayObject *result; 
    200     int i, x_len, y_len, dims[1]; 
     201    int x_len, y_len, dims[1]; 
    201202    //check validity of input vectors 
    202203    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE 
     
    222223        
    223224        /* Do the calculation. */ 
    224         for ( i=0; i< x_len; i++) { 
     225#pragma omp parallel for 
     226        for (int i=0; i< x_len; i++) { 
    225227            double x_value = *(double *)(x->data + i*x->strides[0]); 
    226228                    double y_value = *(double *)(y->data + i*y->strides[0]); 
  • sansmodels/src/sans/models/c_models/CBinaryHSModel.cpp

    r2605da22 r0b082f3  
    171171                return NULL; 
    172172        } 
     173#pragma omp parallel for 
    173174         for (int i = 0; i < q->dimensions[0]; i++){ 
    174175      double q_value  = *(double *)(q->data + i*q->strides[0]); 
     
    188189 { 
    189190    PyArrayObject *result; 
    190     int i, x_len, y_len, dims[1]; 
     191    int x_len, y_len, dims[1]; 
    191192    //check validity of input vectors 
    192193    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE 
     
    212213        
    213214        /* Do the calculation. */ 
    214         for ( i=0; i< x_len; i++) { 
     215#pragma omp parallel for 
     216        for (int i=0; i< x_len; i++) { 
    215217            double x_value = *(double *)(x->data + i*x->strides[0]); 
    216218                    double y_value = *(double *)(y->data + i*y->strides[0]); 
  • sansmodels/src/sans/models/c_models/CCSParallelepipedModel.cpp

    r2605da22 r0b082f3  
    191191                return NULL; 
    192192        } 
     193#pragma omp parallel for 
    193194         for (int i = 0; i < q->dimensions[0]; i++){ 
    194195      double q_value  = *(double *)(q->data + i*q->strides[0]); 
     
    208209 { 
    209210    PyArrayObject *result; 
    210     int i, x_len, y_len, dims[1]; 
     211    int x_len, y_len, dims[1]; 
    211212    //check validity of input vectors 
    212213    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE 
     
    232233        
    233234        /* Do the calculation. */ 
    234         for ( i=0; i< x_len; i++) { 
     235#pragma omp parallel for 
     236        for (int i=0; i< x_len; i++) { 
    235237            double x_value = *(double *)(x->data + i*x->strides[0]); 
    236238                    double y_value = *(double *)(y->data + i*y->strides[0]); 
  • sansmodels/src/sans/models/c_models/CCappedCylinderModel.cpp

    r2605da22 r0b082f3  
    181181                return NULL; 
    182182        } 
     183#pragma omp parallel for 
    183184         for (int i = 0; i < q->dimensions[0]; i++){ 
    184185      double q_value  = *(double *)(q->data + i*q->strides[0]); 
     
    198199 { 
    199200    PyArrayObject *result; 
    200     int i, x_len, y_len, dims[1]; 
     201    int x_len, y_len, dims[1]; 
    201202    //check validity of input vectors 
    202203    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE 
     
    222223        
    223224        /* Do the calculation. */ 
    224         for ( i=0; i< x_len; i++) { 
     225#pragma omp parallel for 
     226        for (int i=0; i< x_len; i++) { 
    225227            double x_value = *(double *)(x->data + i*x->strides[0]); 
    226228                    double y_value = *(double *)(y->data + i*y->strides[0]); 
  • sansmodels/src/sans/models/c_models/CCoreFourShellModel.cpp

    r2605da22 r0b082f3  
    185185                return NULL; 
    186186        } 
     187#pragma omp parallel for 
    187188         for (int i = 0; i < q->dimensions[0]; i++){ 
    188189      double q_value  = *(double *)(q->data + i*q->strides[0]); 
     
    202203 { 
    203204    PyArrayObject *result; 
    204     int i, x_len, y_len, dims[1]; 
     205    int x_len, y_len, dims[1]; 
    205206    //check validity of input vectors 
    206207    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE 
     
    226227        
    227228        /* Do the calculation. */ 
    228         for ( i=0; i< x_len; i++) { 
     229#pragma omp parallel for 
     230        for (int i=0; i< x_len; i++) { 
    229231            double x_value = *(double *)(x->data + i*x->strides[0]); 
    230232                    double y_value = *(double *)(y->data + i*y->strides[0]); 
  • sansmodels/src/sans/models/c_models/CCoreShellCylinderModel.cpp

    r2605da22 r0b082f3  
    182182                return NULL; 
    183183        } 
     184#pragma omp parallel for 
    184185         for (int i = 0; i < q->dimensions[0]; i++){ 
    185186      double q_value  = *(double *)(q->data + i*q->strides[0]); 
     
    199200 { 
    200201    PyArrayObject *result; 
    201     int i, x_len, y_len, dims[1]; 
     202    int x_len, y_len, dims[1]; 
    202203    //check validity of input vectors 
    203204    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE 
     
    223224        
    224225        /* Do the calculation. */ 
    225         for ( i=0; i< x_len; i++) { 
     226#pragma omp parallel for 
     227        for (int i=0; i< x_len; i++) { 
    226228            double x_value = *(double *)(x->data + i*x->strides[0]); 
    227229                    double y_value = *(double *)(y->data + i*y->strides[0]); 
  • sansmodels/src/sans/models/c_models/CCoreShellEllipsoidModel.cpp

    r2605da22 r0b082f3  
    186186                return NULL; 
    187187        } 
     188#pragma omp parallel for 
    188189         for (int i = 0; i < q->dimensions[0]; i++){ 
    189190      double q_value  = *(double *)(q->data + i*q->strides[0]); 
     
    203204 { 
    204205    PyArrayObject *result; 
    205     int i, x_len, y_len, dims[1]; 
     206    int x_len, y_len, dims[1]; 
    206207    //check validity of input vectors 
    207208    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE 
     
    227228        
    228229        /* Do the calculation. */ 
    229         for ( i=0; i< x_len; i++) { 
     230#pragma omp parallel for 
     231        for (int i=0; i< x_len; i++) { 
    230232            double x_value = *(double *)(x->data + i*x->strides[0]); 
    231233                    double y_value = *(double *)(y->data + i*y->strides[0]); 
  • sansmodels/src/sans/models/c_models/CCoreShellModel.cpp

    r2605da22 r0b082f3  
    170170                return NULL; 
    171171        } 
     172#pragma omp parallel for 
    172173         for (int i = 0; i < q->dimensions[0]; i++){ 
    173174      double q_value  = *(double *)(q->data + i*q->strides[0]); 
     
    187188 { 
    188189    PyArrayObject *result; 
    189     int i, x_len, y_len, dims[1]; 
     190    int x_len, y_len, dims[1]; 
    190191    //check validity of input vectors 
    191192    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE 
     
    211212        
    212213        /* Do the calculation. */ 
    213         for ( i=0; i< x_len; i++) { 
     214#pragma omp parallel for 
     215        for (int i=0; i< x_len; i++) { 
    214216            double x_value = *(double *)(x->data + i*x->strides[0]); 
    215217                    double y_value = *(double *)(y->data + i*y->strides[0]); 
  • sansmodels/src/sans/models/c_models/CCylinderModel.cpp

    r1a191e4 r0b082f3  
    195195 { 
    196196    PyArrayObject *result; 
    197     int i, x_len, y_len, dims[1]; 
     197    int x_len, y_len, dims[1]; 
    198198    //check validity of input vectors 
    199199    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE 
     
    219219        
    220220        /* Do the calculation. */ 
    221         for ( i=0; i< x_len; i++) { 
     221#pragma omp parallel for 
     222        for (int i=0; i< x_len; i++) { 
    222223            double x_value = *(double *)(x->data + i*x->strides[0]); 
    223224                    double y_value = *(double *)(y->data + i*y->strides[0]); 
     
    284285                if (PyArray_Check(pars)) { 
    285286                        return evaluateOneDim(self->model, (PyArrayObject*)pars);  
    286                 } 
    287             }else{ 
     287                    } 
     288                }else{ 
    288289                    PyErr_SetString(CCylinderModelError,  
    289290                   "CCylinderModel.evalDistribution expect numpy array of one dimension."); 
    290291                return NULL; 
    291             } 
     292                } 
    292293    }else if( PyList_Check(pars)==1) { 
    293294        // Length of list should be 2 for I(qx,qy) 
  • sansmodels/src/sans/models/c_models/CDiamCylFunc.cpp

    r2605da22 r0b082f3  
    165165                return NULL; 
    166166        } 
     167#pragma omp parallel for 
    167168         for (int i = 0; i < q->dimensions[0]; i++){ 
    168169      double q_value  = *(double *)(q->data + i*q->strides[0]); 
     
    182183 { 
    183184    PyArrayObject *result; 
    184     int i, x_len, y_len, dims[1]; 
     185    int x_len, y_len, dims[1]; 
    185186    //check validity of input vectors 
    186187    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE 
     
    206207        
    207208        /* Do the calculation. */ 
    208         for ( i=0; i< x_len; i++) { 
     209#pragma omp parallel for 
     210        for (int i=0; i< x_len; i++) { 
    209211            double x_value = *(double *)(x->data + i*x->strides[0]); 
    210212                    double y_value = *(double *)(y->data + i*y->strides[0]); 
  • sansmodels/src/sans/models/c_models/CDiamEllipFunc.cpp

    r2605da22 r0b082f3  
    165165                return NULL; 
    166166        } 
     167#pragma omp parallel for 
    167168         for (int i = 0; i < q->dimensions[0]; i++){ 
    168169      double q_value  = *(double *)(q->data + i*q->strides[0]); 
     
    182183 { 
    183184    PyArrayObject *result; 
    184     int i, x_len, y_len, dims[1]; 
     185    int x_len, y_len, dims[1]; 
    185186    //check validity of input vectors 
    186187    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE 
     
    206207        
    207208        /* Do the calculation. */ 
    208         for ( i=0; i< x_len; i++) { 
     209#pragma omp parallel for 
     210        for (int i=0; i< x_len; i++) { 
    209211            double x_value = *(double *)(x->data + i*x->strides[0]); 
    210212                    double y_value = *(double *)(y->data + i*y->strides[0]); 
  • sansmodels/src/sans/models/c_models/CEllipsoidModel.cpp

    r2605da22 r0b082f3  
    177177                return NULL; 
    178178        } 
     179#pragma omp parallel for 
    179180         for (int i = 0; i < q->dimensions[0]; i++){ 
    180181      double q_value  = *(double *)(q->data + i*q->strides[0]); 
     
    194195 { 
    195196    PyArrayObject *result; 
    196     int i, x_len, y_len, dims[1]; 
     197    int x_len, y_len, dims[1]; 
    197198    //check validity of input vectors 
    198199    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE 
     
    218219        
    219220        /* Do the calculation. */ 
    220         for ( i=0; i< x_len; i++) { 
     221#pragma omp parallel for 
     222        for (int i=0; i< x_len; i++) { 
    221223            double x_value = *(double *)(x->data + i*x->strides[0]); 
    222224                    double y_value = *(double *)(y->data + i*y->strides[0]); 
  • sansmodels/src/sans/models/c_models/CEllipticalCylinderModel.cpp

    r2605da22 r0b082f3  
    185185                return NULL; 
    186186        } 
     187#pragma omp parallel for 
    187188         for (int i = 0; i < q->dimensions[0]; i++){ 
    188189      double q_value  = *(double *)(q->data + i*q->strides[0]); 
     
    202203 { 
    203204    PyArrayObject *result; 
    204     int i, x_len, y_len, dims[1]; 
     205    int x_len, y_len, dims[1]; 
    205206    //check validity of input vectors 
    206207    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE 
     
    226227        
    227228        /* Do the calculation. */ 
    228         for ( i=0; i< x_len; i++) { 
     229#pragma omp parallel for 
     230        for (int i=0; i< x_len; i++) { 
    229231            double x_value = *(double *)(x->data + i*x->strides[0]); 
    230232                    double y_value = *(double *)(y->data + i*y->strides[0]); 
  • sansmodels/src/sans/models/c_models/CFCCrystalModel.cpp

    r2605da22 r0b082f3  
    179179                return NULL; 
    180180        } 
     181#pragma omp parallel for 
    181182         for (int i = 0; i < q->dimensions[0]; i++){ 
    182183      double q_value  = *(double *)(q->data + i*q->strides[0]); 
     
    196197 { 
    197198    PyArrayObject *result; 
    198     int i, x_len, y_len, dims[1]; 
     199    int x_len, y_len, dims[1]; 
    199200    //check validity of input vectors 
    200201    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE 
     
    220221        
    221222        /* Do the calculation. */ 
    222         for ( i=0; i< x_len; i++) { 
     223#pragma omp parallel for 
     224        for (int i=0; i< x_len; i++) { 
    223225            double x_value = *(double *)(x->data + i*x->strides[0]); 
    224226                    double y_value = *(double *)(y->data + i*y->strides[0]); 
  • sansmodels/src/sans/models/c_models/CFlexCylEllipXModel.cpp

    r2605da22 r0b082f3  
    177177                return NULL; 
    178178        } 
     179#pragma omp parallel for 
    179180         for (int i = 0; i < q->dimensions[0]; i++){ 
    180181      double q_value  = *(double *)(q->data + i*q->strides[0]); 
     
    194195 { 
    195196    PyArrayObject *result; 
    196     int i, x_len, y_len, dims[1]; 
     197    int x_len, y_len, dims[1]; 
    197198    //check validity of input vectors 
    198199    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE 
     
    218219        
    219220        /* Do the calculation. */ 
    220         for ( i=0; i< x_len; i++) { 
     221#pragma omp parallel for 
     222        for (int i=0; i< x_len; i++) { 
    221223            double x_value = *(double *)(x->data + i*x->strides[0]); 
    222224                    double y_value = *(double *)(y->data + i*y->strides[0]); 
  • sansmodels/src/sans/models/c_models/CFlexibleCylinderModel.cpp

    r2605da22 r0b082f3  
    173173                return NULL; 
    174174        } 
     175#pragma omp parallel for 
    175176         for (int i = 0; i < q->dimensions[0]; i++){ 
    176177      double q_value  = *(double *)(q->data + i*q->strides[0]); 
     
    190191 { 
    191192    PyArrayObject *result; 
    192     int i, x_len, y_len, dims[1]; 
     193    int x_len, y_len, dims[1]; 
    193194    //check validity of input vectors 
    194195    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE 
     
    214215        
    215216        /* Do the calculation. */ 
    216         for ( i=0; i< x_len; i++) { 
     217#pragma omp parallel for 
     218        for (int i=0; i< x_len; i++) { 
    217219            double x_value = *(double *)(x->data + i*x->strides[0]); 
    218220                    double y_value = *(double *)(y->data + i*y->strides[0]); 
  • sansmodels/src/sans/models/c_models/CFractalModel.cpp

    r2605da22 r0b082f3  
    167167                return NULL; 
    168168        } 
     169#pragma omp parallel for 
    169170         for (int i = 0; i < q->dimensions[0]; i++){ 
    170171      double q_value  = *(double *)(q->data + i*q->strides[0]); 
     
    184185 { 
    185186    PyArrayObject *result; 
    186     int i, x_len, y_len, dims[1]; 
     187    int x_len, y_len, dims[1]; 
    187188    //check validity of input vectors 
    188189    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE 
     
    208209        
    209210        /* Do the calculation. */ 
    210         for ( i=0; i< x_len; i++) { 
     211#pragma omp parallel for 
     212        for (int i=0; i< x_len; i++) { 
    211213            double x_value = *(double *)(x->data + i*x->strides[0]); 
    212214                    double y_value = *(double *)(y->data + i*y->strides[0]); 
  • sansmodels/src/sans/models/c_models/CFuzzySphereModel.cpp

    r2605da22 r0b082f3  
    169169                return NULL; 
    170170        } 
     171#pragma omp parallel for 
    171172         for (int i = 0; i < q->dimensions[0]; i++){ 
    172173      double q_value  = *(double *)(q->data + i*q->strides[0]); 
     
    186187 { 
    187188    PyArrayObject *result; 
    188     int i, x_len, y_len, dims[1]; 
     189    int x_len, y_len, dims[1]; 
    189190    //check validity of input vectors 
    190191    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE 
     
    210211        
    211212        /* Do the calculation. */ 
    212         for ( i=0; i< x_len; i++) { 
     213#pragma omp parallel for 
     214        for (int i=0; i< x_len; i++) { 
    213215            double x_value = *(double *)(x->data + i*x->strides[0]); 
    214216                    double y_value = *(double *)(y->data + i*y->strides[0]); 
  • sansmodels/src/sans/models/c_models/CGaussian.cpp

    r2605da22 r0b082f3  
    160160                return NULL; 
    161161        } 
     162#pragma omp parallel for 
    162163         for (int i = 0; i < q->dimensions[0]; i++){ 
    163164      double q_value  = *(double *)(q->data + i*q->strides[0]); 
     
    177178 { 
    178179    PyArrayObject *result; 
    179     int i, x_len, y_len, dims[1]; 
     180    int x_len, y_len, dims[1]; 
    180181    //check validity of input vectors 
    181182    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE 
     
    201202        
    202203        /* Do the calculation. */ 
    203         for ( i=0; i< x_len; i++) { 
     204#pragma omp parallel for 
     205        for (int i=0; i< x_len; i++) { 
    204206            double x_value = *(double *)(x->data + i*x->strides[0]); 
    205207                    double y_value = *(double *)(y->data + i*y->strides[0]); 
  • sansmodels/src/sans/models/c_models/CHardsphereStructure.cpp

    r2605da22 r0b082f3  
    162162                return NULL; 
    163163        } 
     164#pragma omp parallel for 
    164165         for (int i = 0; i < q->dimensions[0]; i++){ 
    165166      double q_value  = *(double *)(q->data + i*q->strides[0]); 
     
    179180 { 
    180181    PyArrayObject *result; 
    181     int i, x_len, y_len, dims[1]; 
     182    int x_len, y_len, dims[1]; 
    182183    //check validity of input vectors 
    183184    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE 
     
    203204        
    204205        /* Do the calculation. */ 
    205         for ( i=0; i< x_len; i++) { 
     206#pragma omp parallel for 
     207        for (int i=0; i< x_len; i++) { 
    206208            double x_value = *(double *)(x->data + i*x->strides[0]); 
    207209                    double y_value = *(double *)(y->data + i*y->strides[0]); 
  • sansmodels/src/sans/models/c_models/CHayterMSAStructure.cpp

    r2605da22 r0b082f3  
    166166                return NULL; 
    167167        } 
     168#pragma omp parallel for 
    168169         for (int i = 0; i < q->dimensions[0]; i++){ 
    169170      double q_value  = *(double *)(q->data + i*q->strides[0]); 
     
    183184 { 
    184185    PyArrayObject *result; 
    185     int i, x_len, y_len, dims[1]; 
     186    int x_len, y_len, dims[1]; 
    186187    //check validity of input vectors 
    187188    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE 
     
    207208        
    208209        /* Do the calculation. */ 
    209         for ( i=0; i< x_len; i++) { 
     210#pragma omp parallel for 
     211        for (int i=0; i< x_len; i++) { 
    210212            double x_value = *(double *)(x->data + i*x->strides[0]); 
    211213                    double y_value = *(double *)(y->data + i*y->strides[0]); 
  • sansmodels/src/sans/models/c_models/CHollowCylinderModel.cpp

    r2605da22 r0b082f3  
    181181                return NULL; 
    182182        } 
     183#pragma omp parallel for 
    183184         for (int i = 0; i < q->dimensions[0]; i++){ 
    184185      double q_value  = *(double *)(q->data + i*q->strides[0]); 
     
    198199 { 
    199200    PyArrayObject *result; 
    200     int i, x_len, y_len, dims[1]; 
     201    int x_len, y_len, dims[1]; 
    201202    //check validity of input vectors 
    202203    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE 
     
    222223        
    223224        /* Do the calculation. */ 
    224         for ( i=0; i< x_len; i++) { 
     225#pragma omp parallel for 
     226        for (int i=0; i< x_len; i++) { 
    225227            double x_value = *(double *)(x->data + i*x->strides[0]); 
    226228                    double y_value = *(double *)(y->data + i*y->strides[0]); 
  • sansmodels/src/sans/models/c_models/CLamellarFFHGModel.cpp

    r2605da22 r0b082f3  
    170170                return NULL; 
    171171        } 
     172#pragma omp parallel for 
    172173         for (int i = 0; i < q->dimensions[0]; i++){ 
    173174      double q_value  = *(double *)(q->data + i*q->strides[0]); 
     
    187188 { 
    188189    PyArrayObject *result; 
    189     int i, x_len, y_len, dims[1]; 
     190    int x_len, y_len, dims[1]; 
    190191    //check validity of input vectors 
    191192    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE 
     
    211212        
    212213        /* Do the calculation. */ 
    213         for ( i=0; i< x_len; i++) { 
     214#pragma omp parallel for 
     215        for (int i=0; i< x_len; i++) { 
    214216            double x_value = *(double *)(x->data + i*x->strides[0]); 
    215217                    double y_value = *(double *)(y->data + i*y->strides[0]); 
  • sansmodels/src/sans/models/c_models/CLamellarModel.cpp

    r2605da22 r0b082f3  
    165165                return NULL; 
    166166        } 
     167#pragma omp parallel for 
    167168         for (int i = 0; i < q->dimensions[0]; i++){ 
    168169      double q_value  = *(double *)(q->data + i*q->strides[0]); 
     
    182183 { 
    183184    PyArrayObject *result; 
    184     int i, x_len, y_len, dims[1]; 
     185    int x_len, y_len, dims[1]; 
    185186    //check validity of input vectors 
    186187    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE 
     
    206207        
    207208        /* Do the calculation. */ 
    208         for ( i=0; i< x_len; i++) { 
     209#pragma omp parallel for 
     210        for (int i=0; i< x_len; i++) { 
    209211            double x_value = *(double *)(x->data + i*x->strides[0]); 
    210212                    double y_value = *(double *)(y->data + i*y->strides[0]); 
  • sansmodels/src/sans/models/c_models/CLamellarPCrystalModel.cpp

    r2605da22 r0b082f3  
    168168                return NULL; 
    169169        } 
     170#pragma omp parallel for 
    170171         for (int i = 0; i < q->dimensions[0]; i++){ 
    171172      double q_value  = *(double *)(q->data + i*q->strides[0]); 
     
    185186 { 
    186187    PyArrayObject *result; 
    187     int i, x_len, y_len, dims[1]; 
     188    int x_len, y_len, dims[1]; 
    188189    //check validity of input vectors 
    189190    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE 
     
    209210        
    210211        /* Do the calculation. */ 
    211         for ( i=0; i< x_len; i++) { 
     212#pragma omp parallel for 
     213        for (int i=0; i< x_len; i++) { 
    212214            double x_value = *(double *)(x->data + i*x->strides[0]); 
    213215                    double y_value = *(double *)(y->data + i*y->strides[0]); 
  • sansmodels/src/sans/models/c_models/CLamellarPSHGModel.cpp

    r2605da22 r0b082f3  
    176176                return NULL; 
    177177        } 
     178#pragma omp parallel for 
    178179         for (int i = 0; i < q->dimensions[0]; i++){ 
    179180      double q_value  = *(double *)(q->data + i*q->strides[0]); 
     
    193194 { 
    194195    PyArrayObject *result; 
    195     int i, x_len, y_len, dims[1]; 
     196    int x_len, y_len, dims[1]; 
    196197    //check validity of input vectors 
    197198    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE 
     
    217218        
    218219        /* Do the calculation. */ 
    219         for ( i=0; i< x_len; i++) { 
     220#pragma omp parallel for 
     221        for (int i=0; i< x_len; i++) { 
    220222            double x_value = *(double *)(x->data + i*x->strides[0]); 
    221223                    double y_value = *(double *)(y->data + i*y->strides[0]); 
  • sansmodels/src/sans/models/c_models/CLamellarPSModel.cpp

    r2605da22 r0b082f3  
    171171                return NULL; 
    172172        } 
     173#pragma omp parallel for 
    173174         for (int i = 0; i < q->dimensions[0]; i++){ 
    174175      double q_value  = *(double *)(q->data + i*q->strides[0]); 
     
    188189 { 
    189190    PyArrayObject *result; 
    190     int i, x_len, y_len, dims[1]; 
     191    int x_len, y_len, dims[1]; 
    191192    //check validity of input vectors 
    192193    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE 
     
    212213        
    213214        /* Do the calculation. */ 
    214         for ( i=0; i< x_len; i++) { 
     215#pragma omp parallel for 
     216        for (int i=0; i< x_len; i++) { 
    215217            double x_value = *(double *)(x->data + i*x->strides[0]); 
    216218                    double y_value = *(double *)(y->data + i*y->strides[0]); 
  • sansmodels/src/sans/models/c_models/CLogNormal.cpp

    r2605da22 r0b082f3  
    160160                return NULL; 
    161161        } 
     162#pragma omp parallel for 
    162163         for (int i = 0; i < q->dimensions[0]; i++){ 
    163164      double q_value  = *(double *)(q->data + i*q->strides[0]); 
     
    177178 { 
    178179    PyArrayObject *result; 
    179     int i, x_len, y_len, dims[1]; 
     180    int x_len, y_len, dims[1]; 
    180181    //check validity of input vectors 
    181182    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE 
     
    201202        
    202203        /* Do the calculation. */ 
    203         for ( i=0; i< x_len; i++) { 
     204#pragma omp parallel for 
     205        for (int i=0; i< x_len; i++) { 
    204206            double x_value = *(double *)(x->data + i*x->strides[0]); 
    205207                    double y_value = *(double *)(y->data + i*y->strides[0]); 
  • sansmodels/src/sans/models/c_models/CLorentzian.cpp

    r2605da22 r0b082f3  
    160160                return NULL; 
    161161        } 
     162#pragma omp parallel for 
    162163         for (int i = 0; i < q->dimensions[0]; i++){ 
    163164      double q_value  = *(double *)(q->data + i*q->strides[0]); 
     
    177178 { 
    178179    PyArrayObject *result; 
    179     int i, x_len, y_len, dims[1]; 
     180    int x_len, y_len, dims[1]; 
    180181    //check validity of input vectors 
    181182    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE 
     
    201202        
    202203        /* Do the calculation. */ 
    203         for ( i=0; i< x_len; i++) { 
     204#pragma omp parallel for 
     205        for (int i=0; i< x_len; i++) { 
    204206            double x_value = *(double *)(x->data + i*x->strides[0]); 
    205207                    double y_value = *(double *)(y->data + i*y->strides[0]); 
  • sansmodels/src/sans/models/c_models/CMultiShellModel.cpp

    r2605da22 r0b082f3  
    174174                return NULL; 
    175175        } 
     176#pragma omp parallel for 
    176177         for (int i = 0; i < q->dimensions[0]; i++){ 
    177178      double q_value  = *(double *)(q->data + i*q->strides[0]); 
     
    191192 { 
    192193    PyArrayObject *result; 
    193     int i, x_len, y_len, dims[1]; 
     194    int x_len, y_len, dims[1]; 
    194195    //check validity of input vectors 
    195196    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE 
     
    215216        
    216217        /* Do the calculation. */ 
    217         for ( i=0; i< x_len; i++) { 
     218#pragma omp parallel for 
     219        for (int i=0; i< x_len; i++) { 
    218220            double x_value = *(double *)(x->data + i*x->strides[0]); 
    219221                    double y_value = *(double *)(y->data + i*y->strides[0]); 
  • sansmodels/src/sans/models/c_models/COnionModel.cpp

    r2605da22 r0b082f3  
    246246                return NULL; 
    247247        } 
     248#pragma omp parallel for 
    248249         for (int i = 0; i < q->dimensions[0]; i++){ 
    249250      double q_value  = *(double *)(q->data + i*q->strides[0]); 
     
    263264 { 
    264265    PyArrayObject *result; 
    265     int i, x_len, y_len, dims[1]; 
     266    int x_len, y_len, dims[1]; 
    266267    //check validity of input vectors 
    267268    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE 
     
    287288        
    288289        /* Do the calculation. */ 
    289         for ( i=0; i< x_len; i++) { 
     290#pragma omp parallel for 
     291        for (int i=0; i< x_len; i++) { 
    290292            double x_value = *(double *)(x->data + i*x->strides[0]); 
    291293                    double y_value = *(double *)(y->data + i*y->strides[0]); 
  • sansmodels/src/sans/models/c_models/CParallelepipedModel.cpp

    r2605da22 r0b082f3  
    185185                return NULL; 
    186186        } 
     187#pragma omp parallel for 
    187188         for (int i = 0; i < q->dimensions[0]; i++){ 
    188189      double q_value  = *(double *)(q->data + i*q->strides[0]); 
     
    202203 { 
    203204    PyArrayObject *result; 
    204     int i, x_len, y_len, dims[1]; 
     205    int x_len, y_len, dims[1]; 
    205206    //check validity of input vectors 
    206207    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE 
     
    226227        
    227228        /* Do the calculation. */ 
    228         for ( i=0; i< x_len; i++) { 
     229#pragma omp parallel for 
     230        for (int i=0; i< x_len; i++) { 
    229231            double x_value = *(double *)(x->data + i*x->strides[0]); 
    230232                    double y_value = *(double *)(y->data + i*y->strides[0]); 
  • sansmodels/src/sans/models/c_models/CPearlNecklaceModel.cpp

    r2605da22 r0b082f3  
    172172                return NULL; 
    173173        } 
     174#pragma omp parallel for 
    174175         for (int i = 0; i < q->dimensions[0]; i++){ 
    175176      double q_value  = *(double *)(q->data + i*q->strides[0]); 
     
    189190 { 
    190191    PyArrayObject *result; 
    191     int i, x_len, y_len, dims[1]; 
     192    int x_len, y_len, dims[1]; 
    192193    //check validity of input vectors 
    193194    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE 
     
    213214        
    214215        /* Do the calculation. */ 
    215         for ( i=0; i< x_len; i++) { 
     216#pragma omp parallel for 
     217        for (int i=0; i< x_len; i++) { 
    216218            double x_value = *(double *)(x->data + i*x->strides[0]); 
    217219                    double y_value = *(double *)(y->data + i*y->strides[0]); 
  • sansmodels/src/sans/models/c_models/CPoly_GaussCoil.cpp

    r2605da22 r0b082f3  
    164164                return NULL; 
    165165        } 
     166#pragma omp parallel for 
    166167         for (int i = 0; i < q->dimensions[0]; i++){ 
    167168      double q_value  = *(double *)(q->data + i*q->strides[0]); 
     
    181182 { 
    182183    PyArrayObject *result; 
    183     int i, x_len, y_len, dims[1]; 
     184    int x_len, y_len, dims[1]; 
    184185    //check validity of input vectors 
    185186    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE 
     
    205206        
    206207        /* Do the calculation. */ 
    207         for ( i=0; i< x_len; i++) { 
     208#pragma omp parallel for 
     209        for (int i=0; i< x_len; i++) { 
    208210            double x_value = *(double *)(x->data + i*x->strides[0]); 
    209211                    double y_value = *(double *)(y->data + i*y->strides[0]); 
  • sansmodels/src/sans/models/c_models/CRPAModel.cpp

    r2605da22 r0b082f3  
    189189                return NULL; 
    190190        } 
     191#pragma omp parallel for 
    191192         for (int i = 0; i < q->dimensions[0]; i++){ 
    192193      double q_value  = *(double *)(q->data + i*q->strides[0]); 
     
    206207 { 
    207208    PyArrayObject *result; 
    208     int i, x_len, y_len, dims[1]; 
     209    int x_len, y_len, dims[1]; 
    209210    //check validity of input vectors 
    210211    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE 
     
    230231        
    231232        /* Do the calculation. */ 
    232         for ( i=0; i< x_len; i++) { 
     233#pragma omp parallel for 
     234        for (int i=0; i< x_len; i++) { 
    233235            double x_value = *(double *)(x->data + i*x->strides[0]); 
    234236                    double y_value = *(double *)(y->data + i*y->strides[0]); 
  • sansmodels/src/sans/models/c_models/CReflAdvModel.cpp

    rd760c0a r0b082f3  
    231231                return NULL; 
    232232        } 
     233#pragma omp parallel for 
    233234         for (int i = 0; i < q->dimensions[0]; i++){ 
    234235      double q_value  = *(double *)(q->data + i*q->strides[0]); 
     
    248249 { 
    249250    PyArrayObject *result; 
    250     int i, x_len, y_len, dims[1]; 
     251    int x_len, y_len, dims[1]; 
    251252    //check validity of input vectors 
    252253    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE 
     
    272273        
    273274        /* Do the calculation. */ 
    274         for ( i=0; i< x_len; i++) { 
     275#pragma omp parallel for 
     276        for (int i=0; i< x_len; i++) { 
    275277            double x_value = *(double *)(x->data + i*x->strides[0]); 
    276278                    double y_value = *(double *)(y->data + i*y->strides[0]); 
  • sansmodels/src/sans/models/c_models/CReflModel.cpp

    rd760c0a r0b082f3  
    207207                return NULL; 
    208208        } 
     209#pragma omp parallel for 
    209210         for (int i = 0; i < q->dimensions[0]; i++){ 
    210211      double q_value  = *(double *)(q->data + i*q->strides[0]); 
     
    224225 { 
    225226    PyArrayObject *result; 
    226     int i, x_len, y_len, dims[1]; 
     227    int x_len, y_len, dims[1]; 
    227228    //check validity of input vectors 
    228229    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE 
     
    248249        
    249250        /* Do the calculation. */ 
    250         for ( i=0; i< x_len; i++) { 
     251#pragma omp parallel for 
     252        for (int i=0; i< x_len; i++) { 
    251253            double x_value = *(double *)(x->data + i*x->strides[0]); 
    252254                    double y_value = *(double *)(y->data + i*y->strides[0]); 
  • sansmodels/src/sans/models/c_models/CSCCrystalModel.cpp

    r2605da22 r0b082f3  
    179179                return NULL; 
    180180        } 
     181#pragma omp parallel for 
    181182         for (int i = 0; i < q->dimensions[0]; i++){ 
    182183      double q_value  = *(double *)(q->data + i*q->strides[0]); 
     
    196197 { 
    197198    PyArrayObject *result; 
    198     int i, x_len, y_len, dims[1]; 
     199    int x_len, y_len, dims[1]; 
    199200    //check validity of input vectors 
    200201    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE 
     
    220221        
    221222        /* Do the calculation. */ 
    222         for ( i=0; i< x_len; i++) { 
     223#pragma omp parallel for 
     224        for (int i=0; i< x_len; i++) { 
    223225            double x_value = *(double *)(x->data + i*x->strides[0]); 
    224226                    double y_value = *(double *)(y->data + i*y->strides[0]); 
  • sansmodels/src/sans/models/c_models/CSLDCalFunc.cpp

    r2605da22 r0b082f3  
    166166                return NULL; 
    167167        } 
     168#pragma omp parallel for 
    168169         for (int i = 0; i < q->dimensions[0]; i++){ 
    169170      double q_value  = *(double *)(q->data + i*q->strides[0]); 
     
    183184 { 
    184185    PyArrayObject *result; 
    185     int i, x_len, y_len, dims[1]; 
     186    int x_len, y_len, dims[1]; 
    186187    //check validity of input vectors 
    187188    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE 
     
    207208        
    208209        /* Do the calculation. */ 
    209         for ( i=0; i< x_len; i++) { 
     210#pragma omp parallel for 
     211        for (int i=0; i< x_len; i++) { 
    210212            double x_value = *(double *)(x->data + i*x->strides[0]); 
    211213                    double y_value = *(double *)(y->data + i*y->strides[0]); 
  • sansmodels/src/sans/models/c_models/CSchulz.cpp

    r2605da22 r0b082f3  
    160160                return NULL; 
    161161        } 
     162#pragma omp parallel for 
    162163         for (int i = 0; i < q->dimensions[0]; i++){ 
    163164      double q_value  = *(double *)(q->data + i*q->strides[0]); 
     
    177178 { 
    178179    PyArrayObject *result; 
    179     int i, x_len, y_len, dims[1]; 
     180    int x_len, y_len, dims[1]; 
    180181    //check validity of input vectors 
    181182    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE 
     
    201202        
    202203        /* Do the calculation. */ 
    203         for ( i=0; i< x_len; i++) { 
     204#pragma omp parallel for 
     205        for (int i=0; i< x_len; i++) { 
    204206            double x_value = *(double *)(x->data + i*x->strides[0]); 
    205207                    double y_value = *(double *)(y->data + i*y->strides[0]); 
  • sansmodels/src/sans/models/c_models/CSphereModel.cpp

    r2605da22 r0b082f3  
    165165                return NULL; 
    166166        } 
     167#pragma omp parallel for 
    167168         for (int i = 0; i < q->dimensions[0]; i++){ 
    168169      double q_value  = *(double *)(q->data + i*q->strides[0]); 
     
    182183 { 
    183184    PyArrayObject *result; 
    184     int i, x_len, y_len, dims[1]; 
     185    int x_len, y_len, dims[1]; 
    185186    //check validity of input vectors 
    186187    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE 
     
    206207        
    207208        /* Do the calculation. */ 
    208         for ( i=0; i< x_len; i++) { 
     209#pragma omp parallel for 
     210        for (int i=0; i< x_len; i++) { 
    209211            double x_value = *(double *)(x->data + i*x->strides[0]); 
    210212                    double y_value = *(double *)(y->data + i*y->strides[0]); 
  • sansmodels/src/sans/models/c_models/CSphereSLDModel.cpp

    r2605da22 r0b082f3  
    223223                return NULL; 
    224224        } 
     225#pragma omp parallel for 
    225226         for (int i = 0; i < q->dimensions[0]; i++){ 
    226227      double q_value  = *(double *)(q->data + i*q->strides[0]); 
     
    240241 { 
    241242    PyArrayObject *result; 
    242     int i, x_len, y_len, dims[1]; 
     243    int x_len, y_len, dims[1]; 
    243244    //check validity of input vectors 
    244245    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE 
     
    264265        
    265266        /* Do the calculation. */ 
    266         for ( i=0; i< x_len; i++) { 
     267#pragma omp parallel for 
     268        for (int i=0; i< x_len; i++) { 
    267269            double x_value = *(double *)(x->data + i*x->strides[0]); 
    268270                    double y_value = *(double *)(y->data + i*y->strides[0]); 
  • sansmodels/src/sans/models/c_models/CSquareWellStructure.cpp

    r2605da22 r0b082f3  
    164164                return NULL; 
    165165        } 
     166#pragma omp parallel for 
    166167         for (int i = 0; i < q->dimensions[0]; i++){ 
    167168      double q_value  = *(double *)(q->data + i*q->strides[0]); 
     
    181182 { 
    182183    PyArrayObject *result; 
    183     int i, x_len, y_len, dims[1]; 
     184    int x_len, y_len, dims[1]; 
    184185    //check validity of input vectors 
    185186    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE 
     
    205206        
    206207        /* Do the calculation. */ 
    207         for ( i=0; i< x_len; i++) { 
     208#pragma omp parallel for 
     209        for (int i=0; i< x_len; i++) { 
    208210            double x_value = *(double *)(x->data + i*x->strides[0]); 
    209211                    double y_value = *(double *)(y->data + i*y->strides[0]); 
  • sansmodels/src/sans/models/c_models/CStackedDisksModel.cpp

    r2605da22 r0b082f3  
    184184                return NULL; 
    185185        } 
     186#pragma omp parallel for 
    186187         for (int i = 0; i < q->dimensions[0]; i++){ 
    187188      double q_value  = *(double *)(q->data + i*q->strides[0]); 
     
    201202 { 
    202203    PyArrayObject *result; 
    203     int i, x_len, y_len, dims[1]; 
     204    int x_len, y_len, dims[1]; 
    204205    //check validity of input vectors 
    205206    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE 
     
    225226        
    226227        /* Do the calculation. */ 
    227         for ( i=0; i< x_len; i++) { 
     228#pragma omp parallel for 
     229        for (int i=0; i< x_len; i++) { 
    228230            double x_value = *(double *)(x->data + i*x->strides[0]); 
    229231                    double y_value = *(double *)(y->data + i*y->strides[0]); 
  • sansmodels/src/sans/models/c_models/CStickyHSStructure.cpp

    r2605da22 r0b082f3  
    164164                return NULL; 
    165165        } 
     166#pragma omp parallel for 
    166167         for (int i = 0; i < q->dimensions[0]; i++){ 
    167168      double q_value  = *(double *)(q->data + i*q->strides[0]); 
     
    181182 { 
    182183    PyArrayObject *result; 
    183     int i, x_len, y_len, dims[1]; 
     184    int x_len, y_len, dims[1]; 
    184185    //check validity of input vectors 
    185186    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE 
     
    205206        
    206207        /* Do the calculation. */ 
    207         for ( i=0; i< x_len; i++) { 
     208#pragma omp parallel for 
     209        for (int i=0; i< x_len; i++) { 
    208210            double x_value = *(double *)(x->data + i*x->strides[0]); 
    209211                    double y_value = *(double *)(y->data + i*y->strides[0]); 
  • sansmodels/src/sans/models/c_models/CTriaxialEllipsoidModel.cpp

    r2605da22 r0b082f3  
    185185                return NULL; 
    186186        } 
     187#pragma omp parallel for 
    187188         for (int i = 0; i < q->dimensions[0]; i++){ 
    188189      double q_value  = *(double *)(q->data + i*q->strides[0]); 
     
    202203 { 
    203204    PyArrayObject *result; 
    204     int i, x_len, y_len, dims[1]; 
     205    int x_len, y_len, dims[1]; 
    205206    //check validity of input vectors 
    206207    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE 
     
    226227        
    227228        /* Do the calculation. */ 
    228         for ( i=0; i< x_len; i++) { 
     229#pragma omp parallel for 
     230        for (int i=0; i< x_len; i++) { 
    229231            double x_value = *(double *)(x->data + i*x->strides[0]); 
    230232                    double y_value = *(double *)(y->data + i*y->strides[0]); 
  • sansmodels/src/sans/models/c_models/CVesicleModel.cpp

    r2605da22 r0b082f3  
    169169                return NULL; 
    170170        } 
     171#pragma omp parallel for 
    171172         for (int i = 0; i < q->dimensions[0]; i++){ 
    172173      double q_value  = *(double *)(q->data + i*q->strides[0]); 
     
    186187 { 
    187188    PyArrayObject *result; 
    188     int i, x_len, y_len, dims[1]; 
     189    int x_len, y_len, dims[1]; 
    189190    //check validity of input vectors 
    190191    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE 
     
    210211        
    211212        /* Do the calculation. */ 
    212         for ( i=0; i< x_len; i++) { 
     213#pragma omp parallel for 
     214        for (int i=0; i< x_len; i++) { 
    213215            double x_value = *(double *)(x->data + i*x->strides[0]); 
    214216                    double y_value = *(double *)(y->data + i*y->strides[0]); 
  • sansmodels/src/sans/models/c_models/classTemplate.txt

    r2605da22 r0b082f3  
    150150                return NULL; 
    151151        } 
     152#pragma omp parallel for 
    152153         for (int i = 0; i < q->dimensions[0]; i++){ 
    153154      double q_value  = *(double *)(q->data + i*q->strides[0]); 
     
    167168 { 
    168169    PyArrayObject *result; 
    169     int i, x_len, y_len, dims[1]; 
     170    int x_len, y_len, dims[1]; 
    170171    //check validity of input vectors 
    171172    if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE 
     
    191192        
    192193        /* Do the calculation. */ 
    193         for ( i=0; i< x_len; i++) { 
     194#pragma omp parallel for 
     195        for (int i=0; i< x_len; i++) { 
    194196            double x_value = *(double *)(x->data + i*x->strides[0]); 
    195197                    double y_value = *(double *)(y->data + i*y->strides[0]); 
Note: See TracChangeset for help on using the changeset viewer.