Skip to content
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

[SYCL] Add support for MSVC internal math functions in device library #1441

Merged
merged 6 commits into from
Apr 30, 2020
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
keep original order of definition in cmath_wrapper
Signed-off-by: gejin <ge.jin@intel.com>
  • Loading branch information
jinge90 committed Apr 28, 2020
commit 37b15047a6e6d10e5ac396173b5dec7dbdb06eb5
13 changes: 7 additions & 6 deletions libdevice/cmath_wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@ float frexpf(float x, int *exp) { return __devicelib_frexpf(x, exp); }

DEVICE_EXTERN_C
float ldexpf(float x, int exp) { return __devicelib_ldexpf(x, exp); }

DEVICE_EXTERN_C
float hypotf(float x, float y) { return __devicelib_hypotf(x, y); }
#else
DEVICE_EXTERN_C
float _hypotf(float x, float y) { return __devicelib_hypotf(x, y); }
#endif

bader marked this conversation as resolved.
Show resolved Hide resolved
DEVICE_EXTERN_C
Expand Down Expand Up @@ -68,6 +62,11 @@ float sqrtf(float x) { return __devicelib_sqrtf(x); }
DEVICE_EXTERN_C
float cbrtf(float x) { return __devicelib_cbrtf(x); }

#ifndef _WIN32
DEVICE_EXTERN_C
float hypotf(float x, float y) { return __devicelib_hypotf(x, y); }
#endif

DEVICE_EXTERN_C
float erff(float x) { return __devicelib_erff(x); }

Expand Down Expand Up @@ -366,4 +365,6 @@ float _FSinh(float x, float y) { // compute y * sinh(x), |y| <= 1
}
}

DEVICE_EXTERN_C
float _hypotf(float x, float y) { return __devicelib_hypotf(x, y); }
#endif