Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sycl/include/sycl/types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -916,7 +916,7 @@ template <typename Type, int NumElements> class vec {
__SYCL2020_DEPRECATED(
"get_size() is deprecated, please use byte_size() instead")
static constexpr size_t get_size() { return byte_size(); }
static constexpr size_t byte_size() { return sizeof(m_Data); }
static constexpr size_t byte_size() noexcept { return sizeof(m_Data); }

template <typename convertT,
rounding_mode roundingMode = rounding_mode::automatic>
Expand Down
1 change: 1 addition & 0 deletions sycl/test-e2e/Basic/vector_operators.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ template <typename T, int N> void check_vector_size() {
constexpr auto length = (N == 3 ? 4 : N);
assert(Vec.size() == N);
assert(Vec.byte_size() == sizeof(T) * length);
static_assert(noexcept(Vec.byte_size()));
}

int main() {
Expand Down