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

Add atan(y,x) #527

Merged
merged 1 commit into from
Jan 16, 2020
Merged
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
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