Skip to content

Commit 60cb520

Browse files
committed
Removed unnecessary comments
1 parent 780cb9c commit 60cb520

File tree

17 files changed

+14
-158
lines changed

17 files changed

+14
-158
lines changed

sycl/include/CL/sycl/backend_types.hpp

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010

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

13-
// #include <fstream>
14-
// #include <iostream>
15-
// #include <istream>
1613
#include <string>
1714

1815
__SYCL_INLINE_NAMESPACE(cl) {
@@ -70,31 +67,7 @@ inline std::string backend_to_string(const backend& be) {
7067
}
7168
return Out;
7269
}
73-
// inline std::ostream &operator<<(std::ostream &Out, backend be) {
74-
// switch (be) {
75-
// case backend::host:
76-
// Out << "host";
77-
// break;
78-
// case backend::opencl:
79-
// Out << "opencl";
80-
// break;
81-
// case backend::ext_oneapi_level_zero:
82-
// Out << "ext_oneapi_level_zero";
83-
// break;
84-
// case backend::ext_oneapi_cuda:
85-
// Out << "ext_oneapi_cuda";
86-
// break;
87-
// case backend::ext_intel_esimd_emulator:
88-
// Out << "ext_intel_esimd_emulator";
89-
// break;
90-
// case backend::ext_oneapi_hip:
91-
// Out << "ext_oneapi_hip";
92-
// break;
93-
// case backend::all:
94-
// Out << "all";
95-
// }
96-
// return Out;
97-
// }
70+
9871

9972
} // namespace sycl
10073
} // __SYCL_INLINE_NAMESPACE(cl)

