Random numbers generation
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 25/100
Research direction
Start with the reported loop using compute::default_random_engine and uniform_real_distribution, then reproduce the repeated vector generation with the same engine and seed pattern. Determine whether the engine is expected to advance across iterations; done means the behavior is explained and, if incorrect, covered by a focused regression test or fix.
Written by the indexing model from the issue text.
Description
I try to generate vector of random number multiple times and it seems to generate the same vector
for example
...
auto seed = std::chrono::high_resolution_clock::now().time_since_epoch().count();
compute::default_random_engine engine(queue,seed);
compute::uniform_real_distribution GPUdistribution(0.0, 1.0);
for (int t=0; t<T;t++) {
...
GPUdistribution.generate(vec2.begin(), vec2.end(),engine,queue);
...
}
Is it necessary to destroy and regenerate engine with new seed at each iteration to get proper results?
Thanks
- Dominant language
- C++
- Stars
- 1.7k
- Forks
- 340
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from boostorg/compute
-
Difficulty 1/5 Under an hour Newbie friendliness 65/100
-
constant_iterator and counting_iterator dereference attempts to bind a const object to a referenceOpen
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
-
Difficulty 4/5 3-5 days Newbie friendliness 20/100
All issues in boostorg/compute
Similar issues
-
new issue
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
llvm/llvm-project#245835 ·
Maintainers usually reply within 1 day
-
documentation
Difficulty 1/5 Under an hour Newbie friendliness 72/100
EchoTools/nevr-runtime#2823 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
triton-lang/triton#12945 ·
Maintainers usually reply within 1 day
-
Releases do not move the `latest` Docker tag: the branch `30.12` is taken for the latest release branchPossibly taken @alexey-milovidov claimed this today. Opencomp-ci-infrastructure unexpected behaviour
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
ClickHouse/ClickHouse#134282 ·
Maintainers usually reply within 1 day