http://bugzilla.suse.com/show_bug.cgi?id=942285
http://bugzilla.suse.com/show_bug.cgi?id=942285#c4
--- Comment #4 from Hans Greif ---
Hello,
two corrections,
a)
double Ktheta( point S, point P )
{
double cos_xz = ( (P.x - S.x) / ( (P.x - S.x ) * (P.x - S.x ) + (P.z - S.z
) * (P.z - S.z ) ) );
double cos_xy = ( (P.x - S.x) / ( (P.x - S.x ) * (P.x - S.x ) + (P.y - S.y
) * (P.y - S.y ) ) );
// cos(theta) = n * m /(||n||*||m||)
//K_theta = ( 1 + cos(theta) ) / 2.0;
//return (1.0 + cos_theta) / 2.0;
return cos_xz * cos_xy;
}
b)
#ifdef _OPENMP
omp_set_lock(&lock);
//#pragma omp parallel reduction(+:C[jj, jlow,jlow+djj][ii,
ilow,ilow+dii][n,0,1] )
{
for (jj=0; jj< djj; jj++)
for (ii=0; ii< dii; ii++)
{
#pragma omp atomic
C[jj+jlow][ii+ilow][0] += *( private_tile_r + jj * dii + ii) ;
C[jj+jlow][ii+ilow][1] += *( private_tile_i + jj * dii + ii) ;
}
}
omp_unset_lock(&lock);
free(private_tile_r);
free(private_tile_i);
____
comment: reduction does not function(on c++) With these updates new_fresnel.cpp
works up to four or five threads on gcc-5.2, gcc-4.8.3 with some errors on
E_PH
evaluations. On treads > 6 structure is lost due too much noise.
This program show clearly, why on fresnel diffraction with Fourier Optics only
the paraxial (Fresnel) approximation can be found.
The 30x30 source points on optic seems too low. The image have chanced
dramatically
on 50x50 source points on optic.
Cheers,
grepi
--
You are receiving this mail because:
You are on the CC list for the bug.