Changeset ba32cdd in sasmodels


Ignore:
Timestamp:
Mar 24, 2016 6:36:40 PM (8 years ago)
Author:
Paul Kienzle <pkienzle@…>
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:
5ff1b03
Parents:
151f3bc
Message:

fix opencl compile; still doesn't run

Location:
sasmodels
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/kernel_header.c

    r380e8c9 rba32cdd  
    103103#  define M_4PI_3 4.18879020478639 
    104104#endif 
    105 static inline double square(double x) { return x*x; } 
    106 static inline double cube(double x) { return x*x*x; } 
    107 static inline double sinc(double x) { return x==0 ? 1.0 : sin(x)/x; } 
     105static double square(double x) { return x*x; } 
     106static double cube(double x) { return x*x*x; } 
     107static double sinc(double x) { return x==0 ? 1.0 : sin(x)/x; } 
    108108 
  • sasmodels/kernel_iq.c

    r380e8c9 rba32cdd  
    7474 
    7575#if MAX_PD > 0 
    76  
    77 printf("Entering polydispersity\n"); 
     76  //printf("Entering polydispersity\n"); 
     77 
    7878  // Since we are no longer looping over the entire polydispersity hypercube 
    7979  // for each q, we need to track the normalization values for each q in a 
     
    136136        if (problem->pd_isvol[k]) partial_volweight *= wi; 
    137137      } 
    138       printf("slow %d: ", loop_index); 
     138      //printf("slow %d: ", loop_index); 
    139139      for (int k=0; k < NPARS; k++) { 
    140140        int coord = problem->par_coord[k]; 
     
    150150        offset[k] = this_offset; 
    151151        pvec[k] = values[this_offset]; 
    152         printf("p[%d]=v[%d]=%g ", k, offset[k], pvec[k]); 
    153       } 
    154       printf("\n"); 
     152        //printf("p[%d]=v[%d]=%g ", k, offset[k], pvec[k]); 
     153      } 
     154      //printf("\n"); 
    155155      weight = partial_weight * weights[problem->pd_offset[0]+pd_index[0]]; 
    156156      if (problem->theta_par >= 0) { 
     
    168168      weight = partial_weight*wi; 
    169169      if (problem->pd_isvol[0]) vol_weight *= wi; 
    170       printf("fast %d: ", loop_index); 
     170      //printf("fast %d: ", loop_index); 
    171171      for (int k=0; k < problem->fast_coord_count; k++) { 
    172172        const int pindex = problem->fast_coord_pars[k]; 
    173173        pvec[pindex] = values[++offset[pindex]]; 
    174         printf("p[%d]=v[%d]=%g ", pindex, offset[pindex], pvec[pindex]); 
    175       } 
    176       printf("\n"); 
     174        //printf("p[%d]=v[%d]=%g ", pindex, offset[pindex], pvec[pindex]); 
     175      } 
     176      //printf("\n"); 
    177177      if (problem->theta_par == problem->pd_par[0]) { 
    178178        weight *= fabs(cos(M_PI_180*pvec[problem->theta_par])); 
  • sasmodels/kernelcl.py

    rfec69dd rba32cdd  
    4848harmless, albeit annoying. 
    4949""" 
     50from __future__ import print_function 
    5051import os 
    5152import warnings 
     
    169170    options = (get_fast_inaccurate_build_options(context.devices[0]) 
    170171               if fast else []) 
    171     source = "\n".join(source) 
     172    source = "\n".join(source_list) 
    172173    program = cl.Program(context, source).build(options=options) 
    173174    return program 
     
    439440    """ 
    440441    def __init__(self, kernel, model_info, q_vectors, dtype): 
    441         max_pd = self.info['max_pd'] 
     442        max_pd = model_info['max_pd'] 
    442443        npars = len(model_info['parameters'])-2 
    443444        q_input = GpuInput(q_vectors, dtype) 
  • sasmodels/models/lib/Si.c

    re7678b2 rba32cdd  
     1// integral of sin(x)/x Taylor series approximated to w/i 0.1% 
    12double Si(double x); 
    23 
    3 // integral of sin(x)/x Taylor series approximated to w/i 0.1% 
    44double Si(double x) 
    55{ 
  • sasmodels/models/lib/polevl.c

    r0b05c24 rba32cdd  
    5151*/ 
    5252 
    53 double polevl( double x, constant double *coef, int N ) { 
     53double polevl( double x, constant double *coef, int N ); 
     54double p1evl( double x, constant double *coef, int N ); 
     55 
     56 
     57double polevl( double x, constant double *coef, int N ) 
     58{ 
    5459 
    5560    int i = 0; 
     
    7075 */ 
    7176 
    72 double p1evl( double x, constant double *coef, int N ) { 
     77double p1evl( double x, constant double *coef, int N ) 
     78{ 
    7379    int i=0; 
    7480    double ans = x+coef[i]; 
  • sasmodels/models/lib/sas_J0.c

    ra776125 rba32cdd  
    4949Copyright 1984, 1987, 1989, 2000 by Stephen L. Moshier 
    5050*/ 
     51 
     52double sas_J0(double x); 
    5153 
    5254/* Note: all coefficients satisfy the relative error criterion 
     
    177179 }; 
    178180 
    179 double sas_J0(double x) { 
     181double sas_J0(double x) 
     182{ 
    180183 
    181184//Cephes single precission 
  • sasmodels/models/lib/sas_J1.c

    r19b9005 rba32cdd  
    3939Copyright 1984, 1987, 1989, 2000 by Stephen L. Moshier 
    4040*/ 
     41double sas_J1(double x); 
     42double sas_J1c(double x); 
    4143 
    4244constant double RPJ1[8] = { 
     
    135137    }; 
    136138 
    137 double sas_J1(double x) { 
     139double sas_J1(double x) 
     140{ 
    138141 
    139142//Cephes double pression function 
  • sasmodels/models/lib/sas_JN.c

    ra776125 rba32cdd  
    4747Copyright 1984, 1987, 2000 by Stephen L. Moshier 
    4848*/ 
    49  
    5049double sas_JN( int n, double x ); 
    5150 
    52 double sas_JN( int n, double x ) { 
     51double sas_JN( int n, double x ) 
     52{ 
    5353 
    5454    const double MACHEP = 1.11022302462515654042E-16; 
  • sasmodels/models/lib/sph_j1c.c

    re6f1410 rba32cdd  
    77* using double precision that are the source. 
    88*/ 
     9double sph_j1c(double q); 
    910 
    1011// The choice of the number of terms in the series and the cutoff value for 
     
    4344#endif 
    4445 
    45 double sph_j1c(double q); 
    4646double sph_j1c(double q) 
    4747{ 
  • sasmodels/models/lib/sphere_form.c

    rad90df9 rba32cdd  
    1 inline double 
    2 sphere_volume(double radius) 
     1double sphere_volume(double radius); 
     2double sphere_form(double q, double radius, double sld, double solvent_sld); 
     3 
     4double sphere_volume(double radius) 
    35{ 
    46    return M_4PI_3*cube(radius); 
    57} 
    68 
    7 inline double 
    8 sphere_form(double q, double radius, double sld, double solvent_sld) 
     9double sphere_form(double q, double radius, double sld, double solvent_sld) 
    910{ 
    1011    const double fq = sphere_volume(radius) * sph_j1c(q*radius); 
  • sasmodels/models/lib/wrc_cyl.c

    re7678b2 rba32cdd  
    22    Functions for WRC implementation of flexible cylinders 
    33*/ 
     4double Sk_WR(double q, double L, double b); 
     5 
     6 
    47static double 
    58AlphaSquare(double x) 
     
    363366} 
    364367 
    365 double Sk_WR(double q, double L, double b); 
    366368double Sk_WR(double q, double L, double b) 
    367369{ 
Note: See TracChangeset for help on using the changeset viewer.