Skip to content

Commit

Permalink
Merge pull request #16 from LudwigBoess/precompile
Browse files Browse the repository at this point in the history
Precompile
  • Loading branch information
LudwigBoess authored Mar 12, 2023
2 parents 6e13ff7 + 3fd7a56 commit 35e22ac
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 305 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/jlpkgbutler-ci-master-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
julia-version: ['1.7', '1.8']
julia-version: ['1.7', '1.8', 'nightly']
julia-arch: [x64, x86]
os: [ubuntu-latest, windows-latest, macOS-latest]
exclude:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/jlpkgbutler-ci-pr-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
julia-version: ['1.7', '1.8']
julia-version: ['1.7', '1.8', 'nightly']
julia-arch: [x64, x86]
os: [ubuntu-latest, windows-latest, macOS-latest]
exclude:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Manifest.toml
292 changes: 0 additions & 292 deletions Manifest.toml

This file was deleted.

10 changes: 6 additions & 4 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
name = "SynchrotronKernel"
uuid = "7c311715-997f-43ba-a0ee-db1ccfe8d7f2"
authors = ["LudwigBoess <lboess@usm.lmu.de>"]
version = "0.2.0"
version = "0.2.1"

[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
DocumenterTools = "35a29f4d-8980-5a13-9543-d66fff28ecb8"
SnoopPrecompile = "66db9d55-30c0-4569-8b51-7e840670fc0c"
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[compat]
Documenter = "0.25, 0.26, 0.27"
DocumenterTools = "0.1"
Documenter = ">=0.25"
DocumenterTools = ">=0.1"
SnoopPrecompile = "1"
SpecialFunctions = "1, 2"
julia = "1.7"
julia = ">=1.7"
14 changes: 7 additions & 7 deletions src/F.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
const GSL_SQRT_DBL_EPSILON = 1.4901161193847656e-08
const GSL_LOG_DBL_MIN = -7.0839641853226408e02

const synch_c0 = π / sqrt(3.0)
const synch_c0 = π / (3)

const c01 = 0.2257913526447274323630976
const cond1 = 2 * sqrt(2.0) * GSL_SQRT_DBL_EPSILON
const cond3 = -8.0 * GSL_LOG_DBL_MIN / 7.0
const cond1 = 2 * (2) * GSL_SQRT_DBL_EPSILON
const cond3 = -8 * GSL_LOG_DBL_MIN / 7

const synchrotron1_data = [ 30.364682982501076273,
17.079395277408394574,
Expand Down Expand Up @@ -69,7 +69,7 @@ const synchrotron2_data = [ 0.4490721623532660844,

@inline @fastmath function cheb_eval(coeff::Vector{<:Real}, order::Integer, x::Real)

d = 0.0
d = 0.0
dd = 0.0

x2 = 2x
Expand Down Expand Up @@ -98,7 +98,7 @@ Computes the first synchrotron function at a given frequency ratio ``x = \\frac{

if x < cond1

z = x^(1/3)
z = (x)
cf = 1 - 8.43812762813205e-01 * z * z
return 2.14952824153447863671 * z * cf

Expand All @@ -115,11 +115,11 @@ Computes the first synchrotron function at a given frequency ratio ``x = \\frac{

elseif x < cond3

t = (12.0 - x) / (x + 4.0)
t = (12 - x) / (x + 4)

result_c1 = cheb_eval( synchrotron1a_data, 23, t )

return sqrt(x) * result_c1 * exp(c01 - x)
return (x) * result_c1 * exp(c01 - x)

else
return 0.0
Expand Down
Loading

2 comments on commit 35e22ac

@LudwigBoess
Copy link
Owner Author

Choose a reason for hiding this comment

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

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

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 the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.2.1 -m "<description of version>" 35e22acd75ee98962401b4ef92170bece0edc1e0
git push origin v0.2.1

Please sign in to comment.