Skip to content

Commit

Permalink
Overload base functions for ::SVec with glibc funcs when available.
Browse files Browse the repository at this point in the history
  • Loading branch information
chriselrod committed Feb 7, 2020
1 parent 161eec4 commit f7c63f6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "SLEEFPirates"
uuid = "476501e8-09a2-5ece-8869-fb82de89a1fa"
authors = ["chriselrod <[email protected]>"]
version = "0.3.3"
version = "0.3.4"

[deps]
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
Expand Down
6 changes: 3 additions & 3 deletions deps/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down

6 comments on commit f7c63f6

@chriselrod
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/9019

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if Julia TagBot is installed, or can be done manually through the github interface, or via:

git tag -a v0.3.4 -m "<description of version>" f7c63f680e08d2db244ed18a3b07a2e78bac346d
git push origin v0.3.4

@chriselrod
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request updated: JuliaRegistries/General/9019

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if Julia TagBot is installed, or can be done manually through the github interface, or via:

git tag -a v0.3.4 -m "<description of version>" f7c63f680e08d2db244ed18a3b07a2e78bac346d
git push origin v0.3.4

@chriselrod
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request updated: JuliaRegistries/General/9019

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if Julia TagBot is installed, or can be done manually through the github interface, or via:

git tag -a v0.3.4 -m "<description of version>" f7c63f680e08d2db244ed18a3b07a2e78bac346d
git push origin v0.3.4

Please sign in to comment.