summaryrefslogtreecommitdiff
path: root/boost/compute/utility/wait_list.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/compute/utility/wait_list.hpp')
-rw-r--r--boost/compute/utility/wait_list.hpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/boost/compute/utility/wait_list.hpp b/boost/compute/utility/wait_list.hpp
index 9a7e74bac0..8b81924d63 100644
--- a/boost/compute/utility/wait_list.hpp
+++ b/boost/compute/utility/wait_list.hpp
@@ -13,6 +13,12 @@
#include <vector>
+#include <boost/compute/config.hpp>
+
+#ifndef BOOST_COMPUTE_NO_HDR_INITIALIZER_LIST
+#include <initializer_list>
+#endif
+
#include <boost/compute/event.hpp>
namespace boost {
@@ -27,7 +33,7 @@ template<class T> class future;
/// specify dependencies for OpenCL operations or to wait on the host until
/// all of the events have completed.
///
-/// This class also provides convenience fnuctions for interacting with
+/// This class also provides convenience functions for interacting with
/// OpenCL APIs which typically accept event dependencies as a \c cl_event*
/// pointer and a \c cl_uint size. For example:
/// \code
@@ -60,6 +66,14 @@ public:
{
}
+ #ifndef BOOST_COMPUTE_NO_HDR_INITIALIZER_LIST
+ /// Creates a wait-list from \p events
+ wait_list(std::initializer_list<event> events)
+ : m_events(events)
+ {
+ }
+ #endif // BOOST_COMPUTE_NO_HDR_INITIALIZER_LIST
+
/// Copies the events in the wait-list from \p other.
wait_list& operator=(const wait_list &other)
{