Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tnl-dev
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor 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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
TNL
tnl-dev
Commits
57dc814c
There was an error fetching the commit references. Please try again later.
Commit
57dc814c
authored
6 years ago
by
Jakub Klinkovský
Browse files
Options
Downloads
Patches
Plain Diff
Fixed order of indices in the traverser benchmarks
parent
7a151198
No related branches found
No related tags found
1 merge request
!20
Traversers optimizations
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/Benchmarks/Traversers/GridTraversersBenchmark_2D.h
+6
-6
6 additions, 6 deletions
src/Benchmarks/Traversers/GridTraversersBenchmark_2D.h
src/Benchmarks/Traversers/GridTraversersBenchmark_3D.h
+6
-6
6 additions, 6 deletions
src/Benchmarks/Traversers/GridTraversersBenchmark_3D.h
with
12 additions
and
12 deletions
src/Benchmarks/Traversers/GridTraversersBenchmark_2D.h
+
6
−
6
View file @
57dc814c
...
...
@@ -98,7 +98,7 @@ class GridTraversersBenchmark< 2, Device, Real, Index >
Index
_size
=
this
->
size
;
auto
f
=
[
=
]
__cuda_callable__
(
Index
i
,
Index
j
,
Real
*
data
)
{
data
[
i
*
_size
+
j
]
+=
1.0
;
data
[
j
*
_size
+
i
]
+=
1.0
;
};
ParallelFor2D
<
Device
>::
exec
(
(
Index
)
0
,
...
...
@@ -114,8 +114,8 @@ class GridTraversersBenchmark< 2, Device, Real, Index >
auto
f
=
[
=
]
__cuda_callable__
(
Index
i
,
Index
j
,
Real
*
data
)
{
Cell
entity
(
*
currentGrid
);
entity
.
getCoordinates
().
y
()
=
i
;
entity
.
getCoordinates
().
x
()
=
j
;
entity
.
getCoordinates
().
x
()
=
i
;
entity
.
getCoordinates
().
y
()
=
j
;
entity
.
refresh
();
data
[
entity
.
getIndex
()
]
+=
1.0
;
};
...
...
@@ -134,8 +134,8 @@ class GridTraversersBenchmark< 2, Device, Real, Index >
auto
f
=
[
=
]
__cuda_callable__
(
Index
i
,
Index
j
,
Real
*
data
)
{
Cell
entity
(
*
currentGrid
);
entity
.
getCoordinates
().
y
()
=
i
;
entity
.
getCoordinates
().
x
()
=
j
;
entity
.
getCoordinates
().
x
()
=
i
;
entity
.
getCoordinates
().
y
()
=
j
;
entity
.
refresh
();
(
*
_u
)(
entity
)
+=
1.0
;
};
...
...
@@ -249,4 +249,4 @@ class GridTraversersBenchmark< 2, Device, Real, Index >
}
// namespace Traversers
}
// namespace Benchmarks
}
// namespace TNL
\ No newline at end of file
}
// namespace TNL
This diff is collapsed.
Click to expand it.
src/Benchmarks/Traversers/GridTraversersBenchmark_3D.h
+
6
−
6
View file @
57dc814c
...
...
@@ -104,7 +104,7 @@ class GridTraversersBenchmark< 3, Device, Real, Index >
Index
_size
=
this
->
size
;
auto
f
=
[
=
]
__cuda_callable__
(
Index
i
,
Index
j
,
Index
k
,
Real
*
data
)
{
data
[
(
i
*
_size
+
j
)
*
_size
+
k
]
+=
1.0
;
data
[
(
k
*
_size
+
j
)
*
_size
+
i
]
+=
1.0
;
};
ParallelFor3D
<
Device
>::
exec
(
(
Index
)
0
,
...
...
@@ -122,9 +122,9 @@ class GridTraversersBenchmark< 3, Device, Real, Index >
auto
f
=
[
=
]
__cuda_callable__
(
Index
i
,
Index
j
,
Index
k
,
Real
*
data
)
{
Cell
entity
(
*
currentGrid
);
entity
.
getCoordinates
().
z
()
=
i
;
entity
.
getCoordinates
().
x
()
=
i
;
entity
.
getCoordinates
().
y
()
=
j
;
entity
.
getCoordinates
().
x
()
=
k
;
entity
.
getCoordinates
().
z
()
=
k
;
entity
.
refresh
();
data
[
entity
.
getIndex
()
]
+=
1.0
;
};
...
...
@@ -145,9 +145,9 @@ class GridTraversersBenchmark< 3, Device, Real, Index >
auto
f
=
[
=
]
__cuda_callable__
(
Index
i
,
Index
j
,
Index
k
,
Real
*
data
)
{
Cell
entity
(
*
currentGrid
);
entity
.
getCoordinates
().
z
()
=
i
;
entity
.
getCoordinates
().
x
()
=
i
;
entity
.
getCoordinates
().
y
()
=
j
;
entity
.
getCoordinates
().
x
()
=
k
;
entity
.
getCoordinates
().
z
()
=
k
;
entity
.
refresh
();
(
*
_u
)(
entity
)
+=
1.0
;
};
...
...
@@ -257,4 +257,4 @@ class GridTraversersBenchmark< 3, Device, Real, Index >
}
// namespace Traversers
}
// namespace Benchmarks
}
// namespace TNL
\ No newline at end of file
}
// namespace TNL
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