-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from co1emi11er2/precompile
Precompile
- Loading branch information
Showing
4 changed files
with
64 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
@setup_workload begin | ||
# Putting some things in `@setup_workload` instead of `@compile_workload` can reduce the size of the | ||
# precompile file and potentially make loading faster. | ||
b = 5.0 | ||
h = 15.0 | ||
a = 1 | ||
xx = [1; 2; 3] | ||
yy = [4; 5; 6] | ||
|
||
@compile_workload begin | ||
|
||
# Generic calc | ||
@handcalcs begin | ||
Iy = h*b^3/12; "moment of inertia y"; | ||
Ix = b*h^3/12; "moment of inertia x"; | ||
end | ||
|
||
# parameters calcs | ||
@handcalcs begin | ||
a | ||
bb = 2 | ||
cc = 3 | ||
x = 4 | ||
y = 5 | ||
z = 6 | ||
end cols=3 spa=5 h_env = "align" | ||
|
||
|
||
calc = @handcalcs z = xx + yy | ||
|
||
@handcalcs x = (-5.0 + sqrt(5.0^2 - 4*2*2))/(2*2) | ||
|
||
# @handcalcs begin | ||
# I_x = calc_Ix(5,15) | ||
# end | ||
|
||
# @handcalcs begin | ||
# I_s = calc_Is(5,15) | ||
# end | ||
|
||
# @handcalcs begin | ||
# I_s = calc_Is(5,15) | ||
# end not_funcs = [calc_Ix calc_Iy] | ||
|
||
end | ||
end |
55c85b8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JuliaRegistrator register
Release notes:
Added Feature
55c85b8
There was a problem hiding this comment.
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/105411
Tagging
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: