summaryrefslogtreecommitdiff
path: root/boost/compute/container
diff options
context:
space:
mode:
Diffstat (limited to 'boost/compute/container')
-rw-r--r--boost/compute/container/detail/scalar.hpp5
-rw-r--r--boost/compute/container/valarray.hpp1
2 files changed, 4 insertions, 2 deletions
diff --git a/boost/compute/container/detail/scalar.hpp b/boost/compute/container/detail/scalar.hpp
index 7ecd86e540..4dee76d2b4 100644
--- a/boost/compute/container/detail/scalar.hpp
+++ b/boost/compute/container/detail/scalar.hpp
@@ -12,6 +12,7 @@
#define BOOST_COMPUTE_CONTAINER_DETAIL_SCALAR_HPP
#include <boost/compute/buffer.hpp>
+#include <boost/compute/event.hpp>
#include <boost/compute/detail/read_write_single_value.hpp>
namespace boost {
@@ -40,9 +41,9 @@ public:
return read_single_value<T>(m_buffer, 0, queue);
}
- void write(const T &value, command_queue &queue)
+ event write(const T &value, command_queue &queue)
{
- write_single_value<T>(value, m_buffer, 0, queue);
+ return write_single_value<T>(value, m_buffer, 0, queue);
}
const buffer& get_buffer() const
diff --git a/boost/compute/container/valarray.hpp b/boost/compute/container/valarray.hpp
index 8ac8e01753..981ec2e545 100644
--- a/boost/compute/container/valarray.hpp
+++ b/boost/compute/container/valarray.hpp
@@ -67,6 +67,7 @@ public:
valarray(const valarray<T> &other)
: m_buffer(other.m_buffer.get_context(), other.size() * sizeof(T))
{
+ copy(other.begin(), other.end(), begin());
}
valarray(const std::valarray<T> &valarray,