Skip to content

Commit

Permalink
Apply offline comments about vector.hpp & vector_convert.hpp
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexeySachkov committed Nov 9, 2024
1 parent df4ae3e commit b38ceed
Show file tree
Hide file tree
Showing 13 changed files with 16 additions and 6 deletions.
1 change: 1 addition & 0 deletions sycl/include/sycl/builtins_utils_vec.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <sycl/builtins_utils_scalar.hpp>

#include <sycl/detail/type_traits.hpp>
#include <sycl/detail/vector_convert.hpp>
#include <sycl/marray.hpp> // for marray
#include <sycl/vector.hpp> // for vec

Expand Down
2 changes: 2 additions & 0 deletions sycl/include/sycl/detail/vector_convert.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
#include <sycl/exception.hpp> // for errc

#include <sycl/ext/oneapi/bfloat16.hpp> // bfloat16
#include <sycl/vector.hpp>

#ifndef __SYCL_DEVICE_ONLY__
#include <cfenv> // for fesetround, fegetround
Expand Down Expand Up @@ -152,6 +153,7 @@ __imf_ushort_as_bfloat16(unsigned short x);
#endif // __SYCL_DEVICE_ONLY__ && (defined(__SPIR__) || defined(__SPIRV__))

namespace sycl {

inline namespace _V1 {
#ifndef __SYCL_DEVICE_ONLY__
// TODO: Refactor includes so we can just "#include".
Expand Down
7 changes: 4 additions & 3 deletions sycl/include/sycl/ext/oneapi/experimental/bfloat16_math.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@

#pragma once

#include <sycl/builtins.hpp> // for ceil, cos, exp, exp10, exp2
#include <sycl/builtins_utils_vec.hpp> // For simplify_if_swizzle, is_swizzle
#include <sycl/detail/memcpy.hpp> // sycl::detail::memcpy
#include <sycl/builtins.hpp> // for ceil, cos, exp, exp10, exp2
#include <sycl/builtins_utils_vec.hpp> // For simplify_if_swizzle, is_swizzle
#include <sycl/detail/memcpy.hpp> // sycl::detail::memcpy
#include <sycl/detail/vector_convert.hpp>
#include <sycl/ext/oneapi/bfloat16.hpp> // for bfloat16, bfloat16ToBits
#include <sycl/marray.hpp> // for marray

Expand Down
1 change: 1 addition & 0 deletions sycl/include/sycl/sycl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <sycl/builtins.hpp>
#include <sycl/context.hpp>
#include <sycl/define_vendors.hpp>
#include <sycl/detail/vector_convert.hpp>
#include <sycl/device.hpp>
#include <sycl/device_aspect_traits.hpp>
#include <sycl/device_selector.hpp>
Expand Down
3 changes: 0 additions & 3 deletions sycl/include/sycl/vector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,6 @@ class __SYCL_EBO vec

public:
// Out-of-class definition is in `sycl/detail/vector_convert.hpp`
// It is included at the _end_ of this file
template <typename convertT,
rounding_mode roundingMode = rounding_mode::automatic>
vec<convertT, NumElements> convert() const;
Expand Down Expand Up @@ -1317,5 +1316,3 @@ class SwizzleOp {
} // namespace detail
} // namespace _V1
} // namespace sycl

#include <sycl/detail/vector_convert.hpp>
1 change: 1 addition & 0 deletions sycl/source/detail/image_accessor_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <sycl/accessor.hpp>
#include <sycl/accessor_image.hpp>
#include <sycl/builtins.hpp>
#include <sycl/detail/vector_convert.hpp>
#include <sycl/image.hpp>

namespace sycl {
Expand Down
1 change: 1 addition & 0 deletions sycl/test-e2e/BFloat16/bfloat16_vec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
// RUN: %if preview-breaking-changes-supported %{ %{run} %t2.out %}

#include <sycl/detail/core.hpp>
#include <sycl/detail/vector_convert.hpp>
#include <sycl/stream.hpp>

#include <sycl/ext/oneapi/bfloat16.hpp>
Expand Down
1 change: 1 addition & 0 deletions sycl/test-e2e/Basic/sycl_2020_images/common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <sycl/accessor_image.hpp>
#include <sycl/builtins.hpp>
#include <sycl/detail/core.hpp>
#include <sycl/detail/vector_convert.hpp>
#include <sycl/image.hpp>

using namespace sycl;
Expand Down
1 change: 1 addition & 0 deletions sycl/test-e2e/Basic/vector/bool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
//===----------------------------------------------------------------------===//

#include <sycl/detail/core.hpp>
#include <sycl/detail/vector_convert.hpp>
#include <sycl/vector.hpp>

constexpr int size = 2;
Expand Down
1 change: 1 addition & 0 deletions sycl/test-e2e/Basic/vector/byte.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
//===----------------------------------------------------------------------===//

#include <sycl/detail/core.hpp>
#include <sycl/detail/vector_convert.hpp>
#include <sycl/vector.hpp>

#include <cstddef> // std::byte
Expand Down
1 change: 1 addition & 0 deletions sycl/test-e2e/Basic/vector/int-convert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// RUN: %if preview-breaking-changes-supported %{ %{run} %t2.out %}

#include <sycl/detail/core.hpp>
#include <sycl/detail/vector_convert.hpp>
#include <sycl/vector.hpp>

#include <cstdint>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

// This test checks the device code generated for vec<bfloat16> math builtins.
#include <sycl/detail/core.hpp>
#include <sycl/detail/vector_convert.hpp>
#include <sycl/ext/oneapi/experimental/bfloat16_math.hpp>

using namespace sycl;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// REQUIRES: linux

#include <sycl/detail/core.hpp>
#include <sycl/detail/vector_convert.hpp>
#include <sycl/ext/oneapi/bfloat16.hpp>
#include <sycl/vector.hpp>

Expand Down

0 comments on commit b38ceed

Please sign in to comment.