Skip to content

[SYCL][NFC] Remove include 'cmath' from the headers. #104

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

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions sycl/doc/GetStartedWithSYCLCompiler.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,13 +188,7 @@ int main() {
translation units.
- SYCL host device is not fully supported.
- SYCL works only with OpenCL implementations supporting out-of-order queues.
- `math.h` header is conflicting with SYCL headers. Please use `cmath` as a
workaround for now like below:

```c++
//#include <math.h> // conflicting
#include <cmath>
```

# Find More

Expand Down
3 changes: 0 additions & 3 deletions sycl/include/CL/sycl/detail/builtins.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
#include <CL/sycl/detail/generic_type_traits.hpp>

#include <type_traits>
// TODO Delete this include after solving the problems in the test
// infrastructure.
#include <cmath>

// TODO Decide whether to mark functions with this attribute.
#define __NOEXC /*noexcept*/
Expand Down
2 changes: 2 additions & 0 deletions sycl/test/basic_tests/half_type.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

#include <CL/sycl.hpp>

#include <cmath>

using namespace cl::sycl;

constexpr float FLT_EPSILON = 9.77e-4;
Expand Down