Develop
Olá Juan, thanks for this PR.
I see a lot of files in your request. Could you reconfigure the PR and push only your contribution? The file implementing the Flatté. Ideally, please, implement the line-shape in a header file ".h" (as you already did) and add some documentation citing also a reference from where you got the formulae. Then provide one or two examples placed in the folder "examples/phys" and add the target(s) to "examples/phys/CMakeList.txt". Creating the examples/NIPS_HYDRA is not necessary. There are some .xml files, and a .idea subdirectory, I suppose from your IDE (CLION ?). Please exclude then. Change fDaughter3Mass and the corresponding getter/setter members to fBachelorMass. I discovered recently that it keep as fDaughter3Mass can be painfully misleading...
Cheers A.A. .
Hi Augusto,
OK, I'll do the modifications and do the PR again.
Att, Juan Leite
From: Antonio Augusto Alves Junior [email protected] Sent: Saturday, March 10, 2018 9:55 AM To: MultithreadCorner/Hydra Cc: JuanBSLeite; Author Subject: Re: [MultithreadCorner/Hydra] Develop (#25)
Olá Juan, thanks for this PR.
I see a lot of files in your request. Could you reconfigure the PR and push only your contribution? The file implementing the Flatté. Ideally, please, implement the line-shape in a header file ".h" (as you already did) and add some documentation citing also a reference from where you got the formulae. Then provide one or two examples placed in the folder "examples/phys" and add the target(s) to "examples/phys/CMakeList.txt". Creating the examples/NIPS_HYDRA is not necessary. There are some .xml files, and a .idea subdirectory, I suppose from your IDE (CLION ?). Please exclude then. Change fDaughter3Mass and the corresponding getter/setter members to fBachelorMass. I discovered recently that it keep as fDaughter3Mass can be painfully misleading...
Cheers A.A. .
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMultithreadCorner%2FHydra%2Fpull%2F25%23issuecomment-372017942&data=02%7C01%7C%7C86e7b326eb59473c2bcc08d5866d1c38%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636562725538406478&sdata=V0KmABLKemOmLQlDDpQysW%2BMGi0aXn9H9l5I%2Bf216dA%3D&reserved=0, or mute the threadhttps://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAiFoIb5NLuZBC4v1uQXCJaE4Cz8PpNpCks5tc6MlgaJpZM4SkkVn&data=02%7C01%7C%7C86e7b326eb59473c2bcc08d5866d1c38%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636562725538406478&sdata=x0jYy8MIeIhjk1Hk0igKEF7yBAK8sswnPtdHK7qNgFU%3D&reserved=0.
Hi Augusto,
I did the changes you said and updated my fork. I'll do the new PR now.
The PR gets updated automatically based on your branch (including master); on Monday I can show you how to squash and clean your commit history if you'd like.
Hi Juan, thanks. Tell me one thing, how does this implementation compares to the original code you used as inspiration? Did you tested if they return the same values? Other point: did you compared your implementation to the formulas here described in CERN-EP-PHYS-76-8 ?
Hi Juan, thanks. There are still some minor issues. I commented them inline. please address them and let me know. Thanks.
One more point, I forgot to comment previously. The getter and setters should reflect the names of the members they refer to. For example: double fMass -> void SetMass(double mass){...}
Hi Juan, thanks for this contribution. It looks much better now! Indeed, the EvtGen's implementation is much more reliable... Please, find my comments inline. Cheers A,A,
Hi Juan, let me confess I am a bit intrigued... How does this functor can be running in CUDA, if the member std::array<...> fParams is not copyable in that back-end?
As I told you personally a pair of times, if the thresholds are always fixed parameters, it is not necessary to pass them to the hydra::BaseFunctor interface, only the parameters that need be tracked during a fit need be passed...
Look forward for your feedback... A.A.
Hi Augusto, std::array is a container to simple C array, it allow use iterators and other things, that's why I think it is running . params is not inside the base functor, there is only one parameter there, that is the mean.
BaseFunctor<FlatteLineShape<CHANNEL, ArgIndex>, hydra::complex<double>,1>{mean}
Please, look my last comments.
The CUDA9 Programing Guide, section F.3.8, states:
F.3.8. Standard Library Standard libraries are only supported in host code, but not in device code, unless specified otherwise.
AFAIK, the only Standard Library class supported is std::initializer_list, which is explained in the section F.3.15.2. std::initializer_list.
I am still wondering how your code can run on CUDA...
Can you try to run it in your machine?
I think std::array works if you use --expt-relaxed-constexpr (which you do), since the key methods are constexpr. I'm pretty sure I've used it on device before. I could be wrong, though.
Edit: From looking at the descriptions of std::initializer_list and the CUDA source, I don't see why it would be supported, though...
PS: std::move and std::forward are also explicitly supported (though they are not classes).
The Standard is clear enough about std::array, as so is the CUDA Programing Guide... Lets not drag ahead this discussion.
In summary, the class is not copyable in CUDA. Please, exchange it by a C-style array.
BTW, about relying on --expt-relaxed-constexpr for certain things
Programming Guide - v9.1.85 F.3.15.4. Constexpr functions and function templates
By default, a constexpr function cannot be called from a function with incompatible execution space 14. The experimental nvcc flag --expt-relaxed-constexpr removes this restriction. When this flag is specified, host code can invoke a
__device__ constexprfunction and device code can invoke a__host__ constexprfunction. nvcc will define the macro__CUDACC_RELAXED_CONSTEXPR__when--expt-relaxed-constexprhas been specified. Note that a function template instantiation may not be a constexpr function even if the corresponding template is marked with the keyword constexpr (C++11 Standard Section [dcl.constexpr.p6]).
ping...