Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TeeTime-Framework
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nelson Tavares de Sousa
TeeTime-Framework
Commits
013c1c14
Commit
013c1c14
authored
Feb 2, 2015
by
Christian Wulf
Browse files
Options
Downloads
Patches
Plain Diff
added unfinished draft for a reduction variable abstraction
parent
2194c03a
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/teetime/stage/Counter.java
+19
-0
19 additions, 0 deletions
src/main/java/teetime/stage/Counter.java
src/site/markdown/wiki
+1
-1
1 addition, 1 deletion
src/site/markdown/wiki
with
20 additions
and
1 deletion
src/main/java/teetime/stage/Counter.java
+
19
−
0
View file @
013c1c14
...
@@ -24,4 +24,23 @@ public class Counter<T> extends AbstractConsumerStage<T> {
...
@@ -24,4 +24,23 @@ public class Counter<T> extends AbstractConsumerStage<T> {
public
OutputPort
<
T
>
getOutputPort
()
{
public
OutputPort
<
T
>
getOutputPort
()
{
return
this
.
outputPort
;
return
this
.
outputPort
;
}
}
public
static
final
class
ThreadLocalCounter
{
private
final
ThreadLocal
<
Integer
>
counter
=
new
ThreadLocal
<
Integer
>();
public
Integer
inc
()
{
Integer
value
=
counter
.
get
();
Integer
newValue
=
value
+
1
;
counter
.
set
(
newValue
);
return
newValue
;
}
public
Integer
inc
(
final
Integer
rightHandValue
)
{
Integer
value
=
counter
.
get
();
Integer
newValue
=
value
+
rightHandValue
;
counter
.
set
(
newValue
);
return
newValue
;
}
}
}
}
This diff is collapsed.
Click to expand it.
wiki
@
0e447457
Subproject commit
a93581905ef7b0584d52eae1898148ffa6201a31
Subproject commit
0e4474577e1f49bc96e734c286b2d9e0363895e8
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
sign in
to comment