Skip to content

Commit

Permalink
Added overloads for SIMDPirates.vexp and SIMDPirates.vlog so that the…
Browse files Browse the repository at this point in the history
…y work with Float32.
  • Loading branch information
chriselrod committed Jan 2, 2020
1 parent c438553 commit 2430593
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
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 <elrodc@gmail.com>"]
version = "0.1.0"
version = "0.1.1"

[deps]
SIMDPirates = "21efa798-c60a-11e8-04d3-e1a92915a26a"
Expand Down
3 changes: 3 additions & 0 deletions src/SLEEFPirates.jl
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,9 @@ end
@inline logit(x::SIMDPirates.AbstractSIMDVector{W,T}) where {W,T} = log(SIMDPirates.vfdiv(x,vsub(vbroadcast(Vec{W,T},one(T)),x)))
@inline invlogit(x) = 1 / (1 + exp(-x))
@inline invlogit(x::SIMDPirates.AbstractSIMDVector{W,T}) where {W,T} = SIMDPirates.vfdiv( vbroadcast(Vec{W,T},one(T)), vadd(vbroadcast(Vec{W,T},one(T)), exp(vsub(x))))
@inline SIMDPirates.vexp(v::SVec{W,Float32}) where {W} = exp(v)
@inline SIMDPirates.vlog(v::SVec{W,Float32}) where {W} = log(v)


include("precompile.jl")
_precompile_()
Expand Down

2 comments on commit 2430593

@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/7421

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.1.1 -m "<description of version>" 2430593c7b010f5759c11df38f21e98ecef97541
git push origin v0.1.1

Please sign in to comment.