Now using a list of event instead of a single one
This commit is contained in:
@@ -317,13 +317,13 @@ namespace detail
|
||||
|
||||
bp::tuple flush(atd::array_expression const & expression, unsigned int queue_id, bp::list dependencies, int label, std::string const & program_name, bool force_recompile)
|
||||
{
|
||||
cl::Event event;
|
||||
std::list<cl::Event> events;
|
||||
atd::operation_cache cache;
|
||||
std::vector<cl::Event> cdependencies = to_vector<cl::Event>(dependencies);
|
||||
boost::shared_ptr<atd::array> parray(new atd::array(atd::control(expression, atd::execution_options_type(queue_id, &event, &cache, &cdependencies),
|
||||
boost::shared_ptr<atd::array> parray(new atd::array(atd::control(expression, atd::execution_options_type(queue_id, &events, &cache, &cdependencies),
|
||||
atd::dispatcher_options_type(label), atd::compilation_options_type(program_name, force_recompile))));
|
||||
|
||||
return bp::make_tuple(*parray, event, cache);
|
||||
return bp::make_tuple(*parray, to_list(events.begin(), events.end()), cache);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -404,16 +404,14 @@ void export_cl()
|
||||
|
||||
bp::def("flush", &detail::flush, (bp::arg("expression"), bp::arg("queue_id") = 0, bp::arg("dependencies")=bp::list(), bp::arg("label")=-1, bp::arg("program_name")="", bp::arg("recompile") = false));
|
||||
|
||||
bp::enum_<cl_command_queue_properties>("queue_properties_type")
|
||||
.value("CL_QUEUE_PROFILING_ENABLE", CL_QUEUE_PROFILING_ENABLE)
|
||||
.value("CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE", CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE)
|
||||
;
|
||||
|
||||
bp::class_<state_type>("state_type")
|
||||
.def_readwrite("queue_properties",&atd::cl_ext::queue_properties)
|
||||
;
|
||||
|
||||
bp::scope().attr("state") = bp::object(bp::ptr(&state));
|
||||
|
||||
bp::scope().attr("CL_QUEUE_PROFILING_ENABLE") = CL_QUEUE_PROFILING_ENABLE;
|
||||
bp::scope().attr("CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE") = CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE;
|
||||
}
|
||||
|
||||
namespace detail
|
||||
|
Reference in New Issue
Block a user