Changeset 0db7dbd in sasmodels for sasmodels/models/lib


Ignore:
Timestamp:
Feb 16, 2018 5:10:04 PM (6 years ago)
Author:
pkienzle
Branches:
master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
47fb816
Parents:
aa90015
Message:

cuda support: allow cylinder model to run under CUDA as well as OpenCL

Location:
sasmodels/models/lib
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/lib/gauss76.c

    r99b84ec r0db7dbd  
    1111 
    1212// Gaussians 
    13 constant double Gauss76Wt[76]={ 
     13constant_var double Gauss76Wt[76] = { 
    1414        .00126779163408536,             //0 
    1515        .00294910295364247, 
     
    9090}; 
    9191 
    92 constant double Gauss76Z[76]={ 
     92constant_var double Gauss76Z[76] = { 
    9393        -.999505948362153,              //0 
    9494        -.997397786355355, 
  • sasmodels/models/lib/polevl.c

    r447e9aa r0db7dbd  
    5151*/ 
    5252 
    53 double polevl( double x, constant double *coef, int N ); 
    54 double polevl( double x, constant double *coef, int N ) 
     53__device__ static 
     54double polevl( double x, constant_par double *coef, int N ) 
    5555{ 
    5656 
     
    7272 */ 
    7373 
    74 double p1evl( double x, constant double *coef, int N ); 
    75 double p1evl( double x, constant double *coef, int N ) 
     74__device__ static 
     75double p1evl( double x, constant_par double *coef, int N ) 
    7676{ 
    7777    int i=0; 
  • sasmodels/models/lib/sas_J1.c

    r5181ccc r0db7dbd  
    4242#if FLOAT_SIZE>4 
    4343//Cephes double pression function 
    44 double cephes_j1(double x); 
    45  
    46 constant double RPJ1[8] = { 
     44 
     45constant_var double RPJ1[8] = { 
    4746    -8.99971225705559398224E8, 
    4847    4.52228297998194034323E11, 
     
    5453    0.0 }; 
    5554 
    56 constant double RQJ1[8] = { 
     55constant_var double RQJ1[8] = { 
    5756    6.20836478118054335476E2, 
    5857    2.56987256757748830383E5, 
     
    6564    }; 
    6665 
    67 constant double PPJ1[8] = { 
     66constant_var double PPJ1[8] = { 
    6867    7.62125616208173112003E-4, 
    6968    7.31397056940917570436E-2, 
     
    7675 
    7776 
    78 constant double PQJ1[8] = { 
     77constant_var double PQJ1[8] = { 
    7978    5.71323128072548699714E-4, 
    8079    6.88455908754495404082E-2, 
     
    8685    0.0 }; 
    8786 
    88 constant double QPJ1[8] = { 
     87constant_var double QPJ1[8] = { 
    8988    5.10862594750176621635E-2, 
    9089    4.98213872951233449420E0, 
     
    9695    2.52070205858023719784E1 }; 
    9796 
    98 constant double QQJ1[8] = { 
     97constant_var double QQJ1[8] = { 
    9998    7.42373277035675149943E1, 
    10099    1.05644886038262816351E3, 
     
    106105    0.0 }; 
    107106 
     107__device__ static 
    108108double cephes_j1(double x) 
    109109{ 
     
    155155#else 
    156156//Single precission version of cephes 
    157 float cephes_j1f(float x); 
    158  
    159 constant float JPJ1[8] = { 
     157constant_var float JPJ1[8] = { 
    160158    -4.878788132172128E-009, 
    161159    6.009061827883699E-007, 
     
    168166    }; 
    169167 
    170 constant float MO1J1[8] = { 
     168constant_var float MO1J1[8] = { 
    171169    6.913942741265801E-002, 
    172170    -2.284801500053359E-001, 
     
    179177    }; 
    180178 
    181 constant float PH1J1[8] = { 
     179constant_var float PH1J1[8] = { 
    182180    -4.497014141919556E+001, 
    183181    5.073465654089319E+001, 
     
    190188    }; 
    191189 
     190__device__ static 
    192191float cephes_j1f(float xx) 
    193192{ 
     
    240239 
    241240//Finally J1c function that equals 2*J1(x)/x 
    242 double sas_2J1x_x(double x); 
     241__device__ static 
    243242double sas_2J1x_x(double x) 
    244243{ 
Note: See TracChangeset for help on using the changeset viewer.