Skip to content

Commit 1f0d4c5

Browse files
againullbader
authored andcommitted
[SYCL] Remove unnecessary array initializations in stream class
Signed-off-by: Artur Gainullin <artur.gainullin@intel.com>
1 parent 0caeeae commit 1f0d4c5

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

sycl/include/CL/sycl/detail/stream_impl.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ template <int ArrayLength>
487487
inline void writeArray(stream_impl::OffsetAccessorType &OffsetAcc,
488488
stream_impl::AccessorType &Acc,
489489
const array<ArrayLength> &Arr) {
490-
char Buf[MAX_ARRAY_SIZE] = {0};
490+
char Buf[MAX_ARRAY_SIZE];
491491
unsigned Len = ArrayToStr(Buf, Arr);
492492
write(OffsetAcc, Acc, Len, Buf);
493493
}
@@ -498,7 +498,7 @@ inline void writeItem(stream_impl::OffsetAccessorType &OffsetAcc,
498498
const item<Dimensions> &Item) {
499499
// Reserve space for 3 arrays and additional place (40 symbols) for printing
500500
// the text
501-
char Buf[3 * MAX_ARRAY_SIZE + 40] = {0};
501+
char Buf[3 * MAX_ARRAY_SIZE + 40];
502502
unsigned Len = 0;
503503
Len += append(Buf, "item(");
504504
Len += append(Buf + Len, "range: ");
@@ -517,7 +517,7 @@ inline void writeNDRange(stream_impl::OffsetAccessorType &OffsetAcc,
517517
const nd_range<Dimensions> &ND_Range) {
518518
// Reserve space for 3 arrays and additional place (50 symbols) for printing
519519
// the text
520-
char Buf[3 * MAX_ARRAY_SIZE + 50] = {0};
520+
char Buf[3 * MAX_ARRAY_SIZE + 50];
521521
unsigned Len = 0;
522522
Len += append(Buf, "nd_range(");
523523
Len += append(Buf + Len, "global_range: ");
@@ -536,7 +536,7 @@ inline void writeNDItem(stream_impl::OffsetAccessorType &OffsetAcc,
536536
const nd_item<Dimensions> &ND_Item) {
537537
// Reserve space for 2 arrays and additional place (40 symbols) for printing
538538
// the text
539-
char Buf[2 * MAX_ARRAY_SIZE + 40] = {0};
539+
char Buf[2 * MAX_ARRAY_SIZE + 40];
540540
unsigned Len = 0;
541541
Len += append(Buf, "nd_item(");
542542
Len += append(Buf + Len, "global_id: ");
@@ -553,7 +553,7 @@ inline void writeGroup(stream_impl::OffsetAccessorType &OffsetAcc,
553553
const group<Dimensions> &Group) {
554554
// Reserve space for 4 arrays and additional place (60 symbols) for printing
555555
// the text
556-
char Buf[4 * MAX_ARRAY_SIZE + 60] = {0};
556+
char Buf[4 * MAX_ARRAY_SIZE + 60];
557557
unsigned Len = 0;
558558
Len += append(Buf, "group(");
559559
Len += append(Buf + Len, "id: ");
@@ -590,7 +590,7 @@ inline void writeHItem(stream_impl::OffsetAccessorType &OffsetAcc,
590590
const h_item<Dimensions> &HItem) {
591591
// Reserve space for 3 items and additional place (60 symbols) for printing
592592
// the text
593-
char Buf[3 * MAX_ITEM_SIZE + 60] = {0};
593+
char Buf[3 * MAX_ITEM_SIZE + 60];
594594
unsigned Len = 0;
595595
Len += append(Buf, "h_item(");
596596
Len += append(Buf + Len, "\n global ");

0 commit comments

Comments
 (0)