You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hydra3 can not wrap generic lambdas in host code. If this feature is necessary, use host-only uwrapped lambdas.
19
+
20
+
#### Function call interface
21
+
22
+
This is probably the most impacting change in this release, making **Hydra3** series backward incompatible with the previous series.
23
+
24
+
1. New interface for calling functors and lambdas.
25
+
26
+
a) Extensive statically-bound named parameter idiom support. This new idiom for specification of function call interfaces makes the definition callable objects in **Hydra3** much more safe, straight forward, transparent and user friendly, without compromise performance. In many cases enhancing performance, indeed. From **Hydra3**, users will be able to define new types, with *ad hoc* names wrapping around primary types, using the macro ```declvar(NewVar, Type)```.
27
+
These new types are searched in compile time to bind the function call, if the type
28
+
is not found a compile error is emitted, avoiding the generation of invalid or error prone code.
29
+
See how it works:
30
+
31
+
```cpp
32
+
...
33
+
#include <hydra/functions/Gaussian.h>
34
+
...
35
+
36
+
declvar(Angle, double)
37
+
38
+
int main(int argv, char** argc)
39
+
{
40
+
...
41
+
42
+
auto gauss = hydra::Gaussian<Angle>(mean, signa);
43
+
...
44
+
}
45
+
```
46
+
47
+
in the previous code snippet, wherever the object `gauss` is called, if the argument consists of one or tuples, which are the entry type of all multidimensional dataset classes in Hydra, the `Angle`type identifier will be searched among the elements, if not found, code will not compile. If the argument is a non-tuple type, conversion will be tried. Multidimensional datasets can be defined using named parameters like in the snippet below:
b) Functors: as usual, it should derive from ``hydra::BaseFunctor``, defined in ``hydra/Function.h``, but now the must inform their argument type, signature and number of parameters (``hydra::Parameter``) at template instantiation time. It is also necessary to implement the ``ResultType Evaluate(ArgType...)`` method. Default constructors should be deleted, non-default and copy constructors, as well as assignments operators should be implemented as well. See how this works for `hydra::Gaussian`:
auto printer = hydra::wrap_lambda( []__hydra_dual__(X x, Y y){
119
+
120
+
print("x = %f y = %f", x(), y());
121
+
122
+
} );
123
+
124
+
for(auto entry: data) printer(entry);
125
+
}
126
+
127
+
```
128
+
129
+
#### Random number generation
130
+
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`).
133
+
134
+
#### Phase-space generation
135
+
136
+
1. Updated `hydra::Decays` container for supporting named variable idiom.
137
+
2. Changes in `hydra::PhaseSpace`and `hydra::Decays`.
138
+
3. hydra::Chain not supported any more.
139
+
4. New `Meld(...)` method in `hydra::Decays` for building mixed datasets and decay chains.
140
+
5. Re-implemented logics for generation of events and associated weights.
141
+
142
+
#### Data fitting
143
+
144
+
1. Adding support to simultaneous fit.
145
+
2. Fitting of convoluted PDFs.
146
+
147
+
#### General
148
+
Many issues solved and bugs fixed across the tree:
1.**Eigen** is not being distributed with **Hydra** anymore. **Eigen** will remain an dependency for foreseeable future.
7
165
2. New facility to update **Thrust** and **CUB**. New namespaces ```hydra::hydra_thrust``` and ```hydra::hydra_cub``` defined.
@@ -11,7 +169,7 @@
11
169
6. Re-implementation of the impacted examples.
12
170
7. Many bug fixes across the tree...
13
171
14
-
###Hydra 2.4.1 (probably incomplete)
172
+
###Hydra 2.4.1 (probably incomplete)
15
173
16
174
1. The main change is this release is the update of Thrust instance distributed with Hydra to the version 1.9.6, which enabled the support for CUDA 10.1 and hopefuly higher
17
175
2. Range semantics implemented in Decays::Unweight methods
Copy file name to clipboardExpand all lines: README.md
+20-15Lines changed: 20 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@ Table of Contents
31
31
What is it?
32
32
-----------
33
33
34
-
Hydra is a C++11 compliant and header only framework designed to perform common data analysis tasks on massively parallel platforms. Hydra provides a collection of containers and algorithms commonly used in HEP data analysis, which can deploy transparently OpenMP, CUDA and TBB enabled devices, allowing the user to re-use the same code across a large range of available multi-core CPU and accelerators. The framework design is focused on performance and precision.
34
+
Hydra is a C++14 compliant and header only framework designed to perform common data analysis tasks on massively parallel platforms. Hydra provides a collection of containers and algorithms commonly used in HEP data analysis, which can deploy transparently OpenMP, CUDA and TBB enabled devices, allowing the user to re-use the same code across a large range of available multi-core CPU and accelerators. The framework design is focused on performance and precision.
35
35
36
36
The core algorithms follow as close as possible the implementations widely used in frameworks like ROOT and libraries
37
37
like GSL.
@@ -44,36 +44,38 @@ Currently Hydra supports:
44
44
* Generation of phase-space Monte Carlo samples with any number of particles in the final states. Sequential decays, calculation of integrals of models over the corresponding phase-space and production of weighted and unweighted samples, which can be flat or distributed following a model provided by the user.
45
45
* Sampling of multidimensional pdfs.
46
46
* Multidimensional maximum likelihood fits using binned and unbinned data sets.
47
+
* Multi-layered simultaneous fit of different models, over different datasets, deploying different parallelization strategies for each model.
47
48
* Calculation of S-Plots, a popular technique for statistical unfolding of populations contributing to a sample.
48
49
* Evaluation of multidimensional functions over heterogeneous data sets.
49
50
* Numerical integration of multidimensional functions using self-adaptive Monte Carlo and quadrature methods.
50
51
* Multidimensional sparse and dense histogramming of large samples.
51
52
* Object-based interface to FFTW and CuFFT for performing Fast Fourier Transform in CPU and GPU.
52
53
* FFT based one-dimensional convolution for arbitrary signal and kernel shapes.
53
54
* Booststrap and real cubic spiline for datasets on CPU and GPU.
54
-
* Sobol low discrepance sequences up to 3667 dimensions
55
+
* Sobol low discrepance sequences up to 3667 dimensions.
55
56
56
57
Hydra also provides a bunch of custom types, optimized containers and a number of algorithms and constructs to maximize performance, avoiding unnecessary usage of memory and without losing the flexibility and portability to compile and run the same code across different platforms and deployment scenarios.
57
58
58
59
59
-
For example, just changing .cu to .cpp in any source code written only using the Hydra and standard C++11 is enough
60
+
For example, just changing .cu to .cpp in any source code written only using the Hydra and standard C++14 is enough
60
61
to compile your application for OpenMP or TBB compatible devices using GCC or other compiler in a machine without a NVIDIA GPU installed.
61
62
62
-
In summary, by using Hydra the user can transparently typical bottle-neck calculations to a suitable parallel device and get speed-up factors ranging from dozens to hundreds.
63
+
In summary, by using Hydra the user can transparently implement and dispatch typical bottle-neck calculations to a suitable parallel device and get speed-up factors ranging from dozens to hundreds.
63
64
64
65
65
66
66
67
Hydra and Thrust
67
68
----------------
68
69
69
70
Hydra is implemented on top of the [Thrust library](https://thrust.github.io/) and relies strongly on Thrust's containers, algorithms and backend management systems.
70
-
The official version of Thrust supports tuples with maximum ten elements. In order to overcome this limitation, Hydra uses the
71
+
The official version of Thrust supports tuples with maximum ten elements. In order to overcome this limitation, Hydra uses an
71
72
[unofficial version, forked from the original, by Andrew Currigan and collaborators](https://github.com/andrewcorrigan/thrust-multi-permutation-iterator).
72
73
This version implements variadic tuples and related classes, as well as provides some additional functionality, which are missing in the official Thrust.
74
+
In order to keep Hydra uptodated with the latest bug-fixes and architetural improvements in Thrust, at each Hydra release, the official [Thrust library](https://thrust.github.io/) is patched with the Currigan's variadic tuple implementation.
73
75
74
-
The version of Thrust distributed with Hydra is maintained by [MultithreadCorner](https://github.com/MultithreadCorner). It is basically a fork of Currigan's repository, which was merged with the latest official release available in GitHub (Thrust 1.9.7).
76
+
So, version of Thrust distributed with Hydra is maintained by [MultithreadCorner](https://github.com/MultithreadCorner). It is basically a fork of Currigan's repository, which was merged with the latest official release available in GitHub (Thrust 1.9.7).
75
77
76
-
***Hydra does not depend or conflict with the official Thrust library distributed with the CUDA-SDK.***
78
+
***Hydra does not depend or conflict with the official Thrust library distributed with the CUDA-SDK.***
The available "host" and "device" backends can be freely combined.
98
100
Two important features related to Hydra's design and the backend configuration:
99
101
100
-
* If CUDA backend is not used, [NVCC and the CUDA runtime](https://developer.nvidia.com/cuda-toolkit) are not necessary. The programs can be compiled with GCC, Clang or other host compiler compatible with C++11 directly.
102
+
* If CUDA backend is not used, [NVCC and the CUDA runtime](https://developer.nvidia.com/cuda-toolkit) are not necessary. The programs can be compiled with GCC, Clang or other host compiler compatible with C++14 support directly.
101
103
* Programs written using only Hydra, Thrust, STL and standard c++ constructs, it means programs without any raw CUDA code or calls to the CUDA runtime API, can be compiled with NVCC, to run on CUDA backends, or a suitable host compiler to run on OpenMP , TBB and CPP backends. **Just change the source file extension from .cu to .cpp, or something else the host compiler understands.**
102
104
103
105
@@ -134,11 +136,12 @@ Installation and requirements
134
136
135
137
Hydra is a header only library, so no build process is necessary to install it.
136
138
Just place the `hydra` folder and its contents where your system can find it.
137
-
The library run on Linux systems and requires at least a host compiler supporting C++11. To use NVidia's GPUs, CUDA 8 or higher is required.
138
-
A suite of examples demonstrating the basic features of the library are included in the `examples` folder.
139
+
The framework runs on Linux systems and requires at least a host compiler supporting C++14. To use NVidia's GPUs, CUDA 9.2 or higher is required.
140
+
A suite of examples demonstrating the basic features of the framework is included in the `examples` folder.
139
141
All the examples are organized in .inl files, which implements the `main()` function. These files are included by .cpp and .cu
140
142
files, which are compiled according with the availability of backends. TBB and CUDA backends requires the installation of the corresponding libraries and runtimes.
141
143
These code samples uses, but does not requires [ROOT](https://root.cern.ch/) for graphics, and [TCLAP](http://tclap.sourceforge.net/) library for process command line arguments.
144
+
Some functionality in Hydra requires Eigen, GSL, CuFFT and FFTW.
142
145
143
146
Examples
144
147
--------
@@ -162,10 +165,12 @@ The examples are listed below:
0 commit comments