Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
Hercules
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
llvm
Hercules
Commits
0364edb3
Commit
0364edb3
authored
3 weeks ago
by
Russel Arbore
Browse files
Options
Downloads
Patches
Plain Diff
cfd is tricky
parent
0a6326e6
No related branches found
No related tags found
1 merge request
!203
More rodinia optimization
Pipeline
#201914
failed
3 weeks ago
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
juno_samples/rodinia/cfd/src/cpu_euler.sch
+2
-1
2 additions, 1 deletion
juno_samples/rodinia/cfd/src/cpu_euler.sch
juno_samples/rodinia/cfd/src/euler.jn
+5
-5
5 additions, 5 deletions
juno_samples/rodinia/cfd/src/euler.jn
with
7 additions
and
6 deletions
juno_samples/rodinia/cfd/src/cpu_euler.sch
+
2
−
1
View file @
0364edb3
...
...
@@ -24,7 +24,8 @@ fixpoint {
fork-guard-elim(*);
}
simpl!(*);
no-memset(compute_step_factor@res, compute_flux@res, copy_vars@res);
parallel-reduce(time_step, copy_vars, compute_flux@outer_loop \ compute_flux@inner_loop);
unforkify(*);
gcm(*);
This diff is collapsed.
Click to expand it.
juno_samples/rodinia/cfd/src/euler.jn
+
5
−
5
View file @
0364edb3
...
...
@@ -47,7 +47,7 @@ fn compute_speed_of_sound(density: f32, pressure: f32) -> f32 {
}
fn
compute_step_factor
<
nelr
:
usize
>
(
variables
:
Variables
::
<
nelr
>
,
areas
:
f32
[
nelr
])
->
f32
[
nelr
]
{
let
step_factors
:
f32
[
nelr
];
@
res
let
step_factors
:
f32
[
nelr
];
for
i
in
0
..
nelr
{
let
density
=
variables
.density
[
i
];
...
...
@@ -106,9 +106,9 @@ fn compute_flux<nelr: usize>(
ff_flux_contribution_momentum_z
:
float3
,
)
->
Variables
::
<
nelr
>
{
const
smoothing_coefficient
:
f32
=
0.2
;
let
fluxes
:
Variables
::
<
nelr
>
;
@
res
let
fluxes
:
Variables
::
<
nelr
>
;
for
i
in
0
..
nelr
{
@
outer_loop
for
i
in
0
..
nelr
{
let
density_i
=
variables
.density
[
i
];
let
momentum_i
=
float3
{
x
:
variables
.momentum.x
[
i
],
...
...
@@ -131,7 +131,7 @@ fn compute_flux<nelr: usize>(
let
flux_i_momentum
=
float3
{
x
:
0.0
,
y
:
0.0
,
z
:
0.0
};
let
flux_i_density_energy
:
f32
=
0.0
;
for
j
in
0
..
NNB
{
@
inner_loop
for
j
in
0
..
NNB
{
let
nb
=
elements_surrounding_elements
[
j
,
i
];
let
normal
=
float3
{
x
:
normals
.x
[
j
,
i
],
...
...
@@ -249,7 +249,7 @@ fn time_step<nelr: usize>(
}
fn
copy_vars
<
nelr
:
usize
>
(
variables
:
Variables
::
<
nelr
>
)
->
Variables
::
<
nelr
>
{
let
result
:
Variables
::
<
nelr
>
;
@
res
let
result
:
Variables
::
<
nelr
>
;
for
i
in
0
..
nelr
{
result
.density
[
i
]
=
variables
.density
[
i
];
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment