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
Merge requests
!200
Rodinia benches
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Rodinia benches
rodinia_benches
into
main
Overview
2
Commits
5
Pipelines
4
Changes
5
Merged
rarbore2
requested to merge
rodinia_benches
into
main
3 weeks ago
Overview
2
Commits
5
Pipelines
4
Changes
5
Expand
Set up benches for rodinia samples.
Edited
3 weeks ago
by
rarbore2
0
0
Merge request reports
Viewing commit
747b2f41
Prev
Next
Show latest version
5 files
+
197
−
121
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
5
Search (e.g. *.vue) (Ctrl+P)
747b2f41
srad bench
· 747b2f41
Russel Arbore
authored
3 weeks ago
juno_samples/rodinia/srad/benches/srad_bench.rs
0 → 100644
+
62
−
0
Options
#![feature(concat_idents)]
use
criterion
::{
criterion_group
,
criterion_main
,
Criterion
};
use
hercules_rt
::{
runner
,
HerculesImmBox
,
HerculesImmBoxTo
,
HerculesMutBox
,
HerculesMutBoxTo
};
juno_build
::
juno!
(
"srad"
);
use
juno_srad
::
*
;
fn
srad_bench
(
c
:
&
mut
Criterion
)
{
let
mut
group
=
c
.benchmark_group
(
"srad bench"
);
let
mut
r
=
runner!
(
srad
);
let
niter
=
100
;
let
lambda
=
0.5
;
let
nrows
=
502
;
let
ncols
=
458
;
let
image
=
"data/image.pgm"
.to_string
();
let
Image
{
image
:
image_ori
,
max
,
rows
:
image_ori_rows
,
cols
:
image_ori_cols
,
}
=
read_graphics
(
image
);
let
image
=
resize
(
&
image_ori
,
image_ori_rows
,
image_ori_cols
,
nrows
,
ncols
);
let
mut
image_h
=
HerculesMutBox
::
from
(
image
.clone
());
let
mut
iN
=
(
0
..
nrows
)
.map
(|
i
|
i
as
i32
-
1
)
.collect
::
<
Vec
<
_
>>
();
let
mut
iS
=
(
0
..
nrows
)
.map
(|
i
|
i
as
i32
+
1
)
.collect
::
<
Vec
<
_
>>
();
let
mut
jW
=
(
0
..
ncols
)
.map
(|
j
|
j
as
i32
-
1
)
.collect
::
<
Vec
<
_
>>
();
let
mut
jE
=
(
0
..
ncols
)
.map
(|
j
|
j
as
i32
+
1
)
.collect
::
<
Vec
<
_
>>
();
// Fix boundary conditions
iN
[
0
]
=
0
;
iS
[
nrows
-
1
]
=
(
nrows
-
1
)
as
i32
;
jW
[
0
]
=
0
;
jE
[
ncols
-
1
]
=
(
ncols
-
1
)
as
i32
;
let
iN_h
=
HerculesImmBox
::
from
(
iN
.as_slice
());
let
iS_h
=
HerculesImmBox
::
from
(
iS
.as_slice
());
let
jW_h
=
HerculesImmBox
::
from
(
jW
.as_slice
());
let
jE_h
=
HerculesImmBox
::
from
(
jE
.as_slice
());
group
.bench_function
(
"srad bench"
,
|
b
|
{
b
.iter
(||
{
async_std
::
task
::
block_on
(
async
{
r
.run
(
nrows
as
u64
,
ncols
as
u64
,
niter
as
u64
,
image_h
.to
(),
iN_h
.to
(),
iS_h
.to
(),
jW_h
.to
(),
jE_h
.to
(),
max
,
lambda
,
)
.await
});
})
});
}
criterion_group!
(
benches
,
srad_bench
);
criterion_main!
(
benches
);
Loading