diff --git a/tests/stream/stream_api.cpp b/tests/stream/stream_api.cpp index 351c62fb7..5eb803f38 100644 --- a/tests/stream/stream_api.cpp +++ b/tests/stream/stream_api.cpp @@ -3,7 +3,7 @@ // SYCL 2020 Conformance Test Suite // // Copyright (c) 2017-2022 Codeplay Software LTD. All Rights Reserved. -// Copyright (c) 2022 The Khronos Group Inc. +// Copyright (c) 2022-2023 The Khronos Group Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -48,14 +48,12 @@ template void check_nd_item_dims(sycl::range &range1, sycl::range &range2) { auto testQueue = util::get_cts_object::queue(); testQueue.submit([&](sycl::handler &cgh) { - sycl::stream os(2048, 80, cgh); cgh.parallel_for>( - sycl::nd_range(range1, range2), - [=](sycl::nd_item ndItem) { + sycl::nd_range(range1, range2), [=](sycl::nd_item ndItem) { /** check stream operator for nd_item - */ + */ check_type(os, ndItem); // check stream operator for nd_range @@ -70,19 +68,18 @@ void check_nd_item_dims(sycl::range &range1, sycl::range &range2) { * Function that create a sycl::stream object and streams item. */ template -void check_item_dims(sycl::range &range){ +void check_item_dims(sycl::range &range) { auto testQueue = util::get_cts_object::queue(); testQueue.submit([&](sycl::handler &cgh) { - sycl::stream os(2048, 80, cgh); cgh.parallel_for>(range, - [=](sycl::item it) { - /** check stream operator for - * item - */ - check_type(os, it); - }); + [=](sycl::item it) { + /** check stream operator for + * item + */ + check_type(os, it); + }); }); testQueue.wait_and_throw(); @@ -92,21 +89,21 @@ void check_item_dims(sycl::range &range){ * Function that create a sycl::stream object and streams group and h_item. */ template -void check_group_h_item_dims(sycl::range &range1, sycl::range &range2) { +void check_group_h_item_dims(sycl::range &range1, + sycl::range &range2) { auto testQueue = util::get_cts_object::queue(); testQueue.submit([&](sycl::handler &cgh) { - sycl::stream os(2048, 80, cgh); - cgh.parallel_for_work_group>(range1, range2, - [=](const sycl::group gp) { + cgh.parallel_for_work_group>( + range1, range2, [=](const sycl::group gp) { /** check stream operator for sycl::group - */ + */ check_type(os, gp); gp.parallel_for_work_item([&](sycl::h_item hit) { /** check stream operator for sycl::h_item - */ + */ check_type(os, hit); }); }); @@ -116,7 +113,7 @@ void check_group_h_item_dims(sycl::range &range1, sycl::range &range } /** test sycl::stream interface -*/ + */ class TEST_NAME : public util::test_base { public: /** return information about this test @@ -130,7 +127,7 @@ class TEST_NAME : public util::test_base { void run(util::logger &log) override { { /** check sycl::stream_manipulator - */ + */ check_enum_class_value(sycl::stream_manipulator::dec); check_enum_class_value(sycl::stream_manipulator::hex); check_enum_class_value(sycl::stream_manipulator::oct); @@ -146,29 +143,60 @@ class TEST_NAME : public util::test_base { check_enum_class_value(sycl::stream_manipulator::flush); /** Check stream interface - */ + */ { auto testQueue = util::get_cts_object::queue(); testQueue.submit([&](sycl::handler &cgh) { - sycl::stream os(2048, 80, cgh); /** check get_size() - */ + */ +#ifdef SYCL_CTS_ENABLE_DEPRECATED_FEATURES_TESTS { auto size = os.get_size(); - check_return_type(log, size, - "sycl::context::get_size()"); + check_return_type(log, size, "sycl::stream::get_size()"); } +#endif // SYCL_CTS_ENABLE_DEPRECATED_FEATURES_TESTS - /** check get_max_statement_size() - */ + /** check size() + */ +#ifndef SYCL_CTS_COMPILING_WITH_DPCPP + { + auto size = os.size(); + check_return_type(log, size, "sycl::stream::size()"); + CHECK(noexcept(os.size())); + } +#else + WARN( + "DPCPP does not define sycl::stream::size(). " + "Skipping the test case."); +#endif + + /** get_max_statement_size() + */ +#ifdef SYCL_CTS_ENABLE_DEPRECATED_FEATURES_TESTS { auto maxStatementSize = os.get_max_statement_size(); + check_return_type(log, maxStatementSize, + "sycl::stream::get_max_statement_size()"); + } +#endif // SYCL_CTS_ENABLE_DEPRECATED_FEATURES_TESTS + + /** check get_work_item_buffer_size() + */ +#ifndef SYCL_CTS_COMPILING_WITH_DPCPP + { + auto workItemBufferSize = os.get_work_item_buffer_size(); check_return_type( - log, maxStatementSize, - "sycl::context::get_max_statement_size()"); + log, workItemBufferSize, + "sycl::stream::get_work_item_buffer_size()"); } +#else + WARN( + "DPCPP does not define " + "sycl::stream::get_work_item_buffer_size(). " + "Skipping the test case."); +#endif cgh.single_task([=]() {}); }); @@ -177,17 +205,15 @@ class TEST_NAME : public util::test_base { } /** check stream operator for supported types - */ + */ { auto testQueue = util::get_cts_object::queue(); testQueue.submit([&](sycl::handler &cgh) { - sycl::stream os(2048, 80, cgh); cgh.single_task([=]() { - /** check stream operator for basic types - */ + */ check_type(os, "hello world!"); check_type(os, const_cast("hello world!")); check_all_vec_dims(os, char('c')); @@ -209,28 +235,13 @@ class TEST_NAME : public util::test_base { int a = 5; int *aPtr = &a; check_type(os, aPtr); - const int * aConstPtr = &a; + const int *aConstPtr = &a; check_type(os, aConstPtr); auto multiPtr = sycl::private_ptr(aPtr); check_type(os, multiPtr); - /** check stream operator for cl types - */ - check_all_vec_dims(os, cl_char('c')); - check_all_vec_dims(os, static_cast('c')); - check_all_vec_dims(os, cl_int(5)); - check_all_vec_dims(os, static_cast(5)); - check_all_vec_dims(os, cl_short(5)); - check_all_vec_dims(os, static_cast(5)); - check_all_vec_dims(os, cl_long(5)); - check_all_vec_dims(os, static_cast(5)); - check_all_vec_dims(os, cl_float(5.5f)); - check_type(os, static_cast(true)); - /** check stream operator for sycl types - */ - check_all_vec_dims(os, sycl::byte(72)); - + */ check_type(os, sycl::id<1>(1)); check_type(os, sycl::id<2>(1, 2)); check_type(os, sycl::id<3>(1, 2, 3)); @@ -239,15 +250,15 @@ class TEST_NAME : public util::test_base { check_type(os, sycl::range<2>(1, 2)); check_type(os, sycl::range<3>(1, 2, 3)); - check_type(os, sycl::nd_range<1>(sycl::range<1>(2), - sycl::range<1>(1))); + check_type(os, + sycl::nd_range<1>(sycl::range<1>(2), sycl::range<1>(1))); check_type(os, sycl::nd_range<2>(sycl::range<2>(2, 4), - sycl::range<2>(1, 2))); + sycl::range<2>(1, 2))); check_type(os, sycl::nd_range<3>(sycl::range<3>(2, 4, 1), - sycl::range<3>(1, 2, 1))); + sycl::range<3>(1, 2, 1))); /** check stream operator for manipulators - */ + */ os << sycl::endl; os << sycl::setprecision(5) << float(5.0f); os << sycl::setw(3) << float(5.0f); @@ -270,7 +281,7 @@ class TEST_NAME : public util::test_base { } /** check stream operator for sycl::nd_item - */ + */ { sycl::range<1> r11(2); sycl::range<1> r12(1); @@ -283,11 +294,10 @@ class TEST_NAME : public util::test_base { sycl::range<3> r31(2, 4, 1); sycl::range<3> r32(1, 2, 1); check_nd_item_dims(r31, r32); - } /** check stream operator for sycl::item - */ + */ { sycl::range<1> r1(4); check_item_dims(r1); @@ -300,7 +310,7 @@ class TEST_NAME : public util::test_base { } /** check stream operator for sycl::group and sycl::h_item - */ + */ { sycl::range<1> r11(4); sycl::range<1> r12(1); @@ -313,7 +323,6 @@ class TEST_NAME : public util::test_base { sycl::range<3> r31(4, 2, 1); sycl::range<3> r32(1, 1, 1); check_group_h_item_dims(r31, r32); - } } } diff --git a/tests/stream/stream_api_fp16.cpp b/tests/stream/stream_api_fp16.cpp index b37995c80..b4f5c9def 100644 --- a/tests/stream/stream_api_fp16.cpp +++ b/tests/stream/stream_api_fp16.cpp @@ -3,7 +3,7 @@ // SYCL 2020 Conformance Test Suite // // Copyright (c) 2017-2022 Codeplay Software LTD. All Rights Reserved. -// Copyright (c) 2022 The Khronos Group Inc. +// Copyright (c) 2022-2023 The Khronos Group Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -30,7 +30,7 @@ using namespace sycl_cts; class test_kernel; /** test sycl::stream interface -*/ + */ class TEST_NAME : public util::test_base { public: /** return information about this test @@ -49,17 +49,16 @@ class TEST_NAME : public util::test_base { if (!testQueue.get_device().has(sycl::aspect::fp16)) { log.note( - "Device does not support half precision floating point operations"); - return; - } + "Device does not support half precision floating point " + "operations"); + return; + } testQueue.submit([&](sycl::handler &cgh) { sycl::stream os(2048, 80, cgh); - cgh.single_task([=]() { - check_all_vec_dims(os, sycl::half(0.2f)); - check_all_vec_dims(os, sycl::cl_half(0.3f)); - }); + cgh.single_task( + [=]() { check_all_vec_dims(os, sycl::half(0.2f)); }); }); testQueue.wait_and_throw(); diff --git a/tests/stream/stream_api_fp64.cpp b/tests/stream/stream_api_fp64.cpp index 9a60ba262..cfe749411 100644 --- a/tests/stream/stream_api_fp64.cpp +++ b/tests/stream/stream_api_fp64.cpp @@ -2,7 +2,19 @@ // // SYCL 2020 Conformance Test Suite // -// Provides stream tests for double and sycl::cl_double +// Copyright (c) 2023 The Khronos Group Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. // *******************************************************************************/ @@ -17,7 +29,7 @@ using namespace sycl_cts; class test_kernel; /** test sycl::stream interface -*/ + */ class TEST_NAME : public util::test_base { public: /** return information about this test @@ -30,23 +42,21 @@ class TEST_NAME : public util::test_base { */ void run(util::logger &log) override { { - // Check stream operator for sycl::cl_double and double + // Check stream operator for double auto testQueue = util::get_cts_object::queue(); if (!testQueue.get_device().has(sycl::aspect::fp64)) { log.note( - "Device does not support double precision floating point operations"); + "Device does not support double precision floating point " + "operations"); return; } testQueue.submit([&](sycl::handler &cgh) { - sycl::stream os(2048, 80, cgh); - cgh.single_task([=]() { - check_all_vec_dims(os, double(5.5)); - check_all_vec_dims(os, sycl::cl_double(5.5)); - }); + cgh.single_task( + [=]() { check_all_vec_dims(os, double(5.5)); }); }); testQueue.wait_and_throw(); diff --git a/tests/stream/stream_constructors.cpp b/tests/stream/stream_constructors.cpp index 794c7470e..261ec7e5f 100644 --- a/tests/stream/stream_constructors.cpp +++ b/tests/stream/stream_constructors.cpp @@ -3,7 +3,7 @@ // SYCL 2020 Conformance Test Suite // // Copyright (c) 2017-2022 Codeplay Software LTD. All Rights Reserved. -// Copyright (c) 2022 The Khronos Group Inc. +// Copyright (c) 2022-2023 The Khronos Group Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -20,259 +20,249 @@ *******************************************************************************/ #include "../common/common.h" - -#define TEST_NAME stream_constructors - -namespace TEST_NAMESPACE { - -using namespace sycl_cts; +#include "../common/disabled_for_test_case.h" struct stream_kernel { void operator()() const {} }; -/** tests the constructors for sycl::stream -*/ -class TEST_NAME : public util::test_base { - public: - /** return information about this test - */ - void get_info(test_base::info &out) const override { - set_test_info(out, TOSTRING(TEST_NAME), TEST_FILE); - } - - /** check equality of two stream objects. Returns true on equal, false - * otherwise - */ - bool areEqual(sycl::stream &osA, sycl::stream &osB) { - if (osA.get_max_statement_size() == osB.get_max_statement_size() || - osA.get_precision() == osB.get_precision() || - osA.get_size() == osB.get_size() || - osA.get_stream_mode() == osB.get_stream_mode()) - return false; - return true; - } - /** execute the test +// DPCPP does not define stream::size nor stream::get_work_item_buffer_size +#ifndef SYCL_CTS_COMPILING_WITH_DPCPP +/** + * Check equality of two stream objects. Returns true on equal, false + * otherwise. */ +static bool areEqual(sycl::stream &osA, sycl::stream &osB) { + if (osA.get_work_item_buffer_size() == osB.get_work_item_buffer_size() || + osA.get_precision() == osB.get_precision() || osA.size() == osB.size() || + osA.get_stream_mode() == osB.get_stream_mode()) + return false; + return true; +} +#endif // SYCL_CTS_COMPILING_WITH_DPCPP + +DISABLED_FOR_TEST_CASE(DPCPP) +("stream_constructors", "[stream]")({ + auto queue = sycl_cts::util::get_cts_object::queue(); + size_t bufferSize = 2048; + size_t workItemBufferSize = 80; + + /** check (size_t, size_t, sycl::handler&) constructor */ - void run(util::logger &log) override { - { - auto queue = util::get_cts_object::queue(); - size_t bufferSize = 2048; - size_t maxStatementSize = 80; - - /** check (size_t, size_t, sycl::handler&) constructor - */ - { - queue.submit([&](sycl::handler &handler) { - sycl::stream os(bufferSize, maxStatementSize, handler); + { + queue.submit([&](sycl::handler &handler) { + sycl::stream os(bufferSize, workItemBufferSize, handler); - if (os.get_size() != bufferSize) { - FAIL(log, - "sycl::context::get_size() returned an incorrect value."); - } - if (os.get_max_statement_size() != maxStatementSize) { - FAIL(log, - "sycl::context::get_max_statement_size() returned an " - "incorrect value."); - } - - handler.single_task(stream_kernel{}); - }); + if (os.size() != bufferSize) { + FAIL("sycl::context::size() returned an incorrect value."); } - - /** check copy constructor - */ - { - queue.submit([&](sycl::handler &handler) { - sycl::stream osA(bufferSize, maxStatementSize, handler); - sycl::stream osB(osA); - - if (osA.get_max_statement_size() != osB.get_max_statement_size()) { - FAIL(log, - "stream is not copy constructed correctly. " - "(get_max_statement_size)"); - } - if (osA.get_precision() != osB.get_precision()) { - FAIL(log, - "stream is not copy constructed correctly. (get_precision)"); - } - if (osA.get_size() != osB.get_size()) { - FAIL(log, "stream is not copy constructed correctly. (get_size)"); - } - if (osA.get_stream_mode() != osB.get_stream_mode()) { - FAIL(log, - "stream is not copy constructed correctly. (get_stream_mode)"); - } - if (osB.get_size() != bufferSize) { - FAIL(log, - "sycl::context::get_size() returned an incorrect value " - "after copy constructed."); - } - if (osB.get_max_statement_size() != maxStatementSize) { - FAIL(log, - "sycl::context::get_max_statement_size() returned an " - "incorrect value after copy constructed."); - } - - handler.single_task(stream_kernel{}); - }); + if (os.get_work_item_buffer_size() != workItemBufferSize) { + FAIL( + "sycl::context::get_work_item_buffer_size() returned an " + "incorrect value."); } - /** check assignment operator - */ - { - queue.submit([&](sycl::handler &handler) { - - sycl::stream osA(bufferSize, maxStatementSize, handler); - sycl::stream osB(bufferSize / 2, maxStatementSize / 2, handler); - osB = osA; + handler.single_task(stream_kernel{}); + }); + } - if (osA.get_max_statement_size() != osB.get_max_statement_size()) { - FAIL(log, - "stream is not copy constructed correctly. " - "(get_max_statement_size)"); - } - if (osA.get_precision() != osB.get_precision()) { - FAIL(log, - "stream is not copy constructed correctly. (get_precision)"); - } - if (osA.get_size() != osB.get_size()) { - FAIL(log, "stream is not copy constructed correctly. (get_size)"); - } - if (osA.get_stream_mode() != osB.get_stream_mode()) { - FAIL(log, - "stream is not copy constructed correctly. (get_stream_mode)"); - } - if (osB.get_size() != bufferSize) { - FAIL(log, - "sycl::context::get_size() returned an incorrect value " - "after copy assigned."); - } - if (osB.get_max_statement_size() != maxStatementSize) { - FAIL(log, - "sycl::context::get_max_statement_size() returned an " - "incorrect value after copy assigned."); - } + /** check (size_t, size_t, sycl::handler&, sycl::property_list&) + * constructor + */ + { + queue.submit([&](sycl::handler &handler) { + sycl::property_list property_list{}; + sycl::stream os(bufferSize, workItemBufferSize, handler, property_list); - handler.single_task(stream_kernel{}); - }); + if (os.size() != bufferSize) { + FAIL("sycl::context::size() returned an incorrect value."); + } + if (os.get_work_item_buffer_size() != workItemBufferSize) { + FAIL( + "sycl::context::get_work_item_buffer_size() returned an " + "incorrect value."); } - /* check move constructor - */ - { - queue.submit([&](sycl::handler &handler) { + handler.single_task(stream_kernel{}); + }); + } - sycl::stream osA(bufferSize, maxStatementSize, handler); - sycl::stream osB(std::move(osA)); + /** check copy constructor + */ + { + queue.submit([&](sycl::handler &handler) { + sycl::stream osA(bufferSize, workItemBufferSize, handler); + sycl::stream osB(osA); + + if (osA.get_work_item_buffer_size() != osB.get_work_item_buffer_size()) { + FAIL( + "stream is not copy constructed correctly. " + "(get_work_item_buffer_size)"); + } + if (osA.get_precision() != osB.get_precision()) { + FAIL("stream is not copy constructed correctly. (get_precision)"); + } + if (osA.size() != osB.size()) { + FAIL("stream is not copy constructed correctly. (size)"); + } + if (osA.get_stream_mode() != osB.get_stream_mode()) { + FAIL("stream is not copy constructed correctly. (get_stream_mode)"); + } + if (osB.size() != bufferSize) { + FAIL( + "sycl::context::size() returned an incorrect value " + "after copy constructed."); + } + if (osB.get_work_item_buffer_size() != workItemBufferSize) { + FAIL( + "sycl::context::get_work_item_buffer_size() returned an " + "incorrect value after copy constructed."); + } - if (osB.get_size() != bufferSize) { - FAIL(log, - "sycl::context::get_size() returned an incorrect value " - "after move constructed."); - } - if (osB.get_max_statement_size() != maxStatementSize) { - FAIL(log, - "sycl::context::get_max_statement_size() returned an " - "incorrect value after move constructed."); - } + handler.single_task(stream_kernel{}); + }); + } - handler.single_task(stream_kernel{}); - }); + /** check assignment operator + */ + { + queue.submit([&](sycl::handler &handler) { + sycl::stream osA(bufferSize, workItemBufferSize, handler); + sycl::stream osB(bufferSize / 2, workItemBufferSize / 2, handler); + osB = osA; + + if (osA.get_work_item_buffer_size() != osB.get_work_item_buffer_size()) { + FAIL( + "stream is not copy constructed correctly. " + "(get_work_item_buffer_size)"); + } + if (osA.get_precision() != osB.get_precision()) { + FAIL("stream is not copy constructed correctly. (get_precision)"); + } + if (osA.size() != osB.size()) { + FAIL("stream is not copy constructed correctly. (size)"); + } + if (osA.get_stream_mode() != osB.get_stream_mode()) { + FAIL("stream is not copy constructed correctly. (get_stream_mode)"); + } + if (osB.size() != bufferSize) { + FAIL( + "sycl::context::size() returned an incorrect value " + "after copy assigned."); + } + if (osB.get_work_item_buffer_size() != workItemBufferSize) { + FAIL( + "sycl::context::get_work_item_buffer_size() returned an " + "incorrect value after copy assigned."); } - /* check move assignment operator - */ - { - queue.submit([&](sycl::handler &handler) { + handler.single_task(stream_kernel{}); + }); + } - sycl::stream osA(bufferSize, maxStatementSize, handler); - sycl::stream osB(bufferSize / 2, maxStatementSize / 2, handler); - osB = std::move(osA); + /* check move constructor + */ + { + queue.submit([&](sycl::handler &handler) { + sycl::stream osA(bufferSize, workItemBufferSize, handler); + sycl::stream osB(std::move(osA)); + + if (osB.size() != bufferSize) { + FAIL( + "sycl::context::size() returned an incorrect value " + "after move constructed."); + } + if (osB.get_work_item_buffer_size() != workItemBufferSize) { + FAIL( + "sycl::context::get_work_item_buffer_size() returned an " + "incorrect value after move constructed."); + } - if (osB.get_size() != bufferSize) { - FAIL(log, - "sycl::context::get_size() returned an incorrect value " - "after move assigned."); - } - if (osB.get_max_statement_size() != maxStatementSize) { - FAIL(log, - "sycl::context::get_max_statement_size() returned an " - "incorrect value after move assigned."); - } + handler.single_task(stream_kernel{}); + }); + } - handler.single_task(stream_kernel{}); - }); + /* check move assignment operator + */ + { + queue.submit([&](sycl::handler &handler) { + sycl::stream osA(bufferSize, workItemBufferSize, handler); + sycl::stream osB(bufferSize / 2, workItemBufferSize / 2, handler); + osB = std::move(osA); + + if (osB.size() != bufferSize) { + FAIL( + "sycl::context::size() returned an incorrect value " + "after move assigned."); + } + if (osB.get_work_item_buffer_size() != workItemBufferSize) { + FAIL( + "sycl::context::get_work_item_buffer_size() returned an " + "incorrect value after move assigned."); } - /** check equality operator - */ - { - queue.submit([&](sycl::handler &handler) { - sycl::stream osA(bufferSize, maxStatementSize, handler); - sycl::stream osB(osA); - sycl::stream osC(bufferSize * 2, maxStatementSize * 2, handler); - osC = osA; - sycl::stream osD(bufferSize * 2, maxStatementSize * 2, handler); - - if (!(osA == osB) && areEqual(osA, osB)) { - FAIL(log, - "stream equality does not work correctly (copy constructed)"); - } + handler.single_task(stream_kernel{}); + }); + } - if (!(osA == osC) && areEqual(osA, osC)) { - FAIL(log, - "stream equality does not work correctly (copy assigned)"); - } - if (osA != osB) { - FAIL(log, - "stream non-equality does not work correctly" - "(copy constructed)"); - } - if (osA != osC) { - FAIL(log, - "stream non-equality does not work correctly" - "(copy assigned)"); - } - if (osC == osD) { - FAIL(log, - "stream equality does not work correctly" - "(comparing same)"); - } - if (!(osC != osD)) { - FAIL(log, - "stream non-equality does not work correctly" - "(comparing same)"); - } + /** check equality operator + */ + { + queue.submit([&](sycl::handler &handler) { + sycl::stream osA(bufferSize, workItemBufferSize, handler); + sycl::stream osB(osA); + sycl::stream osC(bufferSize * 2, workItemBufferSize * 2, handler); + osC = osA; + sycl::stream osD(bufferSize * 2, workItemBufferSize * 2, handler); + + if (!(osA == osB) && areEqual(osA, osB)) { + FAIL("stream equality does not work correctly (copy constructed)"); + } - handler.single_task(stream_kernel{}); - }); + if (!(osA == osC) && areEqual(osA, osC)) { + FAIL("stream equality does not work correctly (copy assigned)"); + } + if (osA != osB) { + FAIL( + "stream non-equality does not work correctly" + "(copy constructed)"); + } + if (osA != osC) { + FAIL( + "stream non-equality does not work correctly" + "(copy assigned)"); + } + if (osC == osD) { + FAIL( + "stream equality does not work correctly" + "(comparing same)"); + } + if (!(osC != osD)) { + FAIL( + "stream non-equality does not work correctly" + "(comparing same)"); } - /** check hashing - */ - { - queue.submit([&](sycl::handler &handler) { - sycl::stream osA(bufferSize, maxStatementSize, handler); - sycl::stream osB = osA; + handler.single_task(stream_kernel{}); + }); + } - std::hash hasher; + /** check hashing + */ + { + queue.submit([&](sycl::handler &handler) { + sycl::stream osA(bufferSize, workItemBufferSize, handler); + sycl::stream osB = osA; - if (hasher(osA) != hasher(osB)) { - FAIL(log, - "stream hashing does not work correctly (hashing of equal " - "failed)"); - } - handler.single_task(stream_kernel{}); - }); - } + std::hash hasher; - queue.wait_and_throw(); - } + if (hasher(osA) != hasher(osB)) { + FAIL( + "stream hashing does not work correctly (hashing of equal " + "failed)"); + } + handler.single_task(stream_kernel{}); + }); } -}; - -// register this test with the test_collection. -util::test_proxy proxy; -} /* namespace TEST_NAMESPACE */ + queue.wait_and_throw(); +});