IAP GITLAB
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
corsika
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Antonio Augusto Alves Junior
corsika
Commits
d0d0e980
Commit
d0d0e980
authored
6 years ago
by
ralfulrich
Browse files
Options
Downloads
Plain Diff
git branch Merge branch 'master' of gitlab.ikp.kit.edu:AirShowerPhysics/corsika
parents
7ada8afc
8429946d
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Framework/Random/RNGManager.cc
+7
-1
7 additions, 1 deletion
Framework/Random/RNGManager.cc
Framework/Random/RNGManager.h
+6
-1
6 additions, 1 deletion
Framework/Random/RNGManager.h
Framework/Random/testRandom.cc
+2
-0
2 additions, 0 deletions
Framework/Random/testRandom.cc
with
15 additions
and
2 deletions
Framework/Random/RNGManager.cc
+
7
−
1
View file @
d0d0e980
...
...
@@ -10,7 +10,8 @@ void corsika::random::RNGManager::RegisterRandomStream(std::string const& pStrea
rngs
[
pStreamName
]
=
std
::
move
(
rng
);
}
corsika
::
random
::
RNG
&
corsika
::
random
::
RNGManager
::
GetRandomStream
(
std
::
string
const
&
pStreamName
)
{
corsika
::
random
::
RNG
&
corsika
::
random
::
RNGManager
::
GetRandomStream
(
std
::
string
const
&
pStreamName
)
{
return
rngs
.
at
(
pStreamName
);
}
...
...
@@ -22,3 +23,8 @@ std::stringstream corsika::random::RNGManager::dumpState() const {
return
buffer
;
}
void
corsika
::
random
::
RNGManager
::
SetSeedSeq
(
std
::
string
const
&
pStreamName
,
std
::
seed_seq
const
&
pSeedSeq
)
{
seeds
[
pStreamName
]
=
pSeedSeq
;
}
This diff is collapsed.
Click to expand it.
Framework/Random/RNGManager.h
+
6
−
1
View file @
d0d0e980
...
...
@@ -38,7 +38,12 @@ namespace corsika::random {
* into a std::stringstream.
*/
std
::
stringstream
dumpState
()
const
;
/**
* set seed_seq of \a pStreamName to \a pSeedSeq
*/
void
SetSeedSeq
(
std
::
string
const
&
pStreamName
,
std
::
seed_seq
&
const
pSeedSeq
);
};
}
// namespace
R
andom
}
// namespace
corsika::r
andom
#endif
This diff is collapsed.
Click to expand it.
Framework/Random/testRandom.cc
+
2
−
0
View file @
d0d0e980
...
...
@@ -21,6 +21,8 @@ SCENARIO("random-number streams can be registered and retrieved") {
THEN
(
"an unknown sequence cannot be retrieved"
)
{
REQUIRE_THROWS
(
rngManager
.
GetRandomStream
(
"stream_UNKNOWN"
));
}
// seeding not covered yet
}
}
}
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