From def82ed0c4538c5b18be520d93687b568f284678 Mon Sep 17 00:00:00 2001 From: Troels Arnfred Bojesen Date: Thu, 16 Jan 2020 18:47:45 +0900 Subject: [PATCH] Add atan(y,x) See also #443 --- src/device/cuda/math.jl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/device/cuda/math.jl b/src/device/cuda/math.jl index 6f41d3fa..8bf08918 100644 --- a/src/device/cuda/math.jl +++ b/src/device/cuda/math.jl @@ -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)