Skip to content

Commit 11ed00d

Browse files
committed
2 parents 384aed0 + 25950da commit 11ed00d

File tree

1 file changed

+32
-2
lines changed

1 file changed

+32
-2
lines changed

CHANGELOG.md

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,32 @@ See how it works:
128128

129129
#### Random number generation
130130

131-
1. Support for analytical random number generation added for many functors added via `hydra::Distribution<FunctorType> specializations (see example `example/random/basic_distributions.inl`).
132-
2. Parallel filling of containers with random numbers (see example `example/random/fill_basic_distributions.inl`).
131+
1. Support for analytical pseudo-random number generation (APRNG) added for many functors added via `hydra::Distribution<FunctorType>` specializations (see example `example/random/basic_distributions.inl`).
132+
2. Parallel filling of containers with random numbers (see example `example/random/fill_basic_distributions.inl`). In particular, there are some convenience functions in order to deploy in a generic and simple way the parallel filling of containers transparently, independently of the back-end. For a given instance of the functor of interest, the framework is informed of the presence of the APRNG method in compile time. If the APRNG
133+
is not found a compile error is emitted, informing and suggesting the user to use the `hydra::sample` interface, which implements a different filling strategy. The facility is decoupled from the underlying PRNG engine, in order to be compatible with the current pseudo-random engines already imlemented in Hydra, and future algorithms that will be made available over the time. If the user needs to use a specific PRNG engine, its type can be passed as template parameter to the convenience function, otherwise the `hydra_thrust::default_random_engine` is used. As an example of filling of containers with random numbers see the snippet below:
134+
135+
```cpp
136+
...
137+
#include <hydra/functions/Gaussian.h>
138+
...
139+
140+
declvar(Xvar, double)
141+
142+
int main(int argv, char** argc)
143+
{
144+
...
145+
146+
auto gauss = hydra::Gaussian<Xvar>(mean, signa);
147+
148+
auto data_d = hydra::device::vector<Xvar>(nentries);
149+
150+
hydra::fill_random(data_d , gauss);
151+
152+
...
153+
}
154+
```
155+
The filling functions can be called also with a specific backend policy and with iterators instead of the whole container. The seed used by the PRNG engine can be also passed to the function as last parameter. The collection of all the convenience functions can be found in `hydra/RandomFill.h`.
156+
133157

134158
#### Phase-space generation
135159

@@ -159,6 +183,12 @@ Many issues solved and bugs fixed across the tree:
159183

160184
-------------------------
161185

186+
### Hydra 2.6.0
187+
188+
This is the last release from series 2.x.x.
189+
190+
-------------------------
191+
162192
### Hydra 2.5.0
163193

164194
1. **Eigen** is not being distributed with **Hydra** anymore. **Eigen** will remain an dependency for foreseeable future.

0 commit comments

Comments
 (0)