Skip to content

[SYCL] Add __SYCL_INLINE attribute to cl namespace in library sources #986

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 9, 2020
Merged
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
2 changes: 1 addition & 1 deletion sycl/source/context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

// 4.6.2 Context class

namespace cl {
__SYCL_INLINE namespace cl {
namespace sycl {
context::context(const async_handler &AsyncHandler)
: context(default_selector().select_device(), AsyncHandler) {}
Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/accessor_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <CL/sycl/detail/accessor_impl.hpp>
#include <CL/sycl/detail/scheduler/scheduler.hpp>

namespace cl {
__SYCL_INLINE namespace cl {
namespace sycl {
namespace detail {

Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/builtins_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
namespace s = cl::sycl;
namespace d = s::detail;

namespace cl {
__SYCL_INLINE namespace cl {
namespace __host_std {
namespace {

Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/builtins_geometric.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
namespace s = cl::sycl;
namespace d = s::detail;

namespace cl {
__SYCL_INLINE namespace cl {
namespace __host_std {

s::cl_float Dot(s::cl_float2, s::cl_float2);
Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/builtins_integer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
namespace s = cl::sycl;
namespace d = s::detail;

namespace cl {
__SYCL_INLINE namespace cl {
namespace __host_std {
namespace {

Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/builtins_math.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
namespace s = cl::sycl;
namespace d = s::detail;

namespace cl {
__SYCL_INLINE namespace cl {
namespace __host_std {

namespace {
Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/builtins_relational.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
namespace s = cl::sycl;
namespace d = s::detail;

namespace cl {
__SYCL_INLINE namespace cl {
namespace __host_std {
namespace {

Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <CL/sycl/detail/common.hpp>
#include <CL/sycl/detail/common_info.hpp>

namespace cl {
__SYCL_INLINE namespace cl {
namespace sycl {
namespace detail {

Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#define STRINGIFY_LINE_HELP(s) #s
#define STRINGIFY_LINE(s) STRINGIFY_LINE_HELP(s)

namespace cl {
__SYCL_INLINE namespace cl {
namespace sycl {
namespace detail {

Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

#include <cstdlib>

namespace cl {
__SYCL_INLINE namespace cl {
namespace sycl {
namespace detail {

Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/context_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include <CL/sycl/platform.hpp>
#include <CL/sycl/stl.hpp>

namespace cl {
__SYCL_INLINE namespace cl {
namespace sycl {
namespace detail {

Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/device_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#include <algorithm>

namespace cl {
__SYCL_INLINE namespace cl {
namespace sycl {
namespace detail {

Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/device_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
(__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
#endif

namespace cl {
__SYCL_INLINE namespace cl {
namespace sycl {
namespace detail {

Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/error_handling/enqueue_kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

#include <CL/sycl/detail/pi.hpp>

namespace cl {
__SYCL_INLINE namespace cl {
namespace sycl {
namespace detail {

Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/error_handling/error_handling.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <CL/sycl/detail/pi.h>
#include <CL/sycl/detail/cg.hpp>

namespace cl {
__SYCL_INLINE namespace cl {
namespace sycl {
namespace detail {

Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/event_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

#include <chrono>

namespace cl {
__SYCL_INLINE namespace cl {
namespace sycl {
namespace detail {

Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/force_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <CL/sycl/stl.hpp>
#include <cstdlib>

namespace cl {
__SYCL_INLINE namespace cl {
namespace sycl {
namespace detail {

Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/helpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

#include <memory>

namespace cl {
__SYCL_INLINE namespace cl {
namespace sycl {
using ContextImplPtr = std::shared_ptr<cl::sycl::detail::context_impl>;
namespace detail {
Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/image_accessor_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <CL/sycl/accessor.hpp>
#include <CL/sycl/builtins.hpp>

namespace cl {
__SYCL_INLINE namespace cl {
namespace sycl {
namespace detail {

Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/image_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <CL/sycl/image.hpp>

namespace cl {
__SYCL_INLINE namespace cl {
namespace sycl {
namespace detail {

Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/kernel_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include <memory>

namespace cl {
__SYCL_INLINE namespace cl {
namespace sycl {
namespace detail {

Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/kernel_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <CL/sycl/detail/kernel_info.hpp>
#include <CL/sycl/device.hpp>

namespace cl {
__SYCL_INLINE namespace cl {
namespace sycl {
namespace detail {
template <>
Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/kernel_program_cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <CL/sycl/detail/kernel_program_cache.hpp>

namespace cl {
__SYCL_INLINE namespace cl {
namespace sycl {
namespace detail {
KernelProgramCache::~KernelProgramCache() {
Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/memory_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include <cstring>
#include <vector>

namespace cl {
__SYCL_INLINE namespace cl {
namespace sycl {
namespace detail {

Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/os_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

#endif // SYCL_RT_OS

namespace cl {
__SYCL_INLINE namespace cl {
namespace sycl {
namespace detail {

Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/pi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <stddef.h>
#include <string>

namespace cl {
__SYCL_INLINE namespace cl {
namespace sycl {
namespace detail {
namespace pi {
Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/platform_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <cstring>
#include <regex>

namespace cl {
__SYCL_INLINE namespace cl {
namespace sycl {
namespace detail {

Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/platform_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <CL/sycl/detail/platform_info.hpp>

namespace cl {
__SYCL_INLINE namespace cl {
namespace sycl {
namespace detail {

Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/platform_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <intrin.h>
#endif

namespace cl {
__SYCL_INLINE namespace cl {
namespace sycl {
namespace detail {

Expand Down
12 changes: 11 additions & 1 deletion sycl/source/detail/posix_pi.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
//==---------------- posix_pi.cpp ------------------------------------------==//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include <CL/sycl/detail/defines.hpp>

#include <dlfcn.h>
#include <string>

namespace cl {
__SYCL_INLINE namespace cl {
namespace sycl {
namespace detail {
namespace pi {
Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/program_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <CL/sycl/detail/program_impl.hpp>

namespace cl {
__SYCL_INLINE namespace cl {
namespace sycl {
namespace detail {
template <>
Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/program_manager/program_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include <mutex>
#include <sstream>

namespace cl {
__SYCL_INLINE namespace cl {
namespace sycl {
namespace detail {

Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/queue_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#include <cstring>

namespace cl {
__SYCL_INLINE namespace cl {
namespace sycl {
namespace detail {
template <> cl_uint queue_impl::get_info<info::queue::reference_count>() const {
Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/sampler_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <CL/sycl/detail/context_impl.hpp>
#include <CL/sycl/detail/sampler_impl.hpp>

namespace cl {
__SYCL_INLINE namespace cl {
namespace sycl {
namespace detail {

Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/scheduler/commands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include <memory>
#endif

namespace cl {
__SYCL_INLINE namespace cl {
namespace sycl {
namespace detail {

Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/scheduler/graph_builder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <set>
#include <vector>

namespace cl {
__SYCL_INLINE namespace cl {
namespace sycl {
namespace detail {

Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/scheduler/graph_processor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <memory>
#include <vector>

namespace cl {
__SYCL_INLINE namespace cl {
namespace sycl {
namespace detail {

Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/scheduler/scheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <set>
#include <vector>

namespace cl {
__SYCL_INLINE namespace cl {
namespace sycl {
namespace detail {

Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/stream_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <CL/sycl/detail/stream_impl.hpp>
#include <cstdio>

namespace cl {
__SYCL_INLINE namespace cl {
namespace sycl {
namespace detail {

Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/usm/clusm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

cl::sycl::detail::usm::CLUSM *gCLUSM = nullptr;

namespace cl {
__SYCL_INLINE namespace cl {
namespace sycl {
namespace detail {
namespace usm {
Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/usm/usm_dispatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <CL/sycl/detail/pi.hpp>
#include <CL/sycl/detail/usm_dispatch.hpp>

namespace cl {
__SYCL_INLINE namespace cl {
namespace sycl {
namespace detail {
namespace usm {
Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/usm/usm_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include <cstdlib>

namespace cl {
__SYCL_INLINE namespace cl {
namespace sycl {

using alloc = cl::sycl::usm::alloc;
Expand Down
2 changes: 1 addition & 1 deletion sycl/source/detail/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <CL/sycl/detail/util.hpp>

namespace cl {
__SYCL_INLINE namespace cl {
namespace sycl {
namespace detail {

Expand Down
Loading