Changeset 8a20be5 in sasmodels for Kernel-Lamellar.cpp
- Timestamp:
- Jul 10, 2014 3:05:08 PM (10 years ago)
- 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
- 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) 3 7 { 4 8 int i = get_global_id(0); 5 9 if(i < length) 6 10 { 7 floatq = sqrt(qx[i]*qx[i]+qy[i]*qy[i]);8 floatpi = 4.0*atan(1.0);9 floatPq = 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)); 10 14 ret[i] = 2.0*pi*scale*Pq/(q*q)/bi_thick*1.0e8; 11 15 ret[i] += background;
Note: See TracChangeset
for help on using the changeset viewer.