diff --git a/viennacl/detail/vector_def.hpp b/viennacl/detail/vector_def.hpp index 92ed546c7..25a0bf6f4 100644 --- a/viennacl/detail/vector_def.hpp +++ b/viennacl/detail/vector_def.hpp @@ -209,13 +209,13 @@ class vector_base //read-write access to an element of the vector /** @brief Read-write access to a single element of the vector */ - entry_proxy operator()(size_type index); + entry_proxy operator()(size_type index); /** @brief Read-write access to a single element of the vector */ - entry_proxy operator[](size_type index); + entry_proxy operator[](size_type index); /** @brief Read access to a single element of the vector */ - const_entry_proxy operator()(size_type index) const; + const_entry_proxy operator()(size_type index) const; /** @brief Read access to a single element of the vector */ - const_entry_proxy operator[](size_type index) const; + const_entry_proxy operator[](size_type index) const; self_type & operator += (const self_type & vec); self_type & operator -= (const self_type & vec); diff --git a/viennacl/linalg/detail/op_executor.hpp b/viennacl/linalg/detail/op_executor.hpp index bd49b3bdc..68c8a8679 100644 --- a/viennacl/linalg/detail/op_executor.hpp +++ b/viennacl/linalg/detail/op_executor.hpp @@ -32,27 +32,27 @@ namespace linalg namespace detail { -template -bool op_aliasing(vector_base const & /*lhs*/, B const & /*b*/) +template +bool op_aliasing(vector_base const & /*lhs*/, B const & /*b*/) { return false; } -template -bool op_aliasing(vector_base const & lhs, vector_base const & b) +template +bool op_aliasing(vector_base const & lhs, vector_base const & b) { return lhs.handle() == b.handle(); } -template -bool op_aliasing(vector_base const & lhs, vector_expression const & rhs) +template +bool op_aliasing(vector_base const & lhs, vector_expression const & rhs) { return op_aliasing(lhs, rhs.lhs()) || op_aliasing(lhs, rhs.rhs()); } -template -bool op_aliasing(matrix_base const & /*lhs*/, B const & /*b*/) +template +bool op_aliasing(matrix_base const & /*lhs*/, B const & /*b*/) { return false; } diff --git a/viennacl/vector.hpp b/viennacl/vector.hpp index f0c4f5a11..c735044f8 100644 --- a/viennacl/vector.hpp +++ b/viennacl/vector.hpp @@ -561,39 +561,39 @@ return *this; //read-write access to an element of the vector template -entry_proxy vector_base::operator()(size_type index) +entry_proxy vector_base::operator()(size_type index) { assert( (size() > 0) && bool("Cannot apply operator() to vector of size zero!")); assert( index < size() && bool("Index out of bounds!") ); -return entry_proxy(start_ + stride_ * index, elements_); +return entry_proxy(start_ + stride_ * index, elements_); } template -entry_proxy vector_base::operator[](size_type index) +entry_proxy vector_base::operator[](size_type index) { assert( (size() > 0) && bool("Cannot apply operator() to vector of size zero!")); assert( index < size() && bool("Index out of bounds!") ); -return entry_proxy(start_ + stride_ * index, elements_); +return entry_proxy(start_ + stride_ * index, elements_); } template -const_entry_proxy vector_base::operator()(size_type index) const +const_entry_proxy vector_base::operator()(size_type index) const { assert( (size() > 0) && bool("Cannot apply operator() to vector of size zero!")); assert( index < size() && bool("Index out of bounds!") ); -return const_entry_proxy(start_ + stride_ * index, elements_); +return const_entry_proxy(start_ + stride_ * index, elements_); } template -const_entry_proxy vector_base::operator[](size_type index) const +const_entry_proxy vector_base::operator[](size_type index) const { assert( (size() > 0) && bool("Cannot apply operator() to vector of size zero!")); assert( index < size() && bool("Index out of bounds!") ); -return const_entry_proxy(start_ + stride_ * index, elements_); +return const_entry_proxy(start_ + stride_ * index, elements_); } //////////////////////////// Read-write access to an element of the vector end /////////////////// @@ -2058,10 +2058,10 @@ namespace detail }; // x = inner_prod(z, {y0, y1, ...}) - template - struct op_executor, op_assign, vector_expression, const vector_tuple, op_inner_prod> > + template + struct op_executor, op_assign, vector_expression, const vector_tuple, op_inner_prod> > { - static void apply(vector_base & lhs, vector_expression, const vector_tuple, op_inner_prod> const & rhs) + static void apply(vector_base & lhs, vector_expression, const vector_tuple, op_inner_prod> const & rhs) { viennacl::linalg::inner_prod_impl(rhs.lhs(), rhs.rhs(), lhs); }