Skip to content

Commit 0a8d99d

Browse files
author
Alexander Batashev
committed
More consistent use of _class
Signed-off-by: Alexander Batashev <[email protected]>
1 parent eed9645 commit 0a8d99d

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

sycl/include/CL/sycl/detail/program_impl.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ class program_impl {
6969
///
7070
/// @param ProgramList is a list of program_impl instances.
7171
/// @param LinkOptions is a string containing valid OpenCL link options.
72-
program_impl(vector_class<std::shared_ptr<program_impl>> ProgramList,
72+
program_impl(vector_class<shared_ptr_class<program_impl>> ProgramList,
7373
string_class LinkOptions = "");
7474

7575
/// Constructs a program instance from plugin interface interoperability
@@ -204,7 +204,7 @@ class program_impl {
204204
///
205205
/// @return a valid instance of SYCL kernel.
206206
kernel get_kernel(string_class KernelName,
207-
std::shared_ptr<program_impl> PtrToSelf,
207+
shared_ptr_class<program_impl> PtrToSelf,
208208
bool IsCreatedFromSource) const;
209209

210210
/// Queries this SYCL program for information.
@@ -336,7 +336,7 @@ class program_impl {
336336
RT::PiKernel get_pi_kernel(const string_class &KernelName) const;
337337

338338
/// @return a vector of sorted in ascending order SYCL devices.
339-
std::vector<device>
339+
vector_class<device>
340340
sort_devices_by_cl_device_id(vector_class<device> Devices);
341341

342342
/// Throws an invalid_object_exception if state of this program is in the

sycl/include/CL/sycl/program.hpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
#include <CL/sycl/kernel.hpp>
1616
#include <CL/sycl/stl.hpp>
1717

18-
#include <memory>
19-
2018
__SYCL_INLINE namespace cl {
2119
namespace sycl {
2220

@@ -296,7 +294,7 @@ class program {
296294
program_state get_state() const;
297295

298296
private:
299-
program(std::shared_ptr<detail::program_impl> impl);
297+
program(shared_ptr_class<detail::program_impl> impl);
300298

301299
/// Template-free version of get_kernel.
302300
///

sycl/source/detail/program_impl.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ program_impl::program_impl(const context &Context,
2727
: MContext(Context), MDevices(DeviceList) {}
2828

2929
program_impl::program_impl(
30-
vector_class<std::shared_ptr<program_impl>> ProgramList,
30+
vector_class<shared_ptr_class<program_impl>> ProgramList,
3131
string_class LinkOptions)
3232
: MState(program_state::linked), MLinkOptions(LinkOptions),
3333
MBuildOptions(LinkOptions) {
@@ -37,7 +37,7 @@ program_impl::program_impl(
3737
}
3838
MContext = ProgramList[0]->MContext;
3939
MDevices = ProgramList[0]->MDevices;
40-
std::vector<device> DevicesSorted;
40+
vector_class<device> DevicesSorted;
4141
if (!is_host()) {
4242
DevicesSorted = sort_devices_by_cl_device_id(MDevices);
4343
}
@@ -49,7 +49,7 @@ program_impl::program_impl(
4949
"Not all programs are associated with the same context");
5050
}
5151
if (!is_host()) {
52-
std::vector<device> PrgDevicesSorted =
52+
vector_class<device> PrgDevicesSorted =
5353
sort_devices_by_cl_device_id(Prg->MDevices);
5454
if (PrgDevicesSorted != DevicesSorted) {
5555
throw invalid_object_error(
@@ -231,7 +231,7 @@ bool program_impl::has_kernel(string_class KernelName,
231231
}
232232

233233
kernel program_impl::get_kernel(string_class KernelName,
234-
std::shared_ptr<program_impl> PtrToSelf,
234+
shared_ptr_class<program_impl> PtrToSelf,
235235
bool IsCreatedFromSource) const {
236236
throw_if_state_is(program_state::none);
237237
if (is_host()) {
@@ -355,7 +355,7 @@ RT::PiKernel program_impl::get_pi_kernel(const string_class &KernelName) const {
355355
return Kernel;
356356
}
357357

358-
std::vector<device>
358+
vector_class<device>
359359
program_impl::sort_devices_by_cl_device_id(vector_class<device> Devices) {
360360
std::sort(Devices.begin(), Devices.end(),
361361
[](const device &id1, const device &id2) {

0 commit comments

Comments
 (0)