Changeset 95e861b in sasmodels


Ignore:
Timestamp:
Mar 3, 2015 5:22:17 PM (10 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:
e819f71
Parents:
bfb195e
Message:

allow printf in C kernels for debugging

Location:
sasmodels
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/kernel_template.c

    rf734e7d r95e861b  
    1010#ifndef USE_OPENCL 
    1111#  ifdef __cplusplus 
     12     #include <cstdio> 
    1213     #include <cmath> 
    1314     #if defined(_MSC_VER) 
     
    2021       { svar=sin(angle); cvar=cos(angle); } 
    2122#  else 
     23     #include <stdio.h> 
    2224     #include <math.h> 
    2325     #if defined(_MSC_VER) 
  • sasmodels/models/lamellarCailleHG_kernel.c

    rcd55ac3 r95e861b  
    5555    //temp *= cos(dd*qval*ii/(1.0+t1)); 
    5656    temp *= cos(dd*qval*ii); 
     57    //if (temp < 0) printf("q=%g: ii=%d, cos(dd*q*ii)=cos(%g) < 0\n",qval,ii,dd*qval*ii); 
    5758    //temp *= exp(-1.0*(t2 + t3)/(2.0*(1.0+t1)) ); 
    5859    temp *= exp(-t2/2.0 ); 
     
    6869 
    6970  inten *= 1.0e-04;   // 1/A to 1/cm 
    70  
    7171  return(inten); 
    7272} 
Note: See TracChangeset for help on using the changeset viewer.