Skip to content

Commit

Permalink
fix wrong ray-tracer problem when compile with omp, finish fedora pac…
Browse files Browse the repository at this point in the history
…kaging
  • Loading branch information
fangq committed Mar 3, 2020
1 parent d4608f4 commit 99312c3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/mmc_cl_host.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ void mmc_run_cl(mcconfig *cfg,tetmesh *mesh, raytracer *tracer){
{{cfg->srcparam2.x,cfg->srcparam2.y,cfg->srcparam2.z,cfg->srcparam2.w}},
cfg->issaveref,cfg->maxgate,(uint)cfg->debuglevel, detreclen, cfg->outputtype, mesh->elemlen,
cfg->mcmethod, cfg->method, 1.f/cfg->unitinmm,
#ifdef MMC_USE_SSE
#if defined(MMC_USE_SSE) || defined(USE_OPENCL)
cfg->srcpos.w,
#else
0.f,
Expand Down
4 changes: 2 additions & 2 deletions src/simpmesh.c
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@ void tracer_build(raytracer *tracer){
Rn2*=Rn2;
vec_mult(vecN+1,Rn2,vecN+1);
vec_mult(vecN+2,Rn2,vecN+2);
#ifdef MMC_USE_SSE
#if defined(MMC_USE_SSE) || defined(USE_OPENCL)
vecN->w = vec_dot(vecN, &nodes[ea]);
(vecN+1)->w=-vec_dot(vecN+1,&nodes[ea]);
(vecN+2)->w=-vec_dot(vecN+2,&nodes[ea]);
Expand Down Expand Up @@ -760,7 +760,7 @@ void tracer_build(raytracer *tracer){
vecN[j]=vN.x;
vecN[j+4]=vN.y;
vecN[j+8]=vN.z;
#ifdef MMC_USE_SSE
#if defined(MMC_USE_SSE) || defined(USE_OPENCL)
vecN[j+12] = vec_dot(&vN, &nodes[ea]);
#endif
}
Expand Down
2 changes: 1 addition & 1 deletion src/vector_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ typedef struct MMC_float4{
if SSE is enabled, float3 is identical to float4
*/

#ifdef MMC_USE_SSE
#if defined(MMC_USE_SSE) || defined(USE_OPENCL)
typedef struct MMC_float4 float3;
#else
typedef struct MMC_float3{
Expand Down

0 comments on commit 99312c3

Please sign in to comment.