Changeset 8a20be5 in sasmodels for Kernel-Lamellar.cpp


Ignore:
Timestamp:
Jul 10, 2014 3:05:08 PM (10 years ago)
Author:
HMP1 <helen.park@…>
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:
8faffcd
Parents:
5378e40
Message:

Added a fit2 (fits two different models at different angles)
(preliminary) Added CoreshellCyl? and CapCyl? Kernels
(preliminary) Updated kernels to include functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Kernel-Lamellar.cpp

    r5378e40 r8a20be5  
    1 __kernel void LamellarKernel(__global const float *qx, global const float *qy, __global float *ret, const float bi_thick, 
    2  const float scale, const float sub, const float background, const int length) 
     1#ifndef real 
     2# define real float 
     3#endif 
     4 
     5__kernel void LamellarKernel(__global const real *qx, global const real *qy, __global real *ret, const real bi_thick, 
     6 const real scale, const real sub, const real background, const int length) 
    37{ 
    48    int i = get_global_id(0); 
    59    if(i < length) 
    610    { 
    7         float q = sqrt(qx[i]*qx[i]+qy[i]*qy[i]); 
    8         float pi = 4.0*atan(1.0); 
    9         float Pq = 2.0*sub*(sub/q)/q*(1.0-cos(q*bi_thick)); 
     11        real q = sqrt(qx[i]*qx[i]+qy[i]*qy[i]); 
     12        real pi = 4.0*atan(1.0); 
     13        real Pq = 2.0*sub*(sub/q)/q*(1.0-cos(q*bi_thick)); 
    1014        ret[i] = 2.0*pi*scale*Pq/(q*q)/bi_thick*1.0e8; 
    1115        ret[i] += background; 
Note: See TracChangeset for help on using the changeset viewer.