-
Notifications
You must be signed in to change notification settings - Fork 790
[ESIMD] Fix compilation errors caused by type_name() function #9092
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ESIMD] Fix compilation errors caused by type_name() function #9092
Conversation
The usage of static for one of utility functions caused such warnings before: function 'esimd_test::type_name<unsigned long>' has internal linkage but is not defined [-Wundefined-internal] Signed-off-by: Vyacheslav N Klochkov <[email protected]>
…ction Signed-off-by: Vyacheslav N Klochkov <[email protected]>
Signed-off-by: Vyacheslav N Klochkov <[email protected]>
@@ -568,7 +568,7 @@ std::unique_ptr<T, USMDeleter> usm_malloc_shared(queue q, int n) { | |||
return std::move(res); | |||
} | |||
|
|||
template <class T> static const char *type_name(); | |||
template <class T> const char *type_name() { return typeid(T).name(); } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the function is defined, then likely the warning will not be issued.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, but that 'static' keyword did not seem to be needed for this template function
The fail on AMDGPU is unrelated: The fail in Jenkins/Precommit (ProtexIP) showed pass after restart: https://cje-fm-owrp-prod03.devtools.intel.com/satg-ce-compiler-pipelines/blue/organizations/jenkins/SYCL_CI%2Fintel%2FProtexIP/detail/ProtexIP/188/pipeline/ |
The usage of static for one of utility functions caused such warnings before: function 'esimd_test::type_name' has internal linkage
but is not defined [-Wundefined-internal]
Fixes #8934