Commit 9b5e4a1
authored
fix(simd.h): fix leaking of Imath.h into public headers (#4062)
A recent change (PR 4026) tried to include Imath.h in cases where there
was no SSE support (to provide a fallback implementation of matrix
invert, because simd.h's native one requires SSE), but it had a mistake
-- it used `#if !OIIO_SIMD_SSE` prior to that symbol being defined! This
caused the header to always be included, which is not what we wanted, as
we desired for that header to not be exposed in the public headers.
This patch offers a temporary/partial fix by simply moving that guarded
include later in the file to after OIIO_SIMD_SSE is defined. For
architectures that support SSE, at least, this achieves our goal of not
exposing Imath.h in public headers.
I need this patch right away to solve a particular problem I'm running
into.
Longer term, we note that this isn't a full solution -- on non-SSE
architectures (like ARM), it still ends up exposing Imath.h against our
desire.
For today, so be it. A better fix would be to rewrite our current
SSE-requiring invert to change the SSE intrinsics therein to the wrapped
kind we use with our simd classes, which will let it work fine with ARM.
But I feel like that needs to be done carefully and with more testing
than I can afford at this minute when I need this fix. I will return to
it shortly, but need this patch now.
Signed-off-by: Larry Gritz <lg@larrygritz.com>1 parent f2ebf59 commit 9b5e4a1
1 file changed
+6
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | 49 | | |
54 | 50 | | |
55 | 51 | | |
| |||
279 | 275 | | |
280 | 276 | | |
281 | 277 | | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
282 | 284 | | |
283 | 285 | | |
284 | 286 | | |
| |||
0 commit comments