Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit ece58a0

Browse files
[ESIMD] Allow constructing simd_view from simd
1 parent d440395 commit ece58a0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

SYCL/ESIMD/api/simd_view_copy_move_assign.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,13 @@ int main(void) {
114114
passed &= test(q, "move assignment operator",
115115
[](auto &va_view, auto &vb_view)
116116
SYCL_ESIMD_FUNCTION { va_view = std::move(vb_view); });
117+
// construct complete view of a vector.
118+
passed &= test(q, "constructor from simd",
119+
[](auto &va_view, auto &vb_view) SYCL_ESIMD_FUNCTION {
120+
simd<int, 4> vb = vb_view;
121+
simd_view new_vb_view = vb; // ctor from simd
122+
va_view = new_vb_view;
123+
});
117124

118125
return passed ? 0 : 1;
119126
}

0 commit comments

Comments
 (0)