Skip to content

[SYCL][LIBCLC] Add double version of sin/cos. #4992

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

Closed
wants to merge 1 commit into from
Closed
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
10 changes: 9 additions & 1 deletion libclc/amdgcn-amdhsa/libspirv/math/cos.cl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,15 @@

#include <spirv/spirv.h>

float __ocml_cos_f32(float);
double __ocml_cos_f64(double);

_CLC_OVERLOAD _CLC_DECL _CLC_CONSTFN __clc_fp32_t
__spirv_ocl_cos(__clc_fp32_t In) {
return __builtin_amdgcn_cosf(In);
return __ocml_cos_f32(In);
}

_CLC_OVERLOAD _CLC_DECL _CLC_CONSTFN __clc_fp64_t
__spirv_ocl_cos(__clc_fp64_t In) {
return __ocml_cos_f64(In);
}
10 changes: 9 additions & 1 deletion libclc/amdgcn-amdhsa/libspirv/math/sin.cl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,15 @@

#include <spirv/spirv.h>

float __ocml_sin_f32(float);
double __ocml_sin_f64(double);

_CLC_OVERLOAD _CLC_DECL _CLC_CONSTFN __clc_fp32_t
__spirv_ocl_sin(__clc_fp32_t In) {
return __builtin_amdgcn_sinf(In);
return __ocml_sin_f32(In);
}

_CLC_OVERLOAD _CLC_DECL _CLC_CONSTFN __clc_fp64_t
__spirv_ocl_sin(__clc_fp64_t In) {
return __ocml_sin_f64(In);
}