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

Commit 7340c89

Browse files
committed
there are spec clarifications that widen the allowable types that can be passed to group_broadcast. Here we are re-enabling these tests which will pass once the matching update is merged on intel/llvm
Signed-off-by: Chris Perkins <[email protected]>
1 parent 7a277d8 commit 7340c89

File tree

1 file changed

+29
-30
lines changed

1 file changed

+29
-30
lines changed

SYCL/GroupAlgorithm/SYCL2020/group_broadcast.cpp

Lines changed: 29 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -63,39 +63,38 @@ int main() {
6363
}
6464

6565
// Test pointer type
66-
// {
67-
// std::array<int *, N> input;
68-
// std::array<int *, 3> output;
69-
// for (int i = 0; i < N; ++i) {
70-
// input[i] = static_cast<int *>(0x0) + i;
71-
// }
72-
// std::fill(output.begin(), output.end(), static_cast<int *>(0x0));
73-
// test<class KernelName_NrqELzFQToOSPsRNMi>(q, input, output);
74-
// }
66+
{
67+
std::array<int *, N> input;
68+
std::array<int *, 3> output;
69+
for (int i = 0; i < N; ++i) {
70+
input[i] = static_cast<int *>(0x0) + i;
71+
}
72+
std::fill(output.begin(), output.end(), static_cast<int *>(0x0));
73+
test<class KernelName_NrqELzFQToOSPsRNMi>(q, input, output);
74+
}
7575

7676
// Test user-defined type
7777
// - Use complex as a proxy for this
7878
// - Test float and double to test 64-bit and 128-bit types
79-
// {
80-
// std::array<std::complex<float>, N> input;
81-
// std::array<std::complex<float>, 3> output;
82-
// for (int i = 0; i < N; ++i) {
83-
// input[i] =
84-
// std::complex<float>(0, 1) + (float)i * std::complex<float>(2, 2);
85-
// }
86-
// std::fill(output.begin(), output.end(), std::complex<float>(0, 0));
87-
// test<class KernelName_rCblcml>(q, input, output);
88-
// }
89-
// {
90-
// std::array<std::complex<double>, N> input;
91-
// std::array<std::complex<double>, 3> output;
92-
// for (int i = 0; i < N; ++i) {
93-
// input[i] =
94-
// std::complex<double>(0, 1) + (double)i * std::complex<double>(2,
95-
// 2);
96-
// }
97-
// std::fill(output.begin(), output.end(), std::complex<float>(0, 0));
98-
// test<class KernelName_NCWhjnQ>(q, input, output);
99-
// }
79+
{
80+
std::array<std::complex<float>, N> input;
81+
std::array<std::complex<float>, 3> output;
82+
for (int i = 0; i < N; ++i) {
83+
input[i] =
84+
std::complex<float>(0, 1) + (float)i * std::complex<float>(2, 2);
85+
}
86+
std::fill(output.begin(), output.end(), std::complex<float>(0, 0));
87+
test<class KernelName_rCblcml>(q, input, output);
88+
}
89+
{
90+
std::array<std::complex<double>, N> input;
91+
std::array<std::complex<double>, 3> output;
92+
for (int i = 0; i < N; ++i) {
93+
input[i] =
94+
std::complex<double>(0, 1) + (double)i * std::complex<double>(2, 2);
95+
}
96+
std::fill(output.begin(), output.end(), std::complex<float>(0, 0));
97+
test<class KernelName_NCWhjnQ>(q, input, output);
98+
}
10099
std::cout << "Test passed." << std::endl;
101100
}

0 commit comments

Comments
 (0)