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

Commit

Permalink
Add atan(y,x)
Browse files Browse the repository at this point in the history
See also #443
  • Loading branch information
Sleort committed Jan 16, 2020
1 parent 1da2e28 commit def82ed
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/device/cuda/math.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
# ! CUDAnative.atan2 is equivalent to Base.atan
@inline atan2(x::Float64, y::Float64) = ccall("extern __nv_atan2", llvmcall, Cdouble, (Cdouble, Cdouble), x, y)
@inline atan2(x::Float32, y::Float32) = ccall("extern __nv_atan2f", llvmcall, Cfloat, (Cfloat, Cfloat), x, y)
@inline atan(x::Float64, y::Float64) = atan2(x, y)
@inline atan(x::Float32, y::Float32) = atan2(x, y)

@inline angle(x::ComplexF64) = atan2(x.im, x.re)
@inline angle(x::ComplexF32) = atan2(x.im, x.re)
Expand Down

0 comments on commit def82ed

Please sign in to comment.