Commit 5b443824 authored by CARDOSI Paul's avatar CARDOSI Paul
Browse files

Merge branch 'fix-wrong-prototype-detection' into 'master'

Fix wrong prototype detection. Workaround gcc this pointer lambda capture bug.

See merge request bramas/spetabaru!25
parents ecc641a3 bee811ca
......@@ -11,8 +11,8 @@
#include "Utils/SpProbability.hpp"
#include "Runtimes/SpRuntime.hpp"
const size_t seedSpeculationSuccess = 42;
const size_t seedSpeculationFailure = 0;
[[maybe_unused]] const size_t seedSpeculationSuccess = 42;
[[maybe_unused]] const size_t seedSpeculationFailure = 0;
const size_t seed = seedSpeculationSuccess;
int main([[maybe_unused]] int argc, [[maybe_unused]] char *argv[]){
......
This diff is collapsed.
......@@ -310,7 +310,7 @@ public:
static constexpr auto callable_type = ct;
template <typename T2, typename=std::enable_if_t<std::is_same<std::remove_reference_t<T2>, CallableTy>::value>>
SpCallableWrapper(T2 &&inCallable) : callable(std::forward<T2>(inCallable)) {}
SpCallableWrapper(T2&& inCallable) : callable(std::forward<T2>(inCallable)) {}
CallableTy& getCallableRef() {
return callable;
......@@ -330,7 +330,7 @@ auto SpCpu(T &&callable) {
}
template <class T>
auto SpGpu(T &&callable) {
auto SpGpu(T&& callable) {
return SpCallableWrapper<SpConfig::CompileWithCuda, T, SpCallableType::GPU>(std::forward<T>(callable));
}
......@@ -340,6 +340,9 @@ struct is_instantiation_of_callable_wrapper : std::false_type {};
template <bool b, class T0, SpCallableType ct>
struct is_instantiation_of_callable_wrapper<SpCallableWrapper<b, T0, ct>> : std::true_type {};
template <class T0>
inline constexpr bool is_instantiation_of_callable_wrapper_v = is_instantiation_of_callable_wrapper<T0>::value;
template <class T0, SpCallableType callableType0>
struct is_instantiation_of_callable_wrapper_with_type : std::false_type {};
......
......@@ -32,7 +32,7 @@ int main(){
#ifdef TEST3
runtime.task(SpRead(initVal),
SpGpu([]([[maybe_unused]] const double& initValParam){})
SpGpu([]([[maybe_unused]] const double& initValParam){}),
SpGpu([]([[maybe_unused]] const double& initValParam){}));
#endif
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment