Skip to content

Commit 89dedd5

Browse files
committed
workaround for ICC2016 compiler bug
1 parent 7421bf3 commit 89dedd5

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

kernels/builders/bvh_builder_msmblur.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@ namespace embree
131131
return PrimRefMB (lbounds, tbounds.size(), num_time_segments, geomID, primID);
132132
}
133133

134-
__forceinline PrimRefMB operator() (const PrimRefMB& prim, const BBox1f time_range, const LinearSpace3fa& space) const
134+
// __noinline is workaround for ICC16 bug under MacOSX
135+
__noinline PrimRefMB operator() (const PrimRefMB& prim, const BBox1f time_range, const LinearSpace3fa& space) const
135136
{
136137
const unsigned geomID = prim.geomID();
137138
const unsigned primID = prim.primID();
@@ -146,7 +147,8 @@ namespace embree
146147
return scene->get<Mesh>(prim.geomID())->linearBounds(prim.primID(), time_range);
147148
}
148149

149-
__forceinline LBBox3fa linearBounds(const PrimRefMB& prim, const BBox1f time_range, const LinearSpace3fa& space) const {
150+
// __noinline is workaround for ICC16 bug under MacOSX
151+
__noinline LBBox3fa linearBounds(const PrimRefMB& prim, const BBox1f time_range, const LinearSpace3fa& space) const {
150152
return scene->get<Mesh>(prim.geomID())->linearBounds(space, prim.primID(), time_range);
151153
}
152154
};

kernels/builders/heuristic_binning_array_unaligned.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ namespace embree
258258
}
259259

260260
/*! returns bounds and centroid used for binning */
261-
__forceinline void binBoundsAndCenter (const PrimRefMB& ref, BBox3fa& bounds_o, Vec3fa& center_o) const
261+
__noinline void binBoundsAndCenter (const PrimRefMB& ref, BBox3fa& bounds_o, Vec3fa& center_o) const // __noinline is workaround for ICC16 bug under MacOSX
262262
{
263263
NativeCurves* mesh = scene->get<NativeCurves>(ref.geomID());
264264
LBBox3fa lbounds = mesh->linearBounds(space,ref.primID(),time_range);
@@ -267,7 +267,7 @@ namespace embree
267267
}
268268

269269
/*! returns bounds and centroid used for binning */
270-
__forceinline void binBoundsAndCenter (const PrimRefMB& ref, LBBox3fa& bounds_o, Vec3fa& center_o) const
270+
__noinline void binBoundsAndCenter (const PrimRefMB& ref, LBBox3fa& bounds_o, Vec3fa& center_o) const // __noinline is workaround for ICC16 bug under MacOSX
271271
{
272272
NativeCurves* mesh = scene->get<NativeCurves>(ref.geomID());
273273
LBBox3fa lbounds = mesh->linearBounds(space,ref.primID(),time_range);

0 commit comments

Comments
 (0)