sycl/include/CL/sycl/detail/common.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ static inline std::string codeToString(cl_int code) {
116116
"Native API returns: "
117117

118118
#ifndef __SYCL_SUPPRESS_OCL_ERROR_REPORT
119+
#include <cstdio>
119120
// TODO: rename all names with direct use of OCL/OPENCL to be backend agnostic.
120121
#define __SYCL_REPORT_OCL_ERR_TO_STREAM(expr) \
121122
{ \

sycl/include/CL/sycl/detail/device_filter.hpp

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,13 @@
77
//===----------------------------------------------------------------------===//
88

99

10-
//Todo: Have iostream replacements
10+
1111
#pragma once
1212

1313
#include <CL/sycl/backend_types.hpp>
1414
#include <CL/sycl/detail/defines.hpp>
1515
#include <CL/sycl/info/info_desc.hpp>
1616

17-
//#include <iostream>
1817
#include <string>
1918

2019
__SYCL_INLINE_NAMESPACE(cl) {
@@ -32,8 +31,6 @@ struct device_filter {
3231

3332
device_filter(){};
3433
device_filter(const std::string &FilterString);
35-
// friend std::ostream &operator<<(std::ostream &Out,
36-
// const device_filter &Filter);
3734
inline operator std::string()const;
3835

3936
};
@@ -51,8 +48,6 @@ class device_filter_list {
5148
bool deviceTypeCompatible(info::device_type DeviceType);
5249
bool deviceNumberCompatible(int DeviceNum);
5350
bool containsHost();
54-
// friend std::ostream &operator<<(std::ostream &Out,
55-
// const device_filter_list &List);
5651
inline operator std::string()const;
5752
};
5853

@@ -80,27 +75,6 @@ inline device_filter::operator std::string() const {
8075
return Out;
8176
}
8277

83-
// inline std::ostream &operator<<(std::ostream &Out,
84-
// const device_filter &Filter) {
85-
// Out << Filter.Backend << ":";
86-
// if (Filter.DeviceType == info::device_type::host) {
87-
// Out << "host";
88-
// } else if (Filter.DeviceType == info::device_type::cpu) {
89-
// Out << "cpu";
90-
// } else if (Filter.DeviceType == info::device_type::gpu) {
91-
// Out << "gpu";
92-
// } else if (Filter.DeviceType == info::device_type::accelerator) {
93-
// Out << "accelerator";
94-
// } else if (Filter.DeviceType == info::device_type::all) {
95-
// Out << "*";
96-
// } else {
97-
// Out << "unknown";
98-
// }
99-
// if (Filter.HasDeviceNum) {
100-
// Out << ":" << Filter.DeviceNum;
101-
// }
102-
// return Out;
103-
// }
10478

10579
inline device_filter_list::operator std::string()const{
10680
std::string Out;
@@ -111,15 +85,6 @@ inline device_filter_list::operator std::string()const{
11185
return Out;
11286
}
11387

114-
// inline std::ostream &operator<<(std::ostream &Out,
115-
// const device_filter_list &List) {
116-
// for (const device_filter &Filter : List.FilterList) {
117-
// Out << Filter;
118-
// Out << ",";
119-
// }
120-
// return Out;
121-
// }
122-
12388
} // namespace detail
12489
} // namespace sycl
12590
} // __SYCL_INLINE_NAMESPACE(cl)

sycl/include/CL/sycl/detail/image_accessor_util.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
#include <CL/sycl/types.hpp>
2121

2222
#include <cmath>
23-
//#include <iostream>
2423

2524
__SYCL_INLINE_NAMESPACE(cl) {
2625
namespace sycl {

sycl/include/CL/sycl/detail/pi.hpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,12 +238,9 @@ class DeviceBinaryProperty {
238238
operator std::string()const;
239239

240240
protected:
241-
// friend std::ostream &operator<<(std::ostream &Out,
242-
// const DeviceBinaryProperty &P);
243241
const _pi_device_binary_property_struct *Prop;
244242
};
245243

246-
//std::ostream &operator<<(std::ostream &Out, const DeviceBinaryProperty &P);
247244

248245
// C++ convenience wrapper over the pi_device_binary_struct structure.
249246
class DeviceBinaryImage {

sycl/include/CL/sycl/half_type.hpp

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#include <CL/sycl/detail/type_traits.hpp>
1414

1515
#include <functional>
16-
// #include <iostream>
1716
#include <limits>
1817

1918
#if !__has_builtin(__builtin_expect)
@@ -586,20 +585,7 @@ class half {
586585
return static_cast<float>(Data);
587586
}
588587

589-
// Operator << and >>
590-
// inline friend std::ostream &operator<<(std::ostream &O,
591-
// cl::sycl::half const &rhs) {
592-
// O << static_cast<float>(rhs);
593-
// return O;
594-
// }
595-
596-
// inline friend std::istream &operator>>(std::istream &I, cl::sycl::half &rhs) {
597-
// float ValFloat = 0.0f;
598-
// I >> ValFloat;
599-
// rhs = ValFloat;
600-
// return I;
601-
// }
602-
588+
603589
template <typename Key> friend struct std::hash;
604590

605591
friend class sycl::ext::intel::esimd::detail::WrapperElementTypeProxy;
@@ -714,23 +700,13 @@ inline FILE* operator<<(FILE* file,cl::sycl::half const &rhs){
714700
return file;
715701
}
716702

717-
// inline std::ostream &operator<<(std::ostream &O, cl::sycl::half const &rhs) {
718-
// O << static_cast<float>(rhs);
719-
// return O;
720-
// }
721703

722704
inline FILE* operator>>(FILE* file,cl::sycl::half &rhs){
723705
float ValFloat = 0.0f;
724706
fscanf(file,"%f",&ValFloat);
725707
rhs=ValFloat;
726708
return file;
727709
}
728-
// inline std::istream &operator>>(std::istream &I, cl::sycl::half &rhs) {
729-
// float ValFloat = 0.0f;
730-
// I >> ValFloat;
731-
// rhs = ValFloat;
732-
// return I;
733-
// }
734710

735711
#undef __SYCL_CONSTEXPR_HALF
736712
#undef _CPP14_CONSTEXPR

sycl/include/sycl/ext/intel/esimd/detail/elem_type_traits.hpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -713,20 +713,6 @@ __esimd_wrapper_type_bitcast_from<sycl::half>(sycl::half Val) {
713713
template <>
714714
struct is_esimd_arithmetic_type<__raw_t<sycl::half>, void> : std::true_type {};
715715

716-
// Misc
717-
//TODO: Delete definitions duplicate from half_type.hpp
718-
// inline std::ostream &operator<<(std::ostream &O, sycl::half const &rhs) {
719-
// O << static_cast<float>(rhs);
720-
// return O;
721-
// }
722-
723-
// inline std::istream &operator>>(std::istream &I, sycl::half &rhs) {
724-
// float ValFloat = 0.0f;
725-
// I >> ValFloat;
726-
// rhs = ValFloat;
727-
// return I;
728-
// }
729-
730716
// The only other place which needs to be updated to support a new type is
731717
// the is_wrapper_elem_type_v meta function.
732718

sycl/include/sycl/ext/intel/esimd/simd.hpp

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#include <sycl/ext/oneapi/experimental/invoke_simd.hpp>
2323

2424
#ifndef __SYCL_DEVICE_ONLY__
25-
//#include <iostream>
25+
#include <cstdio>
2626
#endif // __SYCL_DEVICE_ONLY__
2727

2828
__SYCL_INLINE_NAMESPACE(cl) {
@@ -219,24 +219,4 @@ template <int N> using simd_mask = detail::simd_mask_type<N>;
219219
/// @} sycl_esimd_core_vectors
220220

221221
} // namespace __ESIMD_NS
222-
} // __SYCL_INLINE_NAMESPACE(cl)
223-
224-
/// @ingroup sycl_esimd_misc
225-
/// Prints a \c simd object to an output stream.
226-
/// TODO: implemented for host code only.
227-
// template <typename Ty, int N>
228-
// std::ostream &operator<<(std::ostream &OS, const __ESIMD_NS::simd<Ty, N> &V)
229-
// #ifdef __SYCL_DEVICE_ONLY__
230-
// {}
231-
// #else
232-
// {
233-
// OS << "{";
234-
// for (int I = 0; I < N; I++) {
235-
// OS << V[I];
236-
// if (I < N - 1)
237-
// OS << ",";
238-
// }
239-
// OS << "}";
240-
// return OS;
241-
// }
242-
// #endif // __SYCL_DEVICE_ONLY__
222+
} // __SYCL_INLINE_NAMESPACE(cl)

sycl/plugins/esimd_emulator/pi_esimd_emulator.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#include <CL/sycl/detail/pi.h>
1818
#include <atomic>
1919
#include <cassert>
20-
//#include <iostream>
2120
#include <mutex>
2221
#include <unordered_map>
2322

sycl/plugins/level_zero/pi_level_zero.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
#include <cassert>
3131
#include <cstring>
3232
#include <functional>
33-
//#include <iostream>
3433
#include <list>
3534
#include <map>
3635
#include <memory>

sycl/plugins/level_zero/tracing.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ void enableZeTracing() {
7070
Status = zelTracerCreate(&TracerDesc, &Tracer);
7171

7272
if (Status != ZE_RESULT_SUCCESS || Tracer == nullptr) {
73-
fprintf(stderr,"[WARNING] Failed to create Level Zero tracer: %d\n",Status);
73+
fprintf(stderr,"[WARNING] Failed to create Level Zero tracer: %d\n",
74+
Status);
7475
return;
7576
}
7677

sycl/plugins/level_zero/usm_allocator.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -586,12 +586,6 @@ bool operator==(const Slab &Lhs, const Slab &Rhs) {
586586
return Lhs.getPtr() == Rhs.getPtr();
587587
}
588588

589-
// std::ostream &operator<<(std::ostream &Os, const Slab &Slab) {
590-
// Os << "Slab<" << Slab.getPtr() << ", " << Slab.getEnd() << ", "
591-
// << Slab.getBucket().getSize() << ">";
592-
// return Os;
593-
// }
594-
595589
Slab::Slab(Bucket &Bkt)
596590
: // In case bucket size is not a multiple of SlabMinSize, we would have
597591
// some padding at the end of the slab.

sycl/source/detail/plugin.hpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ class plugin {
120120

121121
// If the warning level is greater then 2 emit the message
122122
if (detail::SYCLConfig<detail::SYCL_RT_WARNING_LEVEL>::get() >= 2)
123-
//TODO: Implement clog replacment, stderr is not fully analogous
124-
fprintf(stderr,"%s\n",message);
123+
//TODO: Current solution is a proper analog ogf clog
124+
fprintf(stdout,"%s\n",message);
125125

126126
// If it is a warning do not throw code
127127
if (pi_result == PI_SUCCESS)
@@ -138,7 +138,8 @@ class plugin {
138138

139139
// If the warning level is greater then 2 emit the message
140140
if (detail::SYCLConfig<detail::SYCL_RT_WARNING_LEVEL>::get() >= 2)
141-
fprintf(stderr, "%s\n",message);
141+
//TODO: Current solution is a proper analog ogf clog
142+
fprintf(stdout, "%s\n",message);
142143

143144
// If it is a warning do not throw code
144145
if (pi_result == PI_SUCCESS)

sycl/source/detail/program_impl.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121
#include <algorithm>
2222
#include <cassert>
23-
//#include <fstream>
2423
#include <memory>
2524
#include <mutex>
2625

sycl/source/detail/program_manager/program_manager.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -485,8 +485,8 @@ static void emitBuiltProgramInfo(const pi_program &Prog,
485485
if (SYCLConfig<SYCL_RT_WARNING_LEVEL>::get() >= 2) {
486486
std::string ProgramBuildLog =
487487
ProgramManager::getProgramBuildLog(Prog, Context);
488-
//TODO: Implement clog replacment, stderr is not fully analogous
489-
fprintf(stderr,"%s\n",ProgramBuildLog.c_str());
488+
//TODO: Implement clog replacment, stdout is not fully analogous
489+
fprintf(stdout,"%s\n",ProgramBuildLog.c_str());
490490
}
491491
}
492492

sycl/source/detail/spec_constant_impl.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
#include <cstring>
1717
#include <cstdio>
18-
//#include <iostream>
1918

2019
__SYCL_INLINE_NAMESPACE(cl) {
2120
namespace sycl {
@@ -52,17 +51,6 @@ spec_constant_impl::operator std::string() const{
5251
Out += "]";
5352
return Out;
5453
}
55-
// std::ostream &operator<<(std::ostream &Out, const spec_constant_impl &V) {
56-
// Out << "spec_constant_impl"
57-
// << " { Size=" << V.getSize() << " IsSet=" << V.isSet() << " Val=[";
58-
// std::ios_base::fmtflags FlagsSav = Out.flags();
59-
// Out << std::hex;
60-
// for (unsigned I = 0; I < V.getSize(); ++I) {
61-
// Out << (I == 0 ? "" : " ") << static_cast<int>(*(V.getValuePtr() + I));
62-
// }
63-
// Out << "]" << FlagsSav;
64-
// return Out;
65-
// }
6654

6755
} // namespace detail
6856
} // namespace sycl

sycl/source/detail/spec_constant_impl.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#include <CL/sycl/detail/util.hpp>
1313
#include <CL/sycl/stl.hpp>
1414

15-
//#include <iostream>
1615
#include <map>
1716
#include <vector>
1817

@@ -38,7 +37,6 @@ class spec_constant_impl {
3837
std::vector<char> Bytes;
3938
};
4039

41-
// std::ostream &operator<<(std::ostream &Out, const spec_constant_impl &V);
4240

4341
// Used to define specialization constant registry. Must be ordered map, since
4442
// the order of entries matters in stableSerializeSpecConstRegistry.

0 commit comments

Comments
 (0)