Skip to content
This repository was archived by the owner on May 27, 2021. It is now read-only.

Commit def82ed

Browse files
committed
Add atan(y,x)
See also #443
1 parent 1da2e28 commit def82ed

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/device/cuda/math.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
# ! CUDAnative.atan2 is equivalent to Base.atan
3636
@inline atan2(x::Float64, y::Float64) = ccall("extern __nv_atan2", llvmcall, Cdouble, (Cdouble, Cdouble), x, y)
3737
@inline atan2(x::Float32, y::Float32) = ccall("extern __nv_atan2f", llvmcall, Cfloat, (Cfloat, Cfloat), x, y)
38+
@inline atan(x::Float64, y::Float64) = atan2(x, y)
39+
@inline atan(x::Float32, y::Float32) = atan2(x, y)
3840

3941
@inline angle(x::ComplexF64) = atan2(x.im, x.re)
4042
@inline angle(x::ComplexF32) = atan2(x.im, x.re)

0 commit comments

Comments
 (0)