Skip to content
Draft
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
4 changes: 0 additions & 4 deletions sycl/include/sycl/detail/type_traits/vec_marray_traits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,7 @@
#include <sycl/detail/defines_elementary.hpp>

#ifndef __SYCL_USE_LIBSYCL8_VEC_IMPL
#if defined(__INTEL_PREVIEW_BREAKING_CHANGES)
#define __SYCL_USE_LIBSYCL8_VEC_IMPL 0
#else
#define __SYCL_USE_LIBSYCL8_VEC_IMPL 1
#endif
#endif

namespace sycl {
Expand Down
4 changes: 2 additions & 2 deletions sycl/test-e2e/Basic/vector/bool.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// RUN: %{build} -o %t.out
// RUN: %{run} %t.out

// RUN: %if preview-breaking-changes-supported %{ %{build} -fpreview-breaking-changes -o %t2.out %}
// RUN: %if preview-breaking-changes-supported %{ %{run} %t2.out %}
// RUN: %{build} -D__SYCL_USE_LIBSYCL8_VEC_IMPL=1 -o %t2.out
// RUN: %{run} %t2.out

//==-------------- vec_bool.cpp - SYCL vec<> for bool test -----------------==//
//
Expand Down
4 changes: 2 additions & 2 deletions sycl/test-e2e/Basic/vector/byte.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// RUN: %{build} %cxx_std_optionc++17 -o %t.out
// RUN: %{run} %t.out

// RUN: %if preview-breaking-changes-supported %{ %{build} -fpreview-breaking-changes %cxx_std_optionc++17 -o %t2.out %}
// RUN: %if preview-breaking-changes-supported %{ %{run} %t2.out %}
// RUN: %{build} -D__SYCL_USE_LIBSYCL8_VEC_IMPL=1 %cxx_std_optionc++17 -o %t2.out
// RUN: %{run} %t2.out

//==---------- vector_byte.cpp - SYCL vec<> for std::byte test -------------==//
//
Expand Down
4 changes: 2 additions & 2 deletions sycl/test-e2e/Basic/vector/int-convert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
// RUN: %{build} -o %t.out -DSYCL2020_DISABLE_DEPRECATION_WARNINGS
// RUN: %{run} %t.out
//
// RUN: %if preview-breaking-changes-supported %{ %{build} -fpreview-breaking-changes -DSYCL2020_DISABLE_DEPRECATION_WARNINGS -o %t2.out %}
// RUN: %if preview-breaking-changes-supported %{ %{run} %t2.out %}
// RUN: %{build} -D__SYCL_USE_LIBSYCL8_VEC_IMPL=1 -DSYCL2020_DISABLE_DEPRECATION_WARNINGS -o %t2.out
// RUN: %{run} %t2.out

#include <sycl/detail/core.hpp>
#include <sycl/detail/vector_convert.hpp>
Expand Down
4 changes: 2 additions & 2 deletions sycl/test-e2e/Basic/vector/load_store.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// RUN: %{build} -o %t.out
// RUN: %{run} %t.out

// RUN: %if preview-breaking-changes-supported %{ %{build} -fpreview-breaking-changes -o %t2.out %}
// RUN: %if preview-breaking-changes-supported %{ %{run} %t2.out %}
// RUN: %{build} -D__SYCL_USE_LIBSYCL8_VEC_IMPL=1 -o %t2.out
// RUN: %{run} %t2.out

// XFAIL: target-native_cpu
// XFAIL-TRACKER: https://github.com/intel/llvm/issues/20142
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// REQUIRES: preview-breaking-changes-supported
// RUN: %{build} -fpreview-breaking-changes -o %t.out
// RUN: %{build} -o %t.out
// RUN: %{run} %t.out

// Checks scalar/vec arithmetic operator ordering.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// REQUIRES: preview-breaking-changes-supported
// RUN: %{build} -fpreview-breaking-changes -o %t.out
// RUN: %{build} -o %t.out
// RUN: %{run} %t.out

// Checks scalar/vec bitwise operator ordering.
Expand Down
4 changes: 2 additions & 2 deletions sycl/test-e2e/Regression/swizzle_opassign.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// RUN: %{build} -o %t.out
// RUN: %{run} %t.out
// RUN: %if preview-breaking-changes-supported %{ %{build} -fpreview-breaking-changes -o %t2.out %}
// RUN: %if preview-breaking-changes-supported %{ %{run} %t2.out %}
// RUN: %{build} -D__SYCL_USE_LIBSYCL8_VEC_IMPL=1 -o %t2.out
// RUN: %{run} %t2.out

// Tests that the mutating operators (+=, -=, ..., ++, --) on swizzles compile
// and correctly mutate the elements in the corresponding vector.
Expand Down
4 changes: 2 additions & 2 deletions sycl/test-e2e/Regression/vec_rel_swizzle_ops.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// RUN: %{build} -o %t.out
// RUN: %{run} %t.out

// RUN: %if preview-breaking-changes-supported %{ %{build} -fpreview-breaking-changes -o %t2.out %}
// RUN: %if preview-breaking-changes-supported %{ %{run} %t2.out %}
// RUN: %{build} -D__SYCL_USE_LIBSYCL8_VEC_IMPL=1 -o %t2.out
// RUN: %{run} %t2.out

#include <cstdlib>
#include <sycl/detail/core.hpp>
Expand Down
110 changes: 53 additions & 57 deletions sycl/test/basic_tests/vectors/assign.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %clangxx -fsycl -fsyntax-only %s -fpreview-breaking-changes
// RUN: %clangxx -fsycl -fsyntax-only %s
// RUN: %clangxx -fsycl -fsyntax-only %s -D__SYCL_USE_LIBSYCL8_VEC_IMPL=1

#include <sycl/sycl.hpp>

Expand All @@ -14,69 +14,65 @@ using sw_float_2 = decltype(std::declval<vec<float, 4>>().swizzle<1, 2>());
using sw_double_1 = decltype(std::declval<vec<double, 4>>().swizzle<1>());
using sw_double_2 = decltype(std::declval<vec<double, 4>>().swizzle<1, 2>());

#if __INTEL_PREVIEW_BREAKING_CHANGES
#define EXCEPT_IN_PREVIEW !
#if defined(__SYCL_USE_LIBSYCL8_VEC_IMPL) && (__SYCL_USE_LIBSYCL8_VEC_IMPL)
#define EXCEPT_IF_NEW_VEC_IMPL
#else
#define EXCEPT_IN_PREVIEW
#define EXCEPT_IF_NEW_VEC_IMPL !
#endif

// clang-format off
static_assert( std::is_assignable_v<vec<half, 1>, half>);
static_assert( std::is_assignable_v<vec<half, 1>, float>);
static_assert( std::is_assignable_v<vec<half, 1>, double>);
static_assert( std::is_assignable_v<vec<half, 1>, vec<half, 1>>);
static_assert(EXCEPT_IF_NEW_VEC_IMPL std::is_assignable_v<vec<half, 1>, vec<float, 1>>);
static_assert(EXCEPT_IF_NEW_VEC_IMPL std::is_assignable_v<vec<half, 1>, vec<double, 1>>);
static_assert( std::is_assignable_v<vec<half, 1>, sw_half_1>);
static_assert(EXCEPT_IF_NEW_VEC_IMPL std::is_assignable_v<vec<half, 1>, sw_float_1>);
static_assert(EXCEPT_IF_NEW_VEC_IMPL std::is_assignable_v<vec<half, 1>, sw_double_1>);
static_assert( !std::is_assignable_v<vec<half, 1>, sw_half_2>);
static_assert( !std::is_assignable_v<vec<half, 1>, sw_float_2>);
static_assert( !std::is_assignable_v<vec<half, 1>, sw_double_2>);

// IN_PREVIEW_ONLY condition<>
// EXCEPT_IN_PREVIEW condition<>
static_assert( std::is_assignable_v<vec<half, 2>, half>);
static_assert( std::is_assignable_v<vec<half, 2>, float>);
static_assert( std::is_assignable_v<vec<half, 2>, double>);
static_assert( std::is_assignable_v<vec<half, 2>, vec<half, 1>>);
static_assert( !std::is_assignable_v<vec<half, 2>, vec<float, 1>>);
static_assert( !std::is_assignable_v<vec<half, 2>, vec<double, 1>>);
static_assert( std::is_assignable_v<vec<half, 2>, sw_half_1>);
static_assert(EXCEPT_IF_NEW_VEC_IMPL std::is_assignable_v<vec<half, 2>, sw_float_1>);
static_assert(EXCEPT_IF_NEW_VEC_IMPL std::is_assignable_v<vec<half, 2>, sw_double_1>);
static_assert( std::is_assignable_v<vec<half, 2>, sw_half_2>);
static_assert( !std::is_assignable_v<vec<half, 2>, sw_float_2>);
static_assert( !std::is_assignable_v<vec<half, 2>, sw_double_2>);

static_assert( std::is_assignable_v<vec<half, 1>, half>);
static_assert( std::is_assignable_v<vec<half, 1>, float>);
static_assert( std::is_assignable_v<vec<half, 1>, double>);
static_assert( std::is_assignable_v<vec<half, 1>, vec<half, 1>>);
static_assert(EXCEPT_IN_PREVIEW std::is_assignable_v<vec<half, 1>, vec<float, 1>>);
static_assert(EXCEPT_IN_PREVIEW std::is_assignable_v<vec<half, 1>, vec<double, 1>>);
static_assert( std::is_assignable_v<vec<half, 1>, sw_half_1>);
static_assert(EXCEPT_IN_PREVIEW std::is_assignable_v<vec<half, 1>, sw_float_1>);
static_assert(EXCEPT_IN_PREVIEW std::is_assignable_v<vec<half, 1>, sw_double_1>);
static_assert( !std::is_assignable_v<vec<half, 1>, sw_half_2>);
static_assert( !std::is_assignable_v<vec<half, 1>, sw_float_2>);
static_assert( !std::is_assignable_v<vec<half, 1>, sw_double_2>);
static_assert( std::is_assignable_v<vec<float, 1>, half>);
static_assert( std::is_assignable_v<vec<float, 1>, float>);
static_assert( std::is_assignable_v<vec<float, 1>, double>);
static_assert(EXCEPT_IF_NEW_VEC_IMPL std::is_assignable_v<vec<float, 1>, vec<half, 1>>);
static_assert( std::is_assignable_v<vec<float, 1>, vec<float, 1>>);
static_assert( std::is_assignable_v<vec<float, 1>, vec<double, 1>>);
static_assert(EXCEPT_IF_NEW_VEC_IMPL std::is_assignable_v<vec<float, 1>, sw_half_1>);
static_assert( std::is_assignable_v<vec<float, 1>, sw_float_1>);
static_assert( std::is_assignable_v<vec<float, 1>, sw_double_1>);
static_assert( !std::is_assignable_v<vec<float, 1>, sw_half_2>);
static_assert( !std::is_assignable_v<vec<float, 1>, sw_float_2>);
static_assert( !std::is_assignable_v<vec<float, 1>, sw_double_2>);

static_assert( std::is_assignable_v<vec<half, 2>, half>);
static_assert( std::is_assignable_v<vec<half, 2>, float>);
static_assert( std::is_assignable_v<vec<half, 2>, double>);
static_assert( std::is_assignable_v<vec<half, 2>, vec<half, 1>>);
static_assert( !std::is_assignable_v<vec<half, 2>, vec<float, 1>>);
static_assert( !std::is_assignable_v<vec<half, 2>, vec<double, 1>>);
static_assert( std::is_assignable_v<vec<half, 2>, sw_half_1>);
static_assert(EXCEPT_IN_PREVIEW std::is_assignable_v<vec<half, 2>, sw_float_1>);
static_assert(EXCEPT_IN_PREVIEW std::is_assignable_v<vec<half, 2>, sw_double_1>);
static_assert( std::is_assignable_v<vec<half, 2>, sw_half_2>);
static_assert( !std::is_assignable_v<vec<half, 2>, sw_float_2>);
static_assert( !std::is_assignable_v<vec<half, 2>, sw_double_2>);

static_assert( std::is_assignable_v<vec<float, 1>, half>);
static_assert( std::is_assignable_v<vec<float, 1>, float>);
static_assert( std::is_assignable_v<vec<float, 1>, double>);
static_assert(EXCEPT_IN_PREVIEW std::is_assignable_v<vec<float, 1>, vec<half, 1>>);
static_assert( std::is_assignable_v<vec<float, 1>, vec<float, 1>>);
static_assert( std::is_assignable_v<vec<float, 1>, vec<double, 1>>);
static_assert(EXCEPT_IN_PREVIEW std::is_assignable_v<vec<float, 1>, sw_half_1>);
static_assert( std::is_assignable_v<vec<float, 1>, sw_float_1>);
static_assert( std::is_assignable_v<vec<float, 1>, sw_double_1>);
static_assert( !std::is_assignable_v<vec<float, 1>, sw_half_2>);
static_assert( !std::is_assignable_v<vec<float, 1>, sw_float_2>);
static_assert( !std::is_assignable_v<vec<float, 1>, sw_double_2>);

static_assert( std::is_assignable_v<vec<float, 2>, half>);
static_assert( std::is_assignable_v<vec<float, 2>, float>);
static_assert( std::is_assignable_v<vec<float, 2>, double>);
static_assert( std::is_assignable_v<vec<float, 2>, half>);
static_assert( std::is_assignable_v<vec<float, 2>, float>);
static_assert( std::is_assignable_v<vec<float, 2>, double>);
#if __SYCL_DEVICE_ONLY__
static_assert(EXCEPT_IN_PREVIEW std::is_assignable_v<vec<float, 2>, vec<half, 1>>);
static_assert(EXCEPT_IF_NEW_VEC_IMPL std::is_assignable_v<vec<float, 2>, vec<half, 1>>);
#else
static_assert( !std::is_assignable_v<vec<float, 2>, vec<half, 1>>);
static_assert( !std::is_assignable_v<vec<float, 2>, vec<half, 1>>);
#endif
static_assert( std::is_assignable_v<vec<float, 2>, vec<float, 1>>);
static_assert( std::is_assignable_v<vec<float, 2>, vec<double, 1>>);
static_assert(EXCEPT_IN_PREVIEW std::is_assignable_v<vec<float, 2>, sw_half_1>);
static_assert( std::is_assignable_v<vec<float, 2>, sw_float_1>);
static_assert( std::is_assignable_v<vec<float, 2>, sw_double_1>);
static_assert( !std::is_assignable_v<vec<float, 2>, sw_half_2>);
static_assert( std::is_assignable_v<vec<float, 2>, sw_float_2>);
static_assert( !std::is_assignable_v<vec<float, 2>, sw_double_2>);
static_assert( std::is_assignable_v<vec<float, 2>, vec<float, 1>>);
static_assert( std::is_assignable_v<vec<float, 2>, vec<double, 1>>);
static_assert(EXCEPT_IF_NEW_VEC_IMPL std::is_assignable_v<vec<float, 2>, sw_half_1>);
static_assert( std::is_assignable_v<vec<float, 2>, sw_float_1>);
static_assert( std::is_assignable_v<vec<float, 2>, sw_double_1>);
static_assert( !std::is_assignable_v<vec<float, 2>, sw_half_2>);
static_assert( std::is_assignable_v<vec<float, 2>, sw_float_2>);
static_assert( !std::is_assignable_v<vec<float, 2>, sw_double_2>);
2 changes: 1 addition & 1 deletion sycl/test/basic_tests/vectors/constexpr-constructor.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %clangxx -fsycl -fsyntax-only -Wno-deprecated-declarations %s
// RUN: %if preview-breaking-changes-supported %{%clangxx -fsycl -fsyntax-only -fpreview-breaking-changes -Wno-deprecated-declarations %s%}
// RUN: %clangxx -fsycl -fsyntax-only -D__SYCL_USE_LIBSYCL8_VEC_IMPL=1 -Wno-deprecated-declarations %s

#include <sycl/sycl.hpp>

Expand Down
Loading