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
42cb733f
There was an error fetching the commit references. Please try again later.
Commit
42cb733f
authored
8 years ago
by
Tomáš Oberhuber
Browse files
Options
Downloads
Patches
Plain Diff
Tuning CUDA traversers.
parent
ed4f9974
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/benchmarks/heat-equation-benchmark/tnl-benchmark-simple-heat-equation-bug.h
+6
-4
6 additions, 4 deletions
...uation-benchmark/tnl-benchmark-simple-heat-equation-bug.h
with
6 additions
and
4 deletions
tests/benchmarks/heat-equation-benchmark/tnl-benchmark-simple-heat-equation-bug.h
+
6
−
4
View file @
42cb733f
...
@@ -68,9 +68,10 @@ class TestGridEntity
...
@@ -68,9 +68,10 @@ class TestGridEntity
};
};
__global__
void
testKernel
(
const
tnlTestGrid
*
grid
)
template
<
typename
GridType
,
typename
GridEntity
>
__global__
void
testKernel
(
const
GridType
*
grid
)
{
{
Test
GridEntity
entity
(
*
grid
);
GridEntity
entity
(
*
grid
);
}
}
int
main
(
int
argc
,
char
*
argv
[]
)
int
main
(
int
argc
,
char
*
argv
[]
)
...
@@ -81,7 +82,8 @@ int main( int argc, char* argv[] )
...
@@ -81,7 +82,8 @@ int main( int argc, char* argv[] )
dim3
cudaGridSize
(
gridXSize
/
16
+
(
gridXSize
%
16
!=
0
),
dim3
cudaGridSize
(
gridXSize
/
16
+
(
gridXSize
%
16
!=
0
),
gridYSize
/
16
+
(
gridYSize
%
16
!=
0
)
);
gridYSize
/
16
+
(
gridYSize
%
16
!=
0
)
);
typedef
tnlTestGrid
GridType
;
//typedef tnlTestGrid GridType;
typedef
tnlGrid
<
2
,
double
,
tnlCuda
>
GridType
;
typedef
typename
GridType
::
VertexType
VertexType
;
typedef
typename
GridType
::
VertexType
VertexType
;
typedef
typename
GridType
::
CoordinatesType
CoordinatesType
;
typedef
typename
GridType
::
CoordinatesType
CoordinatesType
;
GridType
grid
;
GridType
grid
;
...
@@ -93,7 +95,7 @@ int main( int argc, char* argv[] )
...
@@ -93,7 +95,7 @@ int main( int argc, char* argv[] )
auto
t_start
=
std
::
chrono
::
high_resolution_clock
::
now
();
auto
t_start
=
std
::
chrono
::
high_resolution_clock
::
now
();
while
(
iteration
<
1000
)
while
(
iteration
<
1000
)
{
{
testKernel
<<<
cudaGridSize
,
cudaBlockSize
>>>
(
cudaGrid
);
testKernel
<
GridType
,
typename
GridType
::
Cell
><
<<
cudaGridSize
,
cudaBlockSize
>>>
(
cudaGrid
);
cudaThreadSynchronize
();
cudaThreadSynchronize
();
iteration
++
;
iteration
++
;
}
}
...
...
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