Skip to content

Conversation

@lgritz
Copy link
Collaborator

@lgritz lgritz commented Aug 3, 2025

I spotted two places where we used a nonexistent OSL_GCCVERSION macro. This is never defined.

In platform.h, I think it's a simple typo and should be OSL_GNUC_VERSION, which is the macro we actually use to hold the GCC version, or 0 if it's not being compiled by GCC.

In wide_opcolor.cpp, it's odder and seems like also a cut-and-paste error. At the very least it should be OSL_CLANG_VERSION since it's part of a clause that also tests that clang < 14.0.

I spotted two places where we used a *nonexistant* OSL_GCCVERSION
macro. This is never defined.

In platform.h, I think it's a simple typo and should be
OSL_GNUC_VERSION, which is the macro we actually use to hold the GCC
version, or 0 if it's not being compiled by GCC.

In wide_opcolor.cpp, it's odder and seems like also a cut-and-paste
error. At the very least it should be OSL_CLANG_VERSION since it's
part of a clause that also tests that clang < 14.0. But upon staring
at it, I can't help but wonder if this spot should *also* have a
clause `OSL_GNUC_VERSION ||` to make this simd loop macro work properly
for GCC, as it did in the other one in platform.h?

And should the one in platform.h include clang, or no?

Signed-off-by: Larry Gritz <[email protected]>
@lgritz lgritz requested a review from AlexMWells August 3, 2025 22:30
@lgritz
Copy link
Collaborator Author

lgritz commented Aug 28, 2025

@AlexMWells This look right to you?

@lgritz
Copy link
Collaborator Author

lgritz commented Sep 29, 2025

This has been sitting around for a while. Any comments? @AlexMWells?

Copy link
Contributor

@AlexMWells AlexMWells left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM,
although we might want a todo to try different clang versions to see if at some version the WIDE_TRANSFORMC_OMP_SIMD_LOOP can be re-enabled.

@lgritz lgritz merged commit 2a3f943 into AcademySoftwareFoundation:main Oct 1, 2025
26 checks passed
@lgritz lgritz added the build / testing / port / CI Affecting the build system, tests, platform support, porting, or continuous integration. label Oct 15, 2025
lgritz added a commit to lgritz/OpenShadingLanguage that referenced this pull request Oct 24, 2025
…ndation#2015)

I spotted two places where we used a *nonexistant* OSL_GCCVERSION
macro. This is never defined.

In platform.h, I think it's a simple typo and should be
OSL_GNUC_VERSION, which is the macro we actually use to hold the GCC
version, or 0 if it's not being compiled by GCC.

In wide_opcolor.cpp, it's odder and seems like also a cut-and-paste
error. At the very least it should be OSL_CLANG_VERSION since it's
part of a clause that also tests that clang < 14.0. But upon staring
at it, I can't help but wonder if this spot should *also* have a
clause `OSL_GNUC_VERSION ||` to make this simd loop macro work properly
for GCC, as it did in the other one in platform.h?

And should the one in platform.h include clang, or no?

Signed-off-by: Larry Gritz <[email protected]>
@lgritz lgritz deleted the lg-batch-macro-typo branch October 27, 2025 01:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build / testing / port / CI Affecting the build system, tests, platform support, porting, or continuous integration.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants