How is embree passing aligned function arguments and still does work?

How is embree passing aligned function arguments and still does work?

I noticed in the file heuristic_binning.h, there's a type PrimInfo, whose c'tor accepts BBox3f by value, this will invoke a copy c'tor, but BBox3f has alignment inherited via Vec3f<float>. This shoud trigger and error with the MS compiler (error C2719), but it actully does not. Anyone care to explain why? Disabled somehow?

2 Beiträge / 0 neu
Letzter Beitrag
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.

Using the MS compiler values passed by value will not be properly aligned. As a workaround one has to pass all values by reference that need alignment. I fixed that bug in the git repository of Embree, check it out here embree.github.com

Kommentar hinterlassen

Bitte anmelden, um einen Kommentar hinzuzufügen. Sie sind noch nicht Mitglied? Jetzt teilnehmen