Skip to content

SYCL cmath wrapper causing GLM round function ambiguity #94

@juanchuletas

Description

@juanchuletas

Description

The core problem is a name resolution collision between two C++ namespaces that didn't used to overlap in the include chain.
What changed in Intel LLVM after nightly-2025-02-27.

The SYCL compiler ships its own cmath wrapper (__sycl_cmath_wrapper_impl.hpp) that re-declares math functions like round in the global namespace so they're available on both host and device. Before that nightly, these declarations were injected later in the include order, or with narrower overload sets. After that commit, the wrapper pulls in more overloads earlier, so by the time GLM's headers are processed, the compiler sees multiple round candidates at global scope.
Why GLM breaks
GLM's functor1::call is a template that takes a function pointer as a template or regular argument. When GLM writes call(round, x), it's passing round as an unqualified name. The compiler needs to resolve that name to exactly one function to form a function pointer. With the old SYCL headers there was only one viable round visible (the standard C one, or the std::round pulled into global scope). Now there are multiple overloads (for float, double, long double, plus potentially SYCL-specific ones), so the compiler can't pick one without disambiguation. That's the "address of overloaded function is ambiguous" error.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions