Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions hydra/Convolution.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
#endif
#include <utility>
#include <type_traits>
#include <hydra/detail/IteratorConcepts.h>
#include <concepts>

#if HYDRA_DEVICE_SYSTEM == CUDA
#define TYPE typename std::conditional< std::is_convertible<detail::BackendPolicy<BACKEND>,hydra::thrust::system::cuda::tag >::value, std::integral_constant<int, 1>,std::integral_constant<int, 0>>::type
Expand All @@ -65,10 +67,8 @@ template<detail::Backend BACKEND, detail::FFTCalculator FFTBackend, typename Fu
typename USING_CUDA_BACKEND = TYPE,
typename USING_CUFFT = typename std::conditional< FFTBackend==detail::CuFFT, std::integral_constant<int, 1>,std::integral_constant<int, 0>>::type,
typename GPU_DATA = TAG>
inline typename std::enable_if<std::is_floating_point<T>::value && hydra::detail::is_iterable<Iterable>::value
// && (USING_CUDA_BACKEND::value == USING_CUFFT::value)
// && (USING_CUDA_BACKEND::value == GPU_DATA::value),
,void>::type
requires (std::floating_point<T> && hydra::detail::Iterable<Iterable>)
inline void
convolute(detail::BackendPolicy<BACKEND> policy, detail::FFTPolicy<T, FFTBackend> fft_policy,
Functor const& functor, Kernel const& kernel,
T min, T max, Iterable&& output, bool power_up=true ){
Expand Down
29 changes: 16 additions & 13 deletions hydra/Decays.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
#include <hydra/PhaseSpace.h>
#include <hydra/detail/FunctorTraits.h>
#include <hydra/detail/CompositeTraits.h>
#include <hydra/detail/IteratorConcepts.h>
#include <hydra/detail/FunctorConcepts.h>


namespace hydra {
Expand Down Expand Up @@ -239,11 +241,11 @@ public :
}

template<typename Functor>
typename std::enable_if<
detail::is_hydra_functor<Functor>::value ||
detail::is_hydra_lambda<Functor>::value ||
detail::is_hydra_composite_functor<Functor>::value,
PhaseSpaceReweight<Functor, Particles...> >::type
requires (
detail::HydraCallable<Functor> ||
detail::HydraCompositeFunctor<Functor>
)
PhaseSpaceReweight<Functor, Particles...>
GetEventWeightFunctor(Functor const& functor) const
{
return PhaseSpaceReweight<Functor, Particles...>(functor ,fMotherMass, fMasses );
Expand All @@ -253,11 +255,11 @@ public :
Unweight(size_t seed=0x180ec6d33cfd0aba);

template<typename Functor>
typename std::enable_if<
detail::is_hydra_functor<Functor>::value ||
detail::is_hydra_lambda<Functor>::value ||
detail::is_hydra_composite_functor<Functor>::value ,
hydra::Range<iterator>>::type
requires (
detail::HydraCallable<Functor> ||
detail::HydraCompositeFunctor<Functor>
)
hydra::Range<iterator>
Unweight( Functor const& functor, double weight=-1.0, size_t seed=0x39abdc4529b1661c);

/**
Expand All @@ -284,9 +286,9 @@ public :
}

template<typename ...Iterables>
requires (hydra::detail::Iterable<Iterables> && ...)
auto Meld( Iterables&&... iterable)
-> typename std::enable_if< detail::all_true<detail::is_iterable<Iterables>::value...>::value,
decltype(std::declval<storage_type>().meld( std::forward<Iterables>(iterable) ...)) >::type
-> decltype(std::declval<storage_type>().meld( std::forward<Iterables>(iterable) ...))
{
return fDecays.meld(std::forward<Iterables>(iterable)... );

Expand Down Expand Up @@ -367,7 +369,8 @@ public :
}

template<typename Iterable>
typename std::enable_if<detail::is_iterable<Iterable>::value, void>::type
requires (hydra::detail::Iterable<Iterable>)
void
insert(iterator position, Iterable range)
{
fDecays.insert( position, range);
Expand Down
Loading