diff --git a/src/util/cudify/cudify_sequencial.hpp b/src/util/cudify/cudify_sequencial.hpp index 06de3a2c70ef16fa27bfe2ba397b5269e658992b..117207005d64fdae75e337dac24bd38c25d6fef3 100644 --- a/src/util/cudify/cudify_sequencial.hpp +++ b/src/util/cudify/cudify_sequencial.hpp @@ -12,7 +12,7 @@ #define CUDIFY_ACTIVE #include "util/cuda_util.hpp" -#include "boost/bind.hpp" +#include #include #ifdef HAVE_BOOST_CONTEXT #include @@ -330,6 +330,8 @@ void launch_kernel(boost::context::detail::transfer_t par) template static void exe_kernel(lambda_f f, ite_type & ite) { + if (ite.nthrs() == 0 || ite.nblocks() == 0) {return;} + if (mem_stack.size() < ite.nthrs()) { int old_size = mem_stack.size(); @@ -552,4 +554,4 @@ static void exe_kernel_no_sync(lambda_f f, ite_type & ite) #endif -#endif \ No newline at end of file +#endif