mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-22 01:27:59 +02:00
deduce parallel call only on function signature and some const&
This commit is contained in:
@ -141,8 +141,10 @@ class multiSlsDetector : public virtual slsDetectorDefs,
|
||||
* Loop through the detectors serially
|
||||
* and return a vector of results
|
||||
*/
|
||||
template <class CT>
|
||||
struct NonDeduced { using type = CT; };
|
||||
template <typename RT, typename... CT>
|
||||
std::vector<RT> serialCall(RT (slsDetector::*somefunc)(CT...), CT... Args);
|
||||
std::vector<RT> serialCall(RT (slsDetector::*somefunc)(CT...), typename NonDeduced<CT>::type... Args);
|
||||
|
||||
/**
|
||||
* Loop through the detectors in parallel threads
|
||||
@ -150,7 +152,7 @@ class multiSlsDetector : public virtual slsDetectorDefs,
|
||||
*/
|
||||
template <typename RT, typename... CT>
|
||||
std::vector<RT> parallelCall(RT (slsDetector::*somefunc)(CT...),
|
||||
CT... Args);
|
||||
typename NonDeduced<CT>::type... Args);
|
||||
|
||||
/**
|
||||
* If specific position, then provide result with that detector at position
|
||||
|
Reference in New Issue
Block a user