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
06a9d8bd
There was an error fetching the commit references. Please try again later.
Commit
06a9d8bd
authored
5 years ago
by
Tomáš Oberhuber
Browse files
Options
Downloads
Patches
Plain Diff
Fixed ParalleFor example.
parent
9967b10b
No related branches found
No related tags found
1 merge request
!44
Tutorials
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Documentation/Examples/Algorithms/ParallelForExample.cpp
+1
-1
1 addition, 1 deletion
Documentation/Examples/Algorithms/ParallelForExample.cpp
Documentation/Tutorials/ForLoops/StaticForExample-3.cpp
+4
-0
4 additions, 0 deletions
Documentation/Tutorials/ForLoops/StaticForExample-3.cpp
with
5 additions
and
1 deletion
Documentation/Examples/Algorithms/ParallelForExample.cpp
+
1
−
1
View file @
06a9d8bd
...
...
@@ -16,7 +16,7 @@ void initVector( Vector< double, Device >& v,
{
auto
view
=
v
.
getConstView
();
auto
init
=
[
=
]
__cuda_callable__
(
int
i
,
const
double
c
)
mutable
{
view
[
i
]
=
c
;
view
[
i
]
=
c
;
}
ParallelFor
<
Device
>::
exec
(
0
,
v
.
getSize
(),
init
,
c
);
}
...
...
This diff is collapsed.
Click to expand it.
Documentation/Tutorials/ForLoops/StaticForExample-3.cpp
0 → 100644
+
4
−
0
View file @
06a9d8bd
for
(
int
i
=
0
;
i
<
Size
;
i
++
)
{
a
[
i
]
=
b
[
i
]
+
c
;
sum
+=
a
[
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