Skip to content

Commit 154d3ff

Browse files
authored
Add cdfnorm to available functions. (#57)
* Add gitignore * Add cdfnorm, tests, and some small tweaks * CI mod and remove test manifest * Try commenting ssh key * Remove old stuff * Increment minor version, as substantial features have been added * Re-enable documentar key
1 parent 7e5a1c4 commit 154d3ff

File tree

6 files changed

+15
-6
lines changed

6 files changed

+15
-6
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
## Build folder of Documenter.jl
2+
docs/build/
3+
Manifest.toml
4+
.vscode

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "IntelVectorMath"
22
uuid = "c8ce9da6-5d36-5c03-b118-5a70151be7bc"
3-
version = "0.4.3"
3+
version = "0.5.0"
44

55
[deps]
66
MKL_jll = "856f044c-d86e-5d09-b602-aeab76dc8ba7"

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This package provides bindings to the Intel MKL [Vector Mathematics Functions](h
1212
This is often substantially faster than broadcasting Julia's built-in functions, especially when applying a transcendental function over a large array.
1313
Until Julia 0.6 the package was registered as `VML.jl`.
1414

15-
Similar packages are [Yeppp.jl](https://github.com/JuliaMath/Yeppp.jl), which wraps the open source Yeppp library, and [AppleAccelerate.jl](https://github.com/JuliaMath/AppleAccelerate.jl), which provides access to macOS's Accelerate framework.
15+
Similar packages are [Yeppp.jl](https://github.com/JuliaMath/Yeppp.jl), which wraps the open-source Yeppp library, and [AppleAccelerate.jl](https://github.com/JuliaMath/AppleAccelerate.jl), which provides access to macOS's Accelerate framework.
1616

1717
### Warning for macOS
1818
There is currently [the following](https://github.com/JuliaPackaging/BinaryBuilder.jl/issues/700) issue between the `CompilerSupportLibraries_jll` artifact, which is used for example by `SpecialFunctions.jl`, and `MKL_jll`. Unless `MKL_jll` is loaded first, there might be wrong results coming from a small number of function for particular input array lengths. If you are unsure which, if any, your used packages might load this artifact, loading `IntelVectorMath` as the very first package should be fine.
@@ -33,11 +33,11 @@ julia> ] build IntelVectorMath
3333
If this does not work, please open an issue and include the output of `<packagedir>/deps/build.log`.
3434

3535
#### Renaming from VML
36-
If you used this package prior to its renaming, you may have to run `] rm VML` first. Otherwise there will be a conflict due to the UUID.
36+
If you used this package prior to its renaming, you may have to run `] rm VML` first. Otherwise, there will be a conflict due to the UUID.
3737

3838
## Using IntelVectorMath
3939
After loading `IntelVectorMath`, you have the supported function listed below, for example `IntelVectorMath.sin(rand(100))`. These should provide a significant speed-up over broadcasting the Base functions.
40-
Since the package name is quite long, an alias `IVM` is also exported to allow `IVM.sin(rand(100))` after `using` the package.
40+
As the package name is quite long, the alias `IVM` is also exported to allow `IVM.sin(rand(100))` after `using` the package.
4141
If you `import` the package, you can add this alias via `const IVM = IntelVectorMath`. Equally, you can replace `IVM` with another alias of your choice.
4242

4343
#### Example
@@ -216,7 +216,7 @@ Allocating | Mutating
216216

217217
### Binary functions
218218

219-
Allocating forms have signature `f(A, B)`. Mutating forms have
219+
Allocating forms have signature `f(A, B)`. Mutating forms have the
220220
signature `f!(out, A, B)`.
221221

222222
Allocating | Mutating
@@ -240,7 +240,7 @@ Next steps for this package
240240
* [x] Add tests for mutating functions
241241
* [x] Add own dependency management via BinaryProvider
242242
* [ ] Update function list in README
243-
* [ ] Adopt Julia 1.3 artifact system, breaking backwards compatibility
243+
* [x] Adopt Julia 1.3 artifact system, breaking backwards compatibility
244244

245245

246246

src/IntelVectorMath.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ unary_real = (
7676
(:inv_sqrt, :inv_sqrt!, :InvSqrt),
7777
(:pow2o3, :pow2o3!, :Pow2o3),
7878
(:pow3o2, :pow3o2!, :Pow3o2),
79+
(:cdfnorm, :cdfnorm!, :CdfNorm),
7980
)
8081

8182
binary_real = (

test/common.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ const base_unary_real = (
4646
(Main, :inv_cbrt, (0, 1000)),
4747
(Main, :pow2o3, (-1000, 1000)),
4848
(Main, :pow3o2, (0, 1000)),
49+
(Main, :cdfnorm, (-4, 4)),
4950
)
5051

5152
const base_binary_real = (

test/nonbase-functions.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ pow(x, y) = x^y
1414
# divide
1515
divide(x, y) = x / y
1616

17+
# cdfnorm
18+
cdfnorm(x) = 0.5 * (1 + SpecialFunctions.erf(x / sqrt(2)))
19+
1720
# :lgamma
1821
# Redefining for testing to avoid deprecation warning
1922
SpecialFunctions.lgamma(x::Union{Float64,Float32}) = (logabsgamma(x))[1]

0 commit comments

Comments
 (0)