Skip to content

Commit

Permalink
Zero-init new vector_type
Browse files Browse the repository at this point in the history
  • Loading branch information
jszuppe committed Feb 10, 2019
1 parent 6c6a108 commit 3eb11f1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/boost/compute/types/fundamental.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,12 @@ class vector_type_desc<Scalar, 16> : public vector_type_desc<Scalar, 8>
template<class Scalar, size_t N>
class vector_type : public detail::vector_type_desc<Scalar, N>
{
typedef detail::vector_type_desc<Scalar, N> base_type;
public:
typedef Scalar scalar_type;

vector_type()
: base_type()
{
BOOST_STATIC_ASSERT(sizeof(Scalar) * N == sizeof(vector_type<Scalar, N>));
}
Expand Down

0 comments on commit 3eb11f1

Please sign in to comment.