Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
Microbenchmarks
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mattia Mancini
Microbenchmarks
Merge requests
!14
Draft: Test convolution
Code
Review changes
Check out branch
Open in Workspace
Download
Patches
Plain diff
Expand sidebar
Open
Draft: Test convolution
test_convolution
into
main
Overview
0
Commits
18
Pipelines
18
Changes
12
Open
Draft: Test convolution
Mattia Mancini
requested to merge
test_convolution
into
main
5 months ago
Overview
0
Commits
18
Pipelines
18
Changes
12
0
0
Merge request reports
Compare
main
version 16
f5cf3d7c
5 months ago
version 15
7a250ed2
5 months ago
version 14
070d07db
5 months ago
version 13
b590d541
5 months ago
version 12
6de58f42
5 months ago
version 11
0e46a845
5 months ago
version 10
bc4fd251
5 months ago
version 9
a4e5c2ca
5 months ago
version 8
5ea6c8fb
5 months ago
version 7
5ae0648f
5 months ago
version 6
1131c9a7
5 months ago
version 5
0f361b70
5 months ago
version 4
ac9acc62
5 months ago
version 3
c03ff1dc
5 months ago
version 2
247218cf
5 months ago
version 1
09fc5764
5 months ago
main (HEAD)
and
latest version
latest version
75da170f
18 commits,
5 months ago
version 16
f5cf3d7c
18 commits,
5 months ago
version 15
7a250ed2
17 commits,
5 months ago
version 14
070d07db
16 commits,
5 months ago
version 13
b590d541
15 commits,
5 months ago
version 12
6de58f42
14 commits,
5 months ago
version 11
0e46a845
13 commits,
5 months ago
version 10
bc4fd251
12 commits,
5 months ago
version 9
a4e5c2ca
11 commits,
5 months ago
version 8
5ea6c8fb
10 commits,
5 months ago
version 7
5ae0648f
9 commits,
5 months ago
version 6
1131c9a7
8 commits,
5 months ago
version 5
0f361b70
7 commits,
5 months ago
version 4
ac9acc62
6 commits,
5 months ago
version 3
c03ff1dc
6 commits,
5 months ago
version 2
247218cf
5 commits,
5 months ago
version 1
09fc5764
4 commits,
5 months ago
12 files
+
437
−
9
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
12
benchmarks/convolution.cpp
0 → 100644
+
52
−
0
View file @ 1ceae409
Edit in single-file editor
Open in Web IDE
#include
<benchmark/benchmark.h>
#include
<convolution.h>
#include
<memory>
#include
<vector>
namespace
{
class
InitializeInput
:
public
benchmark
::
Fixture
{
public:
void
SetUp
(
::
benchmark
::
State
&
state
)
{
size_t
width
=
state
.
range
(
0
);
size_t
height
=
state
.
range
(
1
);
image
=
std
::
make_unique
<
std
::
vector
<
float
>>
(
width
*
height
);
kernel
=
std
::
make_unique
<
std
::
vector
<
float
>>
(
width
*
height
);
Initialize
(
image
->
data
(),
width
,
height
);
Initialize
(
kernel
->
data
(),
width
,
height
);
}
void
TearDown
(
::
benchmark
::
State
&
state
)
{
image
.
reset
();
kernel
.
reset
();
}
std
::
unique_ptr
<
std
::
vector
<
float
>>
image
;
std
::
unique_ptr
<
std
::
vector
<
float
>>
kernel
;
};
}
// namespace
// Reference standard
BENCHMARK_DEFINE_F
(
InitializeInput
,
ConvolveReference
)
(
benchmark
::
State
&
state
)
{
for
(
auto
_
:
state
)
{
ConvolveReference
(
image
->
data
(),
kernel
->
data
(),
state
.
range
(
0
),
state
.
range
(
1
));
}
}
BENCHMARK_REGISTER_F
(
InitializeInput
,
ConvolveReference
)
->
Args
({
2048
,
1000
})
->
Args
({
4096
,
5000
});
// FFTW serial standard
BENCHMARK_DEFINE_F
(
InitializeInput
,
ConvolveSerial
)
(
benchmark
::
State
&
state
)
{
for
(
auto
_
:
state
)
{
ConvolveSerial
(
image
->
data
(),
kernel
->
data
(),
state
.
range
(
0
),
state
.
range
(
1
));
}
}
BENCHMARK_REGISTER_F
(
InitializeInput
,
ConvolveSerial
)
->
Args
({
2048
,
1000
})
->
Args
({
4096
,
5000
});
Loading