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

Commit 8885bde

Browse files
committed
inclusive_scan_over_group and joint_inclusive_scan
Signed-off-by: Chris Perkins <[email protected]>
1 parent 2d337e8 commit 8885bde

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

SYCL/GroupAlgorithm/inclusive_scan_sycl2020.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,5 +186,16 @@ int main() {
186186
sycl::bit_and<int>(), ~0);
187187
#endif // SPIRV_1_3
188188

189+
// as part of SYCL_EXT_ONEAPI_COMPLEX_ALGORITHMS (
190+
// https://github.com/intel/llvm/pull/5108/ ) joint_inclusive_scan and
191+
// inclusive_scan_over_group now operate on std::complex limited to using the
192+
// sycl::plus binary operation.
193+
std::array<std::complex<float>, N> input_cf;
194+
std::array<std::complex<float>, N> output_cf;
195+
std::iota(input_cf.begin(), input_cf.end(), 0);
196+
std::fill(output_cf.begin(), output_cf.end(), 0);
197+
test<class KernelNamePlusComplexF>(q, input_cf, output_cf,
198+
sycl::plus<std::complex<float>>(), 0);
199+
189200
std::cout << "Test passed." << std::endl;
190201
}

0 commit comments

Comments
 (0)