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/marray.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ template <typename Type, std::size_t NumElements> class marray {
template <
typename... ArgTN, typename = EnableIfSuitableTypes<ArgTN...>,
typename = typename std::enable_if<sizeof...(ArgTN) == NumElements>::type>
constexpr marray(const ArgTN &...Args) : MData{Args...} {}
constexpr marray(const ArgTN &...Args) : MData{static_cast<Type>(Args)...} {}

constexpr marray(const marray<Type, NumElements> &Rhs) = default;

Expand Down
2 changes: 1 addition & 1 deletion sycl/test/basic_tests/known_identity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ typename std::enable_if<!std::is_same_v<T, half> && !std::is_same_v<T, float> &&
checkMarrayKnownIdentity() {
constexpr marray<T, Num> zeros(T(0));
constexpr marray<T, Num> ones(T(1));
constexpr marray<T, Num> bit_ones(T(~0));
constexpr marray<T, Num> bit_ones(~T(0));

static_assert(has_known_identity<plus<>, marray<T, Num>>::value);
static_assert(
Expand Down