From f7c63f680e08d2db244ed18a3b07a2e78bac346d Mon Sep 17 00:00:00 2001 From: Chris Elrod Date: Fri, 7 Feb 2020 07:28:43 -0500 Subject: [PATCH] Overload base functions for ::SVec with glibc funcs when available. --- Project.toml | 2 +- deps/build.jl | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Project.toml b/Project.toml index 3336502..049c80e 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "SLEEFPirates" uuid = "476501e8-09a2-5ece-8869-fb82de89a1fa" authors = ["chriselrod "] -version = "0.3.3" +version = "0.3.4" [deps] Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" diff --git a/deps/build.jl b/deps/build.jl index 3b0a59f..c8a8332 100644 --- a/deps/build.jl +++ b/deps/build.jl @@ -29,14 +29,14 @@ function create_svmlwrap_file(mveclib) vtyp = "NTuple{$ts,Core.VecElement{$typ}}" svtyp = "SVec{$ts,$typ}" def1 = "@inline $f(v::$vtyp) = ccall((:$func,MVECLIB), $vtyp, ($vtyp,), v)" - def2 = "@inline $f(v::$svtyp) = SVec($f(extract_data(v)))" + def2 = "@inline Base.$f(v::$svtyp) = SVec($f(extract_data(v)))" push!(file, def1) push!(file, def2) end end end end - let f = :pow + let f = :pow, sf = :^ for (l,s) ∈ sizes if s ≤ REGISTER_SIZE for isdouble ∈ (true,false) @@ -48,7 +48,7 @@ function create_svmlwrap_file(mveclib) vtyp = "NTuple{$ts,Core.VecElement{$typ}}" svtyp = "SVec{$ts,$typ}" def1 = "@inline $f(v1::$vtyp, v2::$vtyp) = ccall((:$func,MVECLIB), $vtyp, ($vtyp,$vtyp), v1, v2)" - def2 = "@inline $f(v1::$svtyp, v2::$svtyp) = SVec($f(extract_data(v1),extract_data(v2)))" + def2 = "@inline $sf(v1::$svtyp, v2::$svtyp) = SVec($f(extract_data(v1),extract_data(v2)))" push!(file, def1) push!(file, def2) end