Skip to content

Commit 16a925e

Browse files
Replaced deprecated cl::sycl namespace with sycl
1 parent f48cf30 commit 16a925e

31 files changed

+62
-65
lines changed

examples/cython/sycl_direct_linkage/sycl_function.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#include <CL/sycl.hpp>
3232
#include <oneapi/mkl.hpp>
3333

34-
int c_columnwise_total(cl::sycl::queue &q,
34+
int c_columnwise_total(sycl::queue &q,
3535
size_t n,
3636
size_t m,
3737
double *mat,

examples/cython/usm_memory/sycl_blackscholes.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,32 +89,32 @@ cpp_blackscholes(DPCTLSyclQueueRef q_ptr, size_t n_opts, T *params, T *callput)
8989
data_t mr = -opt_rate,
9090
sig_sig_two = two * opt_volatility * opt_volatility;
9191

92-
a = cl::sycl::log(opt_price / opt_strike);
92+
a = sycl::log(opt_price / opt_strike);
9393
b = opt_maturity * mr;
9494
z = opt_maturity * sig_sig_two;
9595

9696
c = quarter * z;
97-
e = cl::sycl::exp(b);
98-
y = cl::sycl::rsqrt(z);
97+
e = sycl::exp(b);
98+
y = sycl::rsqrt(z);
9999

100100
a = b - a;
101101
w1 = (a - c) * y;
102102
w2 = (a + c) * y;
103103

104104
if (w1 < zero) {
105-
d1 = cl::sycl::erfc(w1) * half;
105+
d1 = sycl::erfc(w1) * half;
106106
d1c = one - d1;
107107
}
108108
else {
109-
d1c = cl::sycl::erfc(-w1) * half;
109+
d1c = sycl::erfc(-w1) * half;
110110
d1 = one - d1c;
111111
}
112112
if (w2 < zero) {
113-
d2 = cl::sycl::erfc(w2) * half;
113+
d2 = sycl::erfc(w2) * half;
114114
d2c = one - d2;
115115
}
116116
else {
117-
d2c = cl::sycl::erfc(-w2) * half;
117+
d2c = sycl::erfc(-w2) * half;
118118
d2 = one - d2c;
119119
}
120120

libsyclinterface/helper/source/dpctl_error_handlers.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@
3131
#include <glog/logging.h>
3232
#endif
3333

34-
void DPCTL_AsyncErrorHandler::operator()(
35-
const cl::sycl::exception_list &exceptions)
34+
void DPCTL_AsyncErrorHandler::operator()(const sycl::exception_list &exceptions)
3635
{
3736
for (std::exception_ptr const &e : exceptions) {
3837
try {

libsyclinterface/helper/source/dpctl_utils_helper.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#include <sstream>
2828
#include <string>
2929

30-
using namespace cl::sycl;
30+
using namespace sycl;
3131

3232
/*!
3333
* Transforms enum info::device_type to string.
@@ -164,7 +164,7 @@ DPCTLSyclDeviceType DPCTL_SyclDeviceTypeToDPCTLDeviceType(info::device_type D)
164164
}
165165

166166
/*!
167-
* Transforms cl::sycl::aspect to string.
167+
* Transforms sycl::aspect to string.
168168
*/
169169
std::string DPCTL_AspectToStr(aspect aspectTy)
170170
{
@@ -237,7 +237,7 @@ std::string DPCTL_AspectToStr(aspect aspectTy)
237237
}
238238

239239
/*!
240-
* Transforms string to cl::sycl::aspect.
240+
* Transforms string to sycl::aspect.
241241
*/
242242
aspect DPCTL_StrToAspectType(const std::string &aspectTyStr)
243243
{

libsyclinterface/source/dpctl_sycl_context_interface.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#include <CL/sycl.hpp>
3131
#include <vector>
3232

33-
using namespace cl::sycl;
33+
using namespace sycl;
3434

3535
namespace
3636
{

libsyclinterface/source/dpctl_sycl_device_interface.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
#include <cstring>
3636
#include <vector>
3737

38-
using namespace cl::sycl;
38+
using namespace sycl;
3939

4040
namespace
4141
{

libsyclinterface/source/dpctl_sycl_device_manager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
#include <unordered_map>
3636
#include <vector>
3737

38-
using namespace cl::sycl;
38+
using namespace sycl;
3939

4040
namespace
4141
{

libsyclinterface/source/dpctl_sycl_device_selector_interface.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#include "dpctl_error_handlers.h"
2929
#include <CL/sycl.hpp> /* SYCL headers */
3030

31-
using namespace cl::sycl;
31+
using namespace sycl;
3232

3333
namespace
3434
{

libsyclinterface/source/dpctl_sycl_event_interface.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#include <CL/sycl.hpp> /* SYCL headers */
3232
#include <vector>
3333

34-
using namespace cl::sycl;
34+
using namespace sycl;
3535

3636
namespace
3737
{

libsyclinterface/source/dpctl_sycl_kernel_bundle_interface.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
// clang-format on
5353
#endif
5454

55-
using namespace cl::sycl;
55+
using namespace sycl;
5656

5757
namespace
5858
{

libsyclinterface/source/dpctl_sycl_kernel_interface.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#include <CL/sycl.hpp> /* Sycl headers */
3232
#include <cstdint>
3333

34-
using namespace cl::sycl;
34+
using namespace sycl;
3535

3636
namespace
3737
{

libsyclinterface/source/dpctl_sycl_platform_interface.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
#include <sstream>
3737
#include <vector>
3838

39-
using namespace cl::sycl;
39+
using namespace sycl;
4040

4141
namespace
4242
{

libsyclinterface/source/dpctl_sycl_platform_manager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
#include <set>
3737
#include <sstream>
3838

39-
using namespace cl::sycl;
39+
using namespace sycl;
4040

4141
namespace
4242
{

libsyclinterface/source/dpctl_sycl_queue_interface.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
#include <exception>
3535
#include <stdexcept>
3636

37-
using namespace cl::sycl;
37+
using namespace sycl;
3838

3939
namespace
4040
{

libsyclinterface/source/dpctl_sycl_queue_manager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#include <CL/sycl.hpp> /* SYCL headers */
3131
#include <vector>
3232

33-
using namespace cl::sycl;
33+
using namespace sycl;
3434

3535
/*------------------------------- Private helpers ----------------------------*/
3636

libsyclinterface/source/dpctl_sycl_usm_interface.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#include "dpctl_sycl_device_interface.h"
3131
#include <CL/sycl.hpp> /* SYCL headers */
3232

33-
using namespace cl::sycl;
33+
using namespace sycl;
3434

3535
namespace
3636
{

libsyclinterface/tests/test_sycl_context_interface.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
#include <gtest/gtest.h>
3434
#include <vector>
3535

36-
using namespace cl::sycl;
36+
using namespace sycl;
3737

3838
namespace
3939
{

libsyclinterface/tests/test_sycl_device_aspects.cpp

Lines changed: 22 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -74,40 +74,36 @@ auto build_params()
7474
"opencl:gpu", "opencl:cpu", "level_zero:gpu", "host");
7575

7676
constexpr auto param_2 =
77-
get_param_list<std::pair<const char *, cl::sycl::aspect>>(
78-
std::make_pair("host", cl::sycl::aspect::host),
79-
std::make_pair("cpu", cl::sycl::aspect::cpu),
80-
std::make_pair("gpu", cl::sycl::aspect::gpu),
81-
std::make_pair("accelerator", cl::sycl::aspect::accelerator),
82-
std::make_pair("custom", cl::sycl::aspect::custom),
83-
std::make_pair("fp16", cl::sycl::aspect::fp16),
84-
std::make_pair("fp64", cl::sycl::aspect::fp64),
85-
std::make_pair("atomic64", cl::sycl::aspect::atomic64),
86-
std::make_pair("online_compiler",
87-
cl::sycl::aspect::online_compiler),
88-
std::make_pair("online_linker", cl::sycl::aspect::online_linker),
89-
std::make_pair("queue_profiling",
90-
cl::sycl::aspect::queue_profiling),
77+
get_param_list<std::pair<const char *, sycl::aspect>>(
78+
std::make_pair("host", sycl::aspect::host),
79+
std::make_pair("cpu", sycl::aspect::cpu),
80+
std::make_pair("gpu", sycl::aspect::gpu),
81+
std::make_pair("accelerator", sycl::aspect::accelerator),
82+
std::make_pair("custom", sycl::aspect::custom),
83+
std::make_pair("fp16", sycl::aspect::fp16),
84+
std::make_pair("fp64", sycl::aspect::fp64),
85+
std::make_pair("atomic64", sycl::aspect::atomic64),
86+
std::make_pair("online_compiler", sycl::aspect::online_compiler),
87+
std::make_pair("online_linker", sycl::aspect::online_linker),
88+
std::make_pair("queue_profiling", sycl::aspect::queue_profiling),
9189
std::make_pair("usm_device_allocations",
92-
cl::sycl::aspect::usm_device_allocations),
90+
sycl::aspect::usm_device_allocations),
9391
std::make_pair("usm_host_allocations",
94-
cl::sycl::aspect::usm_host_allocations),
92+
sycl::aspect::usm_host_allocations),
9593
std::make_pair("usm_shared_allocations",
96-
cl::sycl::aspect::usm_shared_allocations),
94+
sycl::aspect::usm_shared_allocations),
9795
std::make_pair("usm_restricted_shared_allocations",
98-
cl::sycl::aspect::usm_restricted_shared_allocations),
96+
sycl::aspect::usm_restricted_shared_allocations),
9997
std::make_pair("usm_system_allocations",
100-
cl::sycl::aspect::usm_system_allocations),
98+
sycl::aspect::usm_system_allocations),
10199
std::make_pair("usm_atomic_host_allocations",
102-
cl::sycl::aspect::usm_atomic_host_allocations),
100+
sycl::aspect::usm_atomic_host_allocations),
103101
std::make_pair("usm_atomic_shared_allocations",
104-
cl::sycl::aspect::usm_atomic_shared_allocations),
105-
std::make_pair("host_debuggable",
106-
cl::sycl::aspect::host_debuggable));
102+
sycl::aspect::usm_atomic_shared_allocations),
103+
std::make_pair("host_debuggable", sycl::aspect::host_debuggable));
107104

108105
auto pairs =
109-
build_param_pairs<const char *,
110-
std::pair<const char *, cl::sycl::aspect>,
106+
build_param_pairs<const char *, std::pair<const char *, sycl::aspect>,
111107
param_1.size(), param_2.size()>(param_1, param_2);
112108

113109
return build_gtest_values(pairs);
@@ -117,7 +113,7 @@ auto build_params()
117113

118114
struct TestDPCTLSyclDeviceInterfaceAspects
119115
: public ::testing::TestWithParam<
120-
std::pair<const char *, std::pair<const char *, cl::sycl::aspect>>>
116+
std::pair<const char *, std::pair<const char *, sycl::aspect>>>
121117
{
122118
DPCTLSyclDeviceSelectorRef DSRef = nullptr;
123119
DPCTLSyclDeviceRef DRef = nullptr;

libsyclinterface/tests/test_sycl_device_interface.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
#include <CL/sycl.hpp>
3333
#include <gtest/gtest.h>
3434

35-
using namespace cl::sycl;
35+
using namespace sycl;
3636

3737
struct TestDPCTLSyclDeviceInterface
3838
: public ::testing::TestWithParam<const char *>

libsyclinterface/tests/test_sycl_device_invalid_filters.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
#include <CL/sycl.hpp>
2929
#include <gtest/gtest.h>
3030

31-
using namespace cl::sycl;
31+
using namespace sycl;
32+
3233
struct TestUnsupportedFilters : public ::testing::TestWithParam<const char *>
3334
{
3435
DPCTLSyclDeviceSelectorRef DSRef = nullptr;

libsyclinterface/tests/test_sycl_device_manager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ struct TestGetNumDevicesForBTy : public ::testing::TestWithParam<int>
186186

187187
TEST_P(TestGetNumDevicesForBTy, ChkGetNumDevices)
188188
{
189-
auto platforms = cl::sycl::platform::get_platforms();
189+
auto platforms = sycl::platform::get_platforms();
190190
size_t nDevices = 0;
191191
sycl::default_selector mRanker;
192192
for (const auto &P : platforms) {

libsyclinterface/tests/test_sycl_device_selector_interface.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#include <CL/sycl.hpp>
3232
#include <gtest/gtest.h>
3333

34-
using namespace cl::sycl;
34+
using namespace sycl;
3535

3636
namespace
3737
{

libsyclinterface/tests/test_sycl_device_subdevices.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
#include <CL/sycl.hpp>
3636
#include <gtest/gtest.h>
3737

38-
using namespace cl::sycl;
38+
using namespace sycl;
3939

4040
DEFINE_SIMPLE_CONVERSION_FUNCTIONS(device, DPCTLSyclDeviceRef);
4141

libsyclinterface/tests/test_sycl_event_interface.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#include <gtest/gtest.h>
3232
#include <vector>
3333

34-
using namespace cl::sycl;
34+
using namespace sycl;
3535

3636
namespace
3737
{

libsyclinterface/tests/test_sycl_kernel_bundle_interface.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
#include <fstream>
4141
#include <gtest/gtest.h>
4242

43-
using namespace cl::sycl;
43+
using namespace sycl;
4444

4545
struct TestDPCTLSyclKernelBundleInterface
4646
: public ::testing::TestWithParam<const char *>

libsyclinterface/tests/test_sycl_kernel_interface.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
#include <array>
3737
#include <gtest/gtest.h>
3838

39-
using namespace cl::sycl;
39+
using namespace sycl;
4040

4141
namespace
4242
{

libsyclinterface/tests/test_sycl_platform_interface.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
#include <gtest/gtest.h>
3535
#include <vector>
3636

37-
using namespace cl::sycl;
37+
using namespace sycl;
3838

3939
namespace
4040
{

libsyclinterface/tests/test_sycl_platform_invalid_filters.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929
#include <CL/sycl.hpp>
3030
#include <gtest/gtest.h>
3131

32-
using namespace cl::sycl;
32+
using namespace sycl;
33+
3334
struct TestUnsupportedFilters : public ::testing::TestWithParam<const char *>
3435
{
3536
DPCTLSyclDeviceSelectorRef DSRef = nullptr;

libsyclinterface/tests/test_sycl_queue_interface.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
#include <CL/sycl.hpp>
3737
#include <gtest/gtest.h>
3838

39-
using namespace cl::sycl;
39+
using namespace sycl;
4040

4141
namespace
4242
{

libsyclinterface/tests/test_sycl_queue_manager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
#include <thread>
3636

3737
using namespace std;
38-
using namespace cl::sycl;
38+
using namespace sycl;
3939

4040
namespace
4141
{

libsyclinterface/tests/test_sycl_usm_interface.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
#include <cstring>
3737
#include <gtest/gtest.h>
3838

39-
using namespace cl::sycl;
39+
using namespace sycl;
4040

4141
namespace
4242
{

0 commit comments

Comments
 (0